SessionCreate |
Create a signature configuration based on the private key's label (name) and an external certificate
Create a signature configuration where only the private key is contained in the PKCS#11 device and the signing certificate is provided externally. This is intended for PKCS#11 devices that can only store private keys, e.g. the Google Cloud Key Management (KMS).
The private key object is identified using its label, i.e. the CKA_LABEL object attribute in the PKCS#11 store.
The certificates of the trust chain should be added using AddCertificate(Stream).
public SignatureConfiguration CreateSignatureFromKeyLabel( string label, Stream certificate )
Exception | Condition |
---|---|
NotFoundException | If the private key cannot be found in the PKCS#11 store |
ArgumentException | If the certificate is not a valid signing certificate |
ArgumentException | If the key specification matches more than one key |
ArgumentNullException | if label is . |
ArgumentNullException | if certificate is . |