made OF selfSigned() workaround only available >=kitkat
this undos 8a729061d5. as it turns out 4.1
and 4.0 only break when checking if a cert is self signed.
			
			
This commit is contained in:
		
							parent
							
								
									58f3787795
								
							
						
					
					
						commit
						c8bd5bc1f5
					
				| @ -43,10 +43,9 @@ public class XmppDomainVerifier implements DomainHostnameVerifier { | |||||||
| 			} | 			} | ||||||
| 			X509Certificate certificate = (X509Certificate) chain[0]; | 			X509Certificate certificate = (X509Certificate) chain[0]; | ||||||
| 			final List<String> commonNames = getCommonNames(certificate); | 			final List<String> commonNames = getCommonNames(certificate); | ||||||
| 			final boolean isSelfSignedCertificate = isSelfSigned(certificate); | 			if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && isSelfSigned(certificate)) { | ||||||
| 			if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT || isSelfSignedCertificate) { | 				if (commonNames.size() == 1 && matchDomain(domain,commonNames)) { | ||||||
| 				if (commonNames.size() == 1 && commonNames.get(0).equals(domain)) { | 					Log.d(LOGTAG,"accepted CN in self signed cert as work around for "+domain); | ||||||
| 					Log.d(LOGTAG,"accepted CN in cert as work around for "+domain+" isSelfSigned="+Boolean.toString(isSelfSignedCertificate)+", sdkInt="+Build.VERSION.SDK_INT); |  | ||||||
| 					return true; | 					return true; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gultsch
						Daniel Gultsch