31#ifndef __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__
32#define __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__
37#define PCD_CRYPTO_SERVICE_ENABLE_FAMILY 0xFFFFFFFF
95 UINT8 GetContextSize : 1;
106 UINT8 GetContextSize : 1;
136 UINT8 GenerateParameter : 1;
137 UINT8 SetParameter : 1;
138 UINT8 GenerateKey : 1;
139 UINT8 ComputeKey : 1;
152 UINT8 VerifyPkcs1 : 1;
157 UINT8 GenerateKey : 1;
160 UINT8 Pkcs1Verify : 1;
161 UINT8 GetPrivateKeyFromPem : 1;
162 UINT8 GetPublicKeyFromX509 : 1;
170 UINT8 GetContextSize : 1;
181 UINT8 GetContextSize : 1;
192 UINT8 GetContextSize : 1;
203 UINT8 GetContextSize : 1;
214 UINT8 GetSubjectName : 1;
215 UINT8 GetCommonName : 1;
216 UINT8 GetOrganizationName : 1;
217 UINT8 VerifyCert : 1;
218 UINT8 ConstructCertificate : 1;
219 UINT8 ConstructCertificateStack : 1;
220 UINT8 ConstructCertificateStackV : 1;
223 UINT8 GetTBSCert : 1;
224 UINT8 GetVersion : 1;
225 UINT8 GetSerialNumber : 1;
226 UINT8 GetIssuerName : 1;
227 UINT8 GetSignatureAlgorithm : 1;
229 UINT8 GetExtendedKeyUsage : 1;
230 UINT8 GetValidity : 1;
231 UINT8 FormatDateTime : 1;
232 UINT8 CompareDateTime : 1;
233 UINT8 GetKeyUsage : 1;
234 UINT8 VerifyCertChain : 1;
235 UINT8 GetCertFromCertChain : 1;
237 UINT8 GetExtendedBasicConstraints : 1;
243 UINT8 GetContextSize : 1;
245 UINT8 EcbEncrypt : 1;
246 UINT8 EcbDecrypt : 1;
247 UINT8 CbcEncrypt : 1;
248 UINT8 CbcDecrypt : 1;
254 UINT8 GetContextSize : 1;
256 UINT8 EcbEncrypt : 1;
257 UINT8 EcbDecrypt : 1;
258 UINT8 CbcEncrypt : 1;
259 UINT8 CbcDecrypt : 1;
265 UINT8 GetContextSize : 1;
275 UINT8 GetContextSize : 1;
286 UINT8 Sha256ExtractAndExpand : 1;
287 UINT8 Sha256Extract : 1;
288 UINT8 Sha256Expand : 1;
289 UINT8 Sha384ExtractAndExpand : 1;
290 UINT8 Sha384Extract : 1;
291 UINT8 Sha384Expand : 1;
302 UINT8 InHandshake : 1;
303 UINT8 DoHandshake : 1;
304 UINT8 HandleAlert : 1;
305 UINT8 CloseNotify : 1;
306 UINT8 CtrlTrafficOut : 1;
307 UINT8 CtrlTrafficIn : 1;
317 UINT8 ConnectionEnd : 1;
318 UINT8 CipherList : 1;
319 UINT8 CompressionMethod : 1;
321 UINT8 VerifyHost : 1;
323 UINT8 CaCertificate : 1;
324 UINT8 HostPublicCert : 1;
325 UINT8 HostPrivateKey : 1;
326 UINT8 CertRevocationList : 1;
327 UINT8 HostPrivateKeyEx : 1;
328 UINT8 SignatureAlgoList : 1;
336 UINT8 ConnectionEnd : 1;
337 UINT8 CurrentCipher : 1;
338 UINT8 CurrentCompressionId : 1;
341 UINT8 ClientRandom : 1;
342 UINT8 ServerRandom : 1;
343 UINT8 KeyMaterial : 1;
344 UINT8 CaCertificate : 1;
345 UINT8 HostPublicCert : 1;
346 UINT8 HostPrivateKey : 1;
347 UINT8 CertRevocationList : 1;
382 UINT8 InverseMod : 1;
395 UINT8 NewContext : 1;
396 UINT8 ContextFree : 1;
405 UINT8 GroupGetCurve : 1;
406 UINT8 GroupGetOrder : 1;
409 UINT8 PointDeInit : 1;
410 UINT8 PointGetAffineCoordinates : 1;
411 UINT8 PointSetAffineCoordinates : 1;
414 UINT8 PointInvert : 1;
415 UINT8 PointIsOnCurve : 1;
416 UINT8 PointIsAtInfinity : 1;
417 UINT8 PointEqual : 1;
418 UINT8 PointSetCompressedCoordinates : 1;
421 UINT8 GenerateKey : 1;
424 UINT8 GetPublicKeyFromX509 : 1;
425 UINT8 GetPrivateKeyFromPem : 1;
BOOLEAN EFIAPI Pkcs5HashPassword(IN UINTN PasswordLength, IN CONST CHAR8 *Password, IN UINTN SaltLength, IN CONST UINT8 *Salt, IN UINTN IterationCount, IN UINTN DigestSize, IN UINTN KeyLength, OUT UINT8 *OutKey)
BOOLEAN EFIAPI Pkcs7Sign(IN CONST UINT8 *PrivateKey, IN UINTN PrivateKeySize, IN CONST UINT8 *KeyPassword, IN UINT8 *InData, IN UINTN InDataSize, IN UINT8 *SignCert, IN UINT8 *OtherCerts OPTIONAL, OUT UINT8 **SignedData, OUT UINTN *SignedDataSize)
BOOLEAN EFIAPI Pkcs7GetSigners(IN CONST UINT8 *P7Data, IN UINTN P7Length, OUT UINT8 **CertStack, OUT UINTN *StackLength, OUT UINT8 **TrustedCert, OUT UINTN *CertLength)
BOOLEAN EFIAPI AuthenticodeVerify(IN CONST UINT8 *AuthData, IN UINTN DataSize, IN CONST UINT8 *TrustedCert, IN UINTN CertSize, IN CONST UINT8 *ImageHash, IN UINTN HashSize)
BOOLEAN EFIAPI Pkcs1v2Encrypt(IN CONST UINT8 *PublicKey, IN UINTN PublicKeySize, IN UINT8 *InData, IN UINTN InDataSize, IN CONST UINT8 *PrngSeed OPTIONAL, IN UINTN PrngSeedSize OPTIONAL, OUT UINT8 **EncryptedData, OUT UINTN *EncryptedDataSize)
BOOLEAN EFIAPI DhComputeKey(IN OUT VOID *DhContext, IN CONST UINT8 *PeerPublicKey, IN UINTN PeerPublicKeySize, OUT UINT8 *Key, IN OUT UINTN *KeySize)
BOOLEAN EFIAPI Asn1GetTag(IN OUT UINT8 **Ptr, IN CONST UINT8 *End, OUT UINTN *Length, IN UINT32 Tag)
BOOLEAN EFIAPI RsaOaepEncrypt(IN VOID *RsaContext, IN UINT8 *InData, IN UINTN InDataSize, IN CONST UINT8 *PrngSeed OPTIONAL, IN UINTN PrngSeedSize OPTIONAL, IN UINT16 DigestLen OPTIONAL, OUT UINT8 **EncryptedData, OUT UINTN *EncryptedDataSize)
BOOLEAN EFIAPI RsaOaepDecrypt(IN VOID *RsaContext, IN UINT8 *EncryptedData, IN UINTN EncryptedDataSize, IN UINT16 DigestLen OPTIONAL, OUT UINT8 **OutData, OUT UINTN *OutDataSize)
BOOLEAN EFIAPI Pkcs7Verify(IN CONST UINT8 *P7Data, IN UINTN P7Length, IN CONST UINT8 *TrustedCert, IN UINTN CertLength, IN CONST UINT8 *InData, IN UINTN DataLength)
RETURN_STATUS EFIAPI VerifyEKUsInPkcs7Signature(IN CONST UINT8 *Pkcs7Signature, IN CONST UINT32 SignatureSize, IN CONST CHAR8 *RequiredEKUs[], IN CONST UINT32 RequiredEKUsSize, IN BOOLEAN RequireAllPresent)
VOID EFIAPI Pkcs7FreeSigners(IN UINT8 *Certs)
BOOLEAN EFIAPI Pkcs7GetAttachedContent(IN CONST UINT8 *P7Data, IN UINTN P7Length, OUT VOID **Content, OUT UINTN *ContentSize)
BOOLEAN EFIAPI ImageTimestampVerify(IN CONST UINT8 *AuthData, IN UINTN DataSize, IN CONST UINT8 *TsaCert, IN UINTN CertSize, OUT EFI_TIME *SigningTime)
BOOLEAN EFIAPI Pkcs1v2Decrypt(IN CONST UINT8 *PrivateKey, IN UINTN PrivateKeySize, IN UINT8 *EncryptedData, IN UINTN EncryptedDataSize, OUT UINT8 **OutData, OUT UINTN *OutDataSize)
BOOLEAN EFIAPI Pkcs7GetCertificatesList(IN CONST UINT8 *P7Data, IN UINTN P7Length, OUT UINT8 **SignerChainCerts, OUT UINTN *ChainLength, OUT UINT8 **UnchainCerts, OUT UINTN *UnchainLength)
STATIC RETURN_STATUS Initialize(VOID)
STATIC BOOLEAN GetExtensionData(CONST mbedtls_x509_crt *Cert, CONST UINT8 *Oid, UINTN OidSize, UINT8 *ExtensionData, UINTN *ExtensionDataSize)