Objects of this type can be created from certificates and CRLs using the PrincipalUtil class.
269270271272273274275276277278279
} else if (params instanceof RC5ParameterSpec) { RC5ParameterSpec rc5Param = (RC5ParameterSpec)params; param = new RC5Parameters(key.getEncoded(), ((RC5ParameterSpec)params).getRounds()); if (rc5Param.getWordSize() != 32) { throw new IllegalArgumentException("can only accept RC5 word size 32 (at the moment...)"); } if ((rc5Param.getIV() != null) && (ivLength != 0))
2627282930313233
} static RSAKeyParameters generatePublicKeyParameter( RSAPublicKey key) { return new RSAKeyParameters(false, key.getModulus(), key.getPublicExponent()); }
4546474849505152
} else { RSAPrivateKey k = key; return new RSAKeyParameters(true, k.getModulus(), k.getPrivateExponent()); } }
3738394041424344454647
{ if (key instanceof RSAPrivateCrtKey) { RSAPrivateCrtKey k = (RSAPrivateCrtKey)key; return new RSAPrivateCrtKeyParameters(k.getModulus(), k.getPublicExponent(), k.getPrivateExponent(), k.getPrimeP(), k.getPrimeQ(), k.getPrimeExponentP(), k.getPrimeExponentQ(), k.getCrtCoefficient()); } else {
212213214215216217218
return c.getVersion(); } public Principal getIssuerDN() { return new X509Principal(c.getIssuer()); }
7071727374757677787980
} public AttributeCertificateHolder(X509Certificate cert) throws CertificateParsingException { X509Principal name; try { name = PrincipalUtil.getIssuerX509Principal(cert); }
212213214215216217218219220221222
if (gn.getTagNo() == GeneralName.directoryName) { try { if (new X509Principal(((ASN1Encodable)gn.getName()) .getEncoded()).equals(subject)) { return true; } }
266267268269270271272273274275276
static X509Principal convertPrincipal( X500Principal principal) { try { return new X509Principal(principal.getEncoded()); } catch (IOException e) { throw new IllegalArgumentException("cannot convert principal"); }
144145146147148149150
return c.getSerialNumber().getValue(); } public Principal getIssuerDN() { return new X509Principal(c.getIssuer()); }
166167168169170171172
} } public Principal getSubjectDN() { return new X509Principal(c.getSubject()); }