다음을 통해 공유


Rfc3161TimestampToken.VerifySignatureForHash 메서드

정의

오버로드

VerifySignatureForHash(ReadOnlySpan<Byte>, HashAlgorithmName, X509Certificate2, X509Certificate2Collection)

현재 토큰이 제공된 데이터 해시 및 알고리즘 식별자에 대해 유효한 타임스탬프 토큰인지 확인합니다.

VerifySignatureForHash(ReadOnlySpan<Byte>, Oid, X509Certificate2, X509Certificate2Collection)

현재 토큰이 제공된 데이터 해시 및 알고리즘 식별자에 대해 유효한 타임스탬프 토큰인지 확인합니다.

VerifySignatureForHash(ReadOnlySpan<Byte>, HashAlgorithmName, X509Certificate2, X509Certificate2Collection)

Source:
Rfc3161TimestampToken.cs
Source:
Rfc3161TimestampToken.cs
Source:
Rfc3161TimestampToken.cs
Source:
Rfc3161TimestampToken.cs

현재 토큰이 제공된 데이터 해시 및 알고리즘 식별자에 대해 유효한 타임스탬프 토큰인지 확인합니다.

public bool VerifySignatureForHash (ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2? signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection? extraCandidates = default);
public bool VerifySignatureForHash (ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = default);
member this.VerifySignatureForHash : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * X509Certificate2 * System.Security.Cryptography.X509Certificates.X509Certificate2Collection -> bool
Public Function VerifySignatureForHash (hash As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, ByRef signerCertificate As X509Certificate2, Optional extraCandidates As X509Certificate2Collection = Nothing) As Boolean

매개 변수

hash
ReadOnlySpan<Byte>

이 타임스탬프 토큰에 대해 확인할 암호화 해시입니다.

hashAlgorithm
HashAlgorithmName

hash를 생성한 알고리즘입니다.

signerCertificate
X509Certificate2

이 메서드가 반환될 때 이 토큰을 서명한 TSA(타임스탬프 기관)의 인증서이거나 서명자 인증서를 확인할 수 없는 경우 null입니다. 이 매개 변수는 초기화되지 않은 것으로 처리됩니다.

extraCandidates
X509Certificate2Collection

토큰에 포함된 인증서에 더해 TSA(타임스탬프 기관) 인증서로 간주해야 할 선택적인 인증서 컬렉션입니다.

반환

TSA(타임스탬프 기관) 인증서가 있고, 인증서 퍼블릭 키가 토큰 서명의 유효성을 검사하며, 토큰이 제공된 데이터 해시 및 알고리즘의 해시와 일치하면 true이고 그렇지 않으며 false입니다.

설명

이 메서드를 사용하려면 TSA(Timestamp Authority) 인증서에 필요한 확장 키 사용 값(1.3.6.1.5.5.7.3.8)이 토큰의 포함된 ESSCertID 또는 ESSCertID2 식별자와 일치해야 합니다. 에는 토큰의 타임스탬프 값을 포함하는 유효성 범위가 있으며 토큰의 서명의 유효성을 성공적으로 검사하는 공개 키가 있습니다.

적절한 TSA 인증서를 확인한 후 이 메서드는 제공된 다이제스트 및 알고리즘 식별자를 토큰의 적절한 값과 비교합니다. 다이제스트와 알고리즘이 토큰의 값과 일치하는 경우 인증서는 를 통해 signerCertificate 보고되고 메서드는 를 반환합니다 true.

다이제스트가 일치하지 않거나 알고리즘이 일치하지 않거나 TSA 인증서를 확인할 수 없는 경우 메서드는 를 로 null 보고 signerCertificate 하고 를 반환합니다false.

추가 정보

적용 대상

VerifySignatureForHash(ReadOnlySpan<Byte>, Oid, X509Certificate2, X509Certificate2Collection)

Source:
Rfc3161TimestampToken.cs
Source:
Rfc3161TimestampToken.cs
Source:
Rfc3161TimestampToken.cs
Source:
Rfc3161TimestampToken.cs

현재 토큰이 제공된 데이터 해시 및 알고리즘 식별자에 대해 유효한 타임스탬프 토큰인지 확인합니다.

public bool VerifySignatureForHash (ReadOnlySpan<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2? signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection? extraCandidates = default);
public bool VerifySignatureForHash (ReadOnlySpan<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = default);
member this.VerifySignatureForHash : ReadOnlySpan<byte> * System.Security.Cryptography.Oid * X509Certificate2 * System.Security.Cryptography.X509Certificates.X509Certificate2Collection -> bool
Public Function VerifySignatureForHash (hash As ReadOnlySpan(Of Byte), hashAlgorithmId As Oid, ByRef signerCertificate As X509Certificate2, Optional extraCandidates As X509Certificate2Collection = Nothing) As Boolean

매개 변수

hash
ReadOnlySpan<Byte>

이 타임스탬프 토큰에 대해 확인할 암호화 해시입니다.

hashAlgorithmId
Oid

해시 알고리즘의 OID입니다.

signerCertificate
X509Certificate2

이 메서드가 반환될 때 이 토큰을 서명한 TSA(타임스탬프 기관)의 인증서이거나 서명자 인증서를 확인할 수 없는 경우 null입니다. 이 매개 변수는 초기화되지 않은 것으로 처리됩니다.

extraCandidates
X509Certificate2Collection

토큰에 포함된 인증서에 더해 TSA(타임스탬프 기관) 인증서로 간주해야 할 선택적인 인증서 컬렉션입니다.

반환

TSA(타임스탬프 기관) 인증서가 있고, 인증서 퍼블릭 키가 토큰 서명의 유효성을 검사하며, 토큰이 제공된 데이터 해시 및 알고리즘의 해시와 일치하면 true이고 그렇지 않으며 false입니다.

설명

이 메서드를 사용하려면 TSA 인증서에 필요한 확장 키 사용 값(1.3.6.1.5.5.7.3.8)이 있어야 하고, 토큰의 포함된 ESSCertID 또는 ESSCertID2 식별자와 일치하고, 토큰의 타임스탬프 값을 포괄하는 유효성 범위가 있으며, 토큰 서명의 유효성을 성공적으로 검사하는 공개 키가 있어야 합니다.

적절한 TSA 인증서를 확인한 후 이 메서드는 제공된 다이제스트 및 알고리즘 식별자를 토큰의 적절한 값과 비교합니다. 다이제스트와 알고리즘이 토큰의 값과 일치하는 경우 인증서는 를 통해 signerCertificate 보고되고 메서드는 를 반환합니다 true.

다이제스트가 일치하지 않거나 알고리즘이 일치하지 않거나 TSA 인증서를 확인할 수 없는 경우 메서드는 를 로 null 보고 signerCertificate 하고 를 반환합니다false.

추가 정보

적용 대상