From 157630bcc475221f1639b2a372eef2c772a0c52e Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Mon, 23 Dec 2019 15:25:28 -0500 Subject: [PATCH] tpm2: Comment unused hash and RSA related functions Signed-off-by: Stefan Berger --- src/tpm2/crypto/openssl/CryptHash.c | 4 ++++ src/tpm2/crypto/openssl/CryptPrimeSieve.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/tpm2/crypto/openssl/CryptHash.c b/src/tpm2/crypto/openssl/CryptHash.c index 62b1b613..3d8bcfbd 100644 --- a/src/tpm2/crypto/openssl/CryptHash.c +++ b/src/tpm2/crypto/openssl/CryptHash.c @@ -213,6 +213,7 @@ CryptHashGetBlockSize( /* 10.2.13.4.7 CryptHashGetOid() */ /* This function returns a pointer to DER=encoded OID for a hash algorithm. All OIDs are full OID values including the Tag (0x06) and length byte. */ +#if 0 // libtpms added LIB_EXPORT const BYTE * CryptHashGetOid( TPM_ALG_ID hashAlg @@ -220,8 +221,10 @@ CryptHashGetOid( { return CryptGetHashDef(hashAlg)->OID; } +#endif // libtpms added /* 10.2.13.4.8 CryptHashGetContextAlg() */ /* This function returns the hash algorithm associated with a hash context. */ +#if 0 // libtpms added TPM_ALG_ID CryptHashGetContextAlg( PHASH_STATE state // IN: the context to check @@ -229,6 +232,7 @@ CryptHashGetContextAlg( { return state->hashAlg; } +#endif // libtpms added /* 10.2.13.5 State Import and Export */ /* 10.2.13.5.1 CryptHashCopyState */ /* This function is used to clone a HASH_STATE. */ diff --git a/src/tpm2/crypto/openssl/CryptPrimeSieve.c b/src/tpm2/crypto/openssl/CryptPrimeSieve.c index 9047a2d8..d3b1e91f 100644 --- a/src/tpm2/crypto/openssl/CryptPrimeSieve.c +++ b/src/tpm2/crypto/openssl/CryptPrimeSieve.c @@ -542,6 +542,7 @@ GetSieveStats( #if !RSA_INSTRUMENT //*** RsaSimulationEnd() // Stub for call when not doing instrumentation. +#if 0 // libtpms added void RsaSimulationEnd( void @@ -549,4 +550,5 @@ RsaSimulationEnd( { return; } +#endif // libtpms added #endif