CmsSigner Constructeurs
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la classe CmsSigner.
Surcharges
| Nom | Description |
|---|---|
| CmsSigner() |
Initialise une nouvelle instance de la CmsSigner classe avec des valeurs par défaut. |
| CmsSigner(SubjectIdentifierType, X509Certificate2, SlhDsa) | |
| CmsSigner(SubjectIdentifierType, X509Certificate2, MLDsa) | |
| CmsSigner(SubjectIdentifierType, X509Certificate2, CompositeMLDsa) | |
| CmsSigner(SubjectIdentifierType, X509Certificate2, AsymmetricAlgorithm) |
Initialise une nouvelle instance de la CmsSigner classe avec un certificat de signataire, un type d’identificateur d’objet et un objet de clé privée spécifiés. |
| CmsSigner(SubjectIdentifierType, X509Certificate2, RSA, RSASignaturePadding) |
Initialise une nouvelle instance de la classe CmsSigner avec un certificat de signataire, un type d’identificateur d’objet, un objet de clé privée et un remplissage de signature RSA spécifiés. |
| CmsSigner(X509Certificate2) |
Initialise une nouvelle instance de la CmsSigner classe avec un certificat de signataire spécifié. |
| CmsSigner(SubjectIdentifierType) |
Initialise une nouvelle instance de la CmsSigner classe avec un type d’identificateur d’objet spécifié. |
| CmsSigner(CspParameters) |
Obsolète.
Initialise une nouvelle instance de la CmsSigner classe à partir d’une clé persistante. |
| CmsSigner(SubjectIdentifierType, X509Certificate2) |
Initialise une nouvelle instance de la CmsSigner classe avec un certificat de signataire et un type d’identificateur d’objet spécifiés. |
CmsSigner()
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
Initialise une nouvelle instance de la CmsSigner classe avec des valeurs par défaut.
public:
CmsSigner();
public CmsSigner();
Public Sub New ()
Remarques
Ce constructeur génère les valeurs de propriété par défaut suivantes :
| Propriété | Valeur par défaut |
|---|---|
| SignerIdentifierType | SubjectIdentifierType.IssuerAndSerialNumber |
| DigestAlgorithm | 2.16.840.1.101.3.4.2.1 (SHA-256) |
| IncludeOption | X509IncludeOption.ExcludeRoot |
S’applique à
CmsSigner(SubjectIdentifierType, X509Certificate2, SlhDsa)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
public:
CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::SlhDsa ^ privateKey);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.SlhDsa? privateKey);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.SlhDsa? privateKey);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.SlhDsa -> System.Security.Cryptography.Pkcs.CmsSigner
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.SlhDsa -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, privateKey As SlhDsa)
Paramètres
- signerIdentifierType
- SubjectIdentifierType
- certificate
- X509Certificate2
- privateKey
- SlhDsa
- Attributs
S’applique à
CmsSigner(SubjectIdentifierType, X509Certificate2, MLDsa)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
public:
CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::MLDsa ^ privateKey);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.MLDsa? privateKey);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.MLDsa? privateKey);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.MLDsa -> System.Security.Cryptography.Pkcs.CmsSigner
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.MLDsa -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, privateKey As MLDsa)
Paramètres
- signerIdentifierType
- SubjectIdentifierType
- certificate
- X509Certificate2
- privateKey
- MLDsa
- Attributs
S’applique à
CmsSigner(SubjectIdentifierType, X509Certificate2, CompositeMLDsa)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
public:
CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::CompositeMLDsa ^ privateKey);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.CompositeMLDsa? privateKey);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.CompositeMLDsa? privateKey);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.CompositeMLDsa -> System.Security.Cryptography.Pkcs.CmsSigner
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.CompositeMLDsa -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, privateKey As CompositeMLDsa)
Paramètres
- signerIdentifierType
- SubjectIdentifierType
- certificate
- X509Certificate2
- privateKey
- CompositeMLDsa
- Attributs
S’applique à
CmsSigner(SubjectIdentifierType, X509Certificate2, AsymmetricAlgorithm)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
Initialise une nouvelle instance de la CmsSigner classe avec un certificat de signataire, un type d’identificateur d’objet et un objet de clé privée spécifiés.
public:
CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::AsymmetricAlgorithm ^ privateKey);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.AsymmetricAlgorithm? privateKey);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.AsymmetricAlgorithm privateKey);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.AsymmetricAlgorithm -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, privateKey As AsymmetricAlgorithm)
Paramètres
- signerIdentifierType
- SubjectIdentifierType
Une des valeurs d’énumération qui spécifie le schéma à utiliser pour identifier le certificat de signature utilisé.
- certificate
- X509Certificate2
Certificat dont la clé privée sera utilisée pour signer un message.
- privateKey
- AsymmetricAlgorithm
Objet de clé privée à utiliser lors de la signature du message.
Remarques
Ce constructeur génère les valeurs de propriété par défaut suivantes :
| Propriété | Valeur par défaut |
|---|---|
| DigestAlgorithm | 2.16.840.1.101.3.4.2.1 (SHA-256) |
| IncludeOption |
X509IncludeOption.None si SignerIdentifierType c’est SubjectIdentifierType.NoSignature, Sinon X509IncludeOption.ExcludeRoot |
Le certificat de signature spécifié par le certificate paramètre n’est pas vérifié pour la validité de l’entrée. Pour valider le certificat avant de le fournir à ce constructeur, utilisez la X509Chain.Build méthode.
Ce constructeur ne valide pas que le privateKey paramètre correspond à la clé publique dans certificate. Si les clés ne correspondent pas, la classe et ComputeCounterSignature(CmsSigner) la SignedCms méthode lèvent une CryptographicException pendant le processus de signature.
S’applique à
CmsSigner(SubjectIdentifierType, X509Certificate2, RSA, RSASignaturePadding)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
Initialise une nouvelle instance de la classe CmsSigner avec un certificat de signataire, un type d’identificateur d’objet, un objet de clé privée et un remplissage de signature RSA spécifiés.
public:
CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::RSA ^ privateKey, System::Security::Cryptography::RSASignaturePadding ^ signaturePadding);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.RSA? privateKey, System.Security.Cryptography.RSASignaturePadding? signaturePadding);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.RSA * System.Security.Cryptography.RSASignaturePadding -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, privateKey As RSA, signaturePadding As RSASignaturePadding)
Paramètres
- signerIdentifierType
- SubjectIdentifierType
Une des valeurs d’énumération qui spécifie le schéma à utiliser pour identifier le certificat de signature utilisé.
- certificate
- X509Certificate2
Certificat dont la clé privée sera utilisée pour signer un message.
- privateKey
- RSA
Objet de clé privée à utiliser lors de la signature du message.
- signaturePadding
- RSASignaturePadding
Remplissage de signature RSA à utiliser.
S’applique à
CmsSigner(X509Certificate2)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
Initialise une nouvelle instance de la CmsSigner classe avec un certificat de signataire spécifié.
public:
CmsSigner(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public CmsSigner(System.Security.Cryptography.X509Certificates.X509Certificate2? certificate);
public CmsSigner(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (certificate As X509Certificate2)
Paramètres
- certificate
- X509Certificate2
Certificat dont la clé privée sera utilisée pour signer un message.
Remarques
Ce constructeur génère les valeurs de propriété par défaut suivantes :
| Propriété | Valeur par défaut |
|---|---|
| SignerIdentifierType | SubjectIdentifierType.IssuerAndSerialNumber |
| DigestAlgorithm | 2.16.840.1.101.3.4.2.1 (SHA-256) |
| IncludeOption | X509IncludeOption.ExcludeRoot |
Le certificat de signature spécifié par le certificate paramètre n’est pas vérifié pour la validité de l’entrée. Pour valider le certificat avant de le fournir à ce constructeur, utilisez la X509Chain.Build méthode.
S’applique à
CmsSigner(SubjectIdentifierType)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
Initialise une nouvelle instance de la CmsSigner classe avec un type d’identificateur d’objet spécifié.
public:
CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType)
Paramètres
- signerIdentifierType
- SubjectIdentifierType
Schéma à utiliser pour identifier le certificat de signature utilisé.
Remarques
Ce constructeur génère les valeurs de propriété par défaut suivantes :
| Propriété | Valeur par défaut |
|---|---|
| DigestAlgorithm | 2.16.840.1.101.3.4.2.1 (SHA-256) |
| IncludeOption |
X509IncludeOption.None si SignerIdentifierType c’est SubjectIdentifierType.NoSignature, Sinon X509IncludeOption.ExcludeRoot |
S’applique à
CmsSigner(CspParameters)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
Attention
CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead.
Initialise une nouvelle instance de la CmsSigner classe à partir d’une clé persistante.
public:
CmsSigner(System::Security::Cryptography::CspParameters ^ parameters);
[System.Obsolete("CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead.", DiagnosticId="SYSLIB0034", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CmsSigner(System.Security.Cryptography.CspParameters parameters);
public CmsSigner(System.Security.Cryptography.CspParameters parameters);
[<System.Obsolete("CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead.", DiagnosticId="SYSLIB0034", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.CspParameters -> System.Security.Cryptography.Pkcs.CmsSigner
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.CspParameters -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (parameters As CspParameters)
Paramètres
- parameters
- CspParameters
Paramètres CSP pour décrire la clé de signature à utiliser.
- Attributs
Exceptions
.NET Core et .NET 5+ uniquement : dans tous les cas.
Remarques
Ce constructeur génère les valeurs de propriété par défaut suivantes :
| Propriété | Valeur par défaut |
|---|---|
| SignerIdentifierType | SubjectIdentifierType.SubjectKeyIdentifier |
| DigestAlgorithm | 2.16.840.1.101.3.4.2.1 (SHA-256) |
| IncludeOption | X509IncludeOption.None |
Important
Cette méthode n’est prise en charge que sur .NET Framework. Son utilisation sur .NET Core lève un PlatformNotSupportedException.
S’applique à
CmsSigner(SubjectIdentifierType, X509Certificate2)
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
- Source:
- CmsSigner.cs
Initialise une nouvelle instance de la CmsSigner classe avec un certificat de signataire et un type d’identificateur d’objet spécifiés.
public:
CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate);
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2)
Paramètres
- signerIdentifierType
- SubjectIdentifierType
Schéma à utiliser pour identifier le certificat de signature utilisé.
- certificate
- X509Certificate2
Certificat dont la clé privée sera utilisée pour signer un message.
Remarques
Ce constructeur génère les valeurs de propriété par défaut suivantes :
| Propriété | Valeur par défaut |
|---|---|
| DigestAlgorithm | 2.16.840.1.101.3.4.2.1 (SHA-256) |
| IncludeOption |
X509IncludeOption.None si SignerIdentifierType c’est SubjectIdentifierType.NoSignature, Sinon X509IncludeOption.ExcludeRoot |
Le certificat de signature spécifié par le certificate paramètre n’est pas vérifié pour la validité de l’entrée. Pour valider le certificat avant de le fournir à ce constructeur, utilisez la X509Chain.Build méthode.