SignedCmsBuilderSign Method
Signs current PKCS#7 message and adds a new signer information to
SignerInfos collection.
Certificates specified in
chain parameter are added to
Certificates collection.
Namespace: SysadminsLV.PKI.Cryptography.PkcsAssembly: SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 4.0.1
public DefaultSignedPkcs7 Sign(
ICryptSigner signer,
X509Certificate2Collection chain = null
)
Public Function Sign (
signer As ICryptSigner,
Optional chain As X509Certificate2Collection = Nothing
) As DefaultSignedPkcs7
public:
DefaultSignedPkcs7^ Sign(
ICryptSigner^ signer,
X509Certificate2Collection^ chain = nullptr
)
member Sign :
signer : ICryptSigner *
?chain : X509Certificate2Collection
(* Defaults:
let _chain = defaultArg chain null
*)
-> DefaultSignedPkcs7
- signer ICryptSigner
- signing object that contains public certificate, private key and signing configuration.
- chain X509Certificate2Collection (Optional)
-
Signing certificate chain to add to CMS. This parameter is optional. If not specified, only leaf (signing) certificate
is added to Certificates collection and signed message.
DefaultSignedPkcs7
An instance of
DefaultSignedPkcs7 class that represents signed CMS message.
You can call this method multiple times to attach multiple signatures to signed CMS message.