Search in sources :

Example 1 with DefaultAlgorithmNameFinder

use of org.bouncycastle.operator.DefaultAlgorithmNameFinder in project candlepin by candlepin.

the class X509CRLStreamWriter method createContentSigner.

protected ContentSigner createContentSigner(AlgorithmIdentifier signingAlg, PrivateKey key) throws OperatorCreationException {
    String algorithm = new DefaultAlgorithmNameFinder().getAlgorithmName(signingAlg);
    JcaContentSignerBuilder builder = new JcaContentSignerBuilder(algorithm).setProvider(BC_PROVIDER);
    return builder.build(key);
}
Also used : DefaultAlgorithmNameFinder(org.bouncycastle.operator.DefaultAlgorithmNameFinder) JcaContentSignerBuilder(org.bouncycastle.operator.jcajce.JcaContentSignerBuilder) DERBitString(org.bouncycastle.asn1.DERBitString) ASN1OctetString(org.bouncycastle.asn1.ASN1OctetString) ASN1BitString(org.bouncycastle.asn1.ASN1BitString) DEROctetString(org.bouncycastle.asn1.DEROctetString)

Aggregations

ASN1BitString (org.bouncycastle.asn1.ASN1BitString)1 ASN1OctetString (org.bouncycastle.asn1.ASN1OctetString)1 DERBitString (org.bouncycastle.asn1.DERBitString)1 DEROctetString (org.bouncycastle.asn1.DEROctetString)1 DefaultAlgorithmNameFinder (org.bouncycastle.operator.DefaultAlgorithmNameFinder)1 JcaContentSignerBuilder (org.bouncycastle.operator.jcajce.JcaContentSignerBuilder)1