/** * Process the options related to generation of the X509IssuerSerial child element of X509Data * based on certificate data. * * @param x509Data the X509Data element being processed. * @param cert the certificate being processed */ protected void processCertX509IssuerSerial(X509Data x509Data, java.security.cert.X509Certificate cert) { if (options.emitX509IssuerSerial) { String issuerNameValue = getIssuerName(cert); if (! DatatypeHelper.isEmpty(issuerNameValue)) { x509Data.getX509IssuerSerials().add( KeyInfoHelper.buildX509IssuerSerial(issuerNameValue, cert.getSerialNumber()) ); } } }
/** * Process the options related to generation of the X509SubjectDN child element of X509Data * based on certificate data. * * @param x509Data the X509Data element being processed. * @param cert the certificate being processed */ protected void processCertX509SubjectName(X509Data x509Data, java.security.cert.X509Certificate cert) { if (options.emitX509SubjectName) { String subjectNameValue = getSubjectName(cert); if (! DatatypeHelper.isEmpty(subjectNameValue)) { x509Data.getX509SubjectNames().add( KeyInfoHelper.buildX509SubjectName(subjectNameValue)); } } }
processEntityCertificate(keyInfo, x509Data, x509Credential); processEntityCertificateChain(keyInfo, x509Data, x509Credential); processCRLs(keyInfo, x509Data, x509Credential);
processCertX509DataOptions(x509Data, javaCert); processCertKeyNameOptions(keyInfo, javaCert);
processCertX509DataOptions(x509Data, javaCert); processCertKeyNameOptions(keyInfo, javaCert);
processEntityCertificate(keyInfo, x509Data, x509Credential); processEntityCertificateChain(keyInfo, x509Data, x509Credential); processCRLs(keyInfo, x509Data, x509Credential);
/** * Process the options related to generation of the X509IssuerSerial child element of X509Data * based on certificate data. * * @param x509Data the X509Data element being processed. * @param cert the certificate being processed */ protected void processCertX509IssuerSerial(X509Data x509Data, java.security.cert.X509Certificate cert) { if (options.emitX509IssuerSerial) { String issuerNameValue = getIssuerName(cert); if (! DatatypeHelper.isEmpty(issuerNameValue)) { x509Data.getX509IssuerSerials().add( KeyInfoHelper.buildX509IssuerSerial(issuerNameValue, cert.getSerialNumber()) ); } } }
/** * Process the options related to generation of KeyName elements based on the certificate's * subject DN value. * * @param keyInfo the KeyInfo element being processed. * @param cert the certificate being processed */ protected void processSubjectDNKeyName(KeyInfo keyInfo, java.security.cert.X509Certificate cert) { if (options.emitSubjectDNAsKeyName) { String subjectNameValue = getSubjectName(cert); if (! DatatypeHelper.isEmpty(subjectNameValue)) { KeyInfoHelper.addKeyName(keyInfo, subjectNameValue); } } }
/** * Process the options related to generation of the X509SubjectDN child element of X509Data * based on certificate data. * * @param x509Data the X509Data element being processed. * @param cert the certificate being processed */ protected void processCertX509SubjectName(X509Data x509Data, java.security.cert.X509Certificate cert) { if (options.emitX509SubjectName) { String subjectNameValue = getSubjectName(cert); if (! DatatypeHelper.isEmpty(subjectNameValue)) { x509Data.getX509SubjectNames().add( KeyInfoHelper.buildX509SubjectName(subjectNameValue)); } } }
/** * Process the options related to generation of KeyName elements based on the certificate's * subject DN value. * * @param keyInfo the KeyInfo element being processed. * @param cert the certificate being processed */ protected void processSubjectDNKeyName(KeyInfo keyInfo, java.security.cert.X509Certificate cert) { if (options.emitSubjectDNAsKeyName) { String subjectNameValue = getSubjectName(cert); if (! DatatypeHelper.isEmpty(subjectNameValue)) { KeyInfoHelper.addKeyName(keyInfo, subjectNameValue); } } }
/** {@inheritDoc} */ public KeyInfoGenerator newInstance() { //TODO lock options during cloning ? X509Options newOptions = options.clone(); return new X509KeyInfoGenerator(newOptions); }
/** * Process the options related to generation of child elements of X509Data based on certificate data. * * @param x509Data the X509Data element being processed. * @param cert the certificate being processed */ protected void processCertX509DataOptions(X509Data x509Data, java.security.cert.X509Certificate cert) { processCertX509SubjectName(x509Data, cert); processCertX509IssuerSerial(x509Data, cert); processCertX509SKI(x509Data, cert); processCertX509Digest(x509Data, cert); }
/** {@inheritDoc} */ public KeyInfoGenerator newInstance() { //TODO lock options during cloning ? X509Options newOptions = options.clone(); return new X509KeyInfoGenerator(newOptions); }
/** * Process the options related to generation of child elements of X509Data based on certificate data. * * @param x509Data the X509Data element being processed. * @param cert the certificate being processed */ protected void processCertX509DataOptions(X509Data x509Data, java.security.cert.X509Certificate cert) { processCertX509SubjectName(x509Data, cert); processCertX509IssuerSerial(x509Data, cert); processCertX509SKI(x509Data, cert); processCertX509Digest(x509Data, cert); }