TianoCore EDK2 master
Loading...
Searching...
No Matches
CryptTs.c File Reference
#include "InternalCryptLib.h"
#include <mbedtls/asn1.h>

Go to the source code of this file.

Functions

STATIC BOOLEAN ConvertAsn1TimeToEfiTime (IN UINT8 *Ptr, OUT EFI_TIME *EfiTime)
 
BOOLEAN EFIAPI ImageTimestampVerify (IN CONST UINT8 *AuthData, IN UINTN DataSize, IN CONST UINT8 *TsaCert, IN UINTN CertSize, OUT EFI_TIME *SigningTime)
 

Variables

GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 mSpcRFC3161OidValue []
 

Detailed Description

RFC3161 Timestamp Countersignature Verification Wrapper Implementation which does not provide real capabilities.

Copyright (c) 2024, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CryptTs.c.

Function Documentation

◆ ConvertAsn1TimeToEfiTime()

STATIC BOOLEAN ConvertAsn1TimeToEfiTime ( IN UINT8 *  Ptr,
OUT EFI_TIME EfiTime 
)

Convert ASN.1 GeneralizedTime to EFI Time.

Parameters
[in]PtrPointer to the ASN.1 GeneralizedTime to be converted.
[out]EfiTimeReturn the corresponding EFI Time.
Return values
TRUEThe time conversion succeeds.
FALSEInvalid parameters.

Definition at line 32 of file CryptTs.c.

◆ ImageTimestampVerify()

BOOLEAN EFIAPI ImageTimestampVerify ( IN CONST UINT8 *  AuthData,
IN UINTN  DataSize,
IN CONST UINT8 *  TsaCert,
IN UINTN  CertSize,
OUT EFI_TIME SigningTime 
)

Verifies the validity of a RFC3161 Timestamp CounterSignature embedded in PE/COFF Authenticode signature.

Return FALSE to indicate this interface is not supported.

Parameters
[in]AuthDataPointer to the Authenticode Signature retrieved from signed PE/COFF image to be verified.
[in]DataSizeSize of the Authenticode Signature in bytes.
[in]TsaCertPointer to a trusted/root TSA certificate encoded in DER, which is used for TSA certificate chain verification.
[in]CertSizeSize of the trusted certificate in bytes.
[out]SigningTimeReturn the time of timestamp generation time if the timestamp signature is valid.
Return values
FALSEThis interface is not supported.

Definition at line 113 of file CryptTs.c.

Variable Documentation

◆ mSpcRFC3161OidValue

GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 mSpcRFC3161OidValue[]
Initial value:
= {
0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x03, 0x03, 0x01
}

Definition at line 16 of file CryptTs.c.