X509CertSelector getSubjectKeyIdentifier - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for X509CertSelector getSubjectKeyIdentifier method.

This code example shows how to use the following methods:getIssuerAsBytes, getSerialNumber, getSubjectKeyIdentifier
 
    public X509CertificateHolderSelector getCertificateHolderSelector(X509CertSelector certSelector)
    { 
try 
{ 
        if (certSelector.getSubjectKeyIdentifier() != null)
        { 
            return new X509CertificateHolderSelector(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber(), ASN1OctetString.getInstance(certSelector.getSubjectKeyIdentifier()).getOctets());
        } 
        else 
        { 
            return new X509CertificateHolderSelector(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber());
        } 
} 
catch (Exception e)
{ 
throw new IllegalArgumentException("conversion failed: " + e.toString());
} 
    } 
} 
7
CodeRank
This code example shows how to use the following methods:getIssuerAsBytes, getSerialNumber, getSubjectKeyIdentifier
 
    public SignerId getSignerId(X509CertSelector certSelector)
    { 
        try 
        { 
            if (certSelector.getSubjectKeyIdentifier() != null)
            { 
                return new SignerId(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber(), ASN1OctetString.getInstance(certSelector.getSubjectKeyIdentifier()).getOctets());
            } 
            else 
            { 
                return new SignerId(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber());
            } 
        } 
        catch (IOException e)
        { 
            throw new IllegalArgumentException("unable to convert issuer: " + e.getMessage());
        } 
    } 
 
7
CodeRank
This code example shows how to use the following methods:getIssuerAsBytes, getSerialNumber, getSubjectKeyIdentifier
 
    public X509CertificateHolderSelector getCertificateHolderSelector(X509CertSelector certSelector)
    { 
        try 
        { 
            if (certSelector.getSubjectKeyIdentifier() != null)
            { 
                return new X509CertificateHolderSelector(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber(), ASN1OctetString.getInstance(certSelector.getSubjectKeyIdentifier()).getOctets());
            } 
            else 
            { 
                return new X509CertificateHolderSelector(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber());
            } 
        } 
        catch (IOException e)
        { 
            throw new IllegalArgumentException("unable to convert issuer: " + e.getMessage());
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:getIssuerAsBytes, getSerialNumber, getSubjectKeyIdentifier
 
    public SignerId getSignerId(X509CertSelector certSelector)
    { 
        try 
        { 
            if (certSelector.getSubjectKeyIdentifier() != null)
            { 
                return new SignerId(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber(), ASN1OctetString.getInstance(certSelector.getSubjectKeyIdentifier()).getOctets());
            } 
            else 
            { 
                return new SignerId(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber());
            } 
        } 
        catch (IOException e)
        { 
            throw new IllegalArgumentException("unable to convert issuer: " + e.getMessage());
        } 
    } 
 
6
CodeRank
This code example shows how to use the following methods:getIssuerAsBytes, getSerialNumber, getSubjectKeyIdentifier
 
    public X509CertificateHolderSelector getCertificateHolderSelector(X509CertSelector certSelector)
    { 
try 
{ 
        if (certSelector.getSubjectKeyIdentifier() != null)
        { 
            return new X509CertificateHolderSelector(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber(), ASN1OctetString.getInstance(certSelector.getSubjectKeyIdentifier()).getOctets());
        } 
        else 
        { 
            return new X509CertificateHolderSelector(X500Name.getInstance(certSelector.getIssuerAsBytes()), certSelector.getSerialNumber());
        } 
} 
catch (Exception e)
{ 
throw new IllegalArgumentException("conversion failed: " + e.toString());
} 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:getAuthorityKeyIdentifier, getBasicConstraints, getCertificate, getCertificateValid, getExtendedKeyUsage
-2
CodeRank
This code example shows how to use the following methods:getAuthorityKeyIdentifier, getBasicConstraints, getCertificate, getCertificateValid, getExtendedKeyUsage
-2
CodeRank
This code example shows how to use the following methods:getAuthorityKeyIdentifier, getBasicConstraints, getCertificate, getCertificateValid, getExtendedKeyUsage
-2
CodeRank
This code example shows how to use the following methods:getAuthorityKeyIdentifier, getBasicConstraints, getCertificate, getCertificateValid, getExtendedKeyUsage
-4
CodeRank
This code example shows how to use the following methods:getAuthorityKeyIdentifier, getBasicConstraints, getCertificate, getCertificateValid, getExtendedKeyUsage
-1
CodeRank
getSubjectKeyIdentifier Method Overview
Returns the subjectKeyIdentifier criterion.
See Code Examples for other Java 8 X509CertSelector Methods: