Class DefaultSignatureAlgorithmIdentifierFinder
- java.lang.Object
-
- org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder
-
- All Implemented Interfaces:
SignatureAlgorithmIdentifierFinder
public class DefaultSignatureAlgorithmIdentifierFinder extends java.lang.Object implements SignatureAlgorithmIdentifierFinder
Default implementation ofSignatureAlgorithmIdentifierFinder, returning theAlgorithmIdentifier(algorithm OID plus any algorithm-specific parameters) used to name a signature scheme in X.509 certificates, CMS SignedData, OCSP responses and related PKIX structures.Parameter-field convention for RSA-PSS: when this finder builds the
RSASSA-PSS-paramsstructure forSHA*WITHRSAANDMGF1names, the hash sub-identifier inside thehashAlgorithmfield (and the inner hash insideMGF1) is emitted withNULLparameters, following RFC 4055 §2.1 which definessha256Identifier ::= { id-sha256, NULL }(and the same pattern for SHA-1 / SHA-224 / SHA-384 / SHA-512). SHA-3 inside PSS follows the same NULL-parameter convention here for consistency.This is a different convention from
DefaultDigestAlgorithmIdentifierFinder, which (for the CMS contexts it serves) follows RFC 5754 §2 and emits SHA-2 / SHA-3 digest identifiers with theparametersfield absent. Both forms are standards-compliant in their respective slots; the practical consequence is that a single CMS SignedData with a PSS SignerInfo will validly contain the same SHA-2 OID encoded both ways. See the class-level javadoc onDefaultDigestAlgorithmIdentifierFinderfor the cross-reference.
-
-
Constructor Summary
Constructors Constructor Description DefaultSignatureAlgorithmIdentifierFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.asn1.x509.AlgorithmIdentifierfind(java.lang.String sigAlgName)Find the signature algorithm identifier that matches with the passed in signature algorithm name.
-
-
-
Method Detail
-
find
public org.bouncycastle.asn1.x509.AlgorithmIdentifier find(java.lang.String sigAlgName)
Description copied from interface:SignatureAlgorithmIdentifierFinderFind the signature algorithm identifier that matches with the passed in signature algorithm name.- Specified by:
findin interfaceSignatureAlgorithmIdentifierFinder- Parameters:
sigAlgName- the name of the signature algorithm of interest.- Returns:
- an algorithm identifier for the corresponding signature.
-
-