Created
June 7, 2016 00:59
-
-
Save kasimok/9e67b39c57f466378a6fde43ea93b2b5 to your computer and use it in GitHub Desktop.
Extract Issuer from cert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Extract the issuer cert's URI from cert. | |
* @param var0 | |
* @return | |
*/ | |
private URI getIssuerCertURL(X509CertImpl var0) { | |
AuthorityInfoAccessExtension var1 = var0.getAuthorityInfoAccessExtension(); | |
if(var1 == null) { | |
return null; | |
} else { | |
List var2 = var1.getAccessDescriptions(); | |
Iterator var3 = var2.iterator(); | |
while(var3.hasNext()) { | |
AccessDescription var4 = (AccessDescription)var3.next(); | |
if(var4.getAccessMethod().equals(AccessDescription.Ad_CAISSUERS_Id)) { | |
GeneralName var5 = var4.getAccessLocation(); | |
if(var5.getType() == 6) { | |
URIName var6 = (URIName)var5.getName(); | |
return var6.getURI(); | |
} | |
} | |
} | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment