SubjectIdentifier.MatchesCertificate(X509Certificate2) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Verifies if the specified certificate's subject identifier matches current subject identifier instance.
public:
bool MatchesCertificate(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public bool MatchesCertificate (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
member this.MatchesCertificate : System.Security.Cryptography.X509Certificates.X509Certificate2 -> bool
Public Function MatchesCertificate (certificate As X509Certificate2) As Boolean
Parameters
- certificate
- X509Certificate2
The certificate to match with the current subject identifier instance.
Returns
true
if the specified certificate's identifier matches the current subject identifier instance; otherwise, false
.
Exceptions
Invalid subject identifier type.
Remarks
If the current subject identifier instance is of type SubjectIdentifierType.IssuerAndSerialNumber, this method compares the current instance's X09 issuer serial number and issuer name with the specified certificate's issuer serial number and issuer name. If the current subject identifier instance is of type SubjectIdentifierType.SubjectKeyIdentifier, this method compares the current instance's subject key identifier with the specified certificate's subject key identifier.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈