diff --git a/crypto/blake2/blake2.c b/crypto/blake2/blake2.c index e3c560f804..01ccfca5a8 100644 --- a/crypto/blake2/blake2.c +++ b/crypto/blake2/blake2.c @@ -63,7 +63,7 @@ static void blake2b_transform( size_t num_bytes, int is_final_block) { // https://tools.ietf.org/html/rfc7693#section-3.2 uint64_t v[16]; - OPENSSL_STATIC_ASSERT(sizeof(v) == sizeof(b2b->h) + sizeof(kIV), ""); + OPENSSL_STATIC_ASSERT(sizeof(v) == sizeof(b2b->h) + sizeof(kIV), _); OPENSSL_memcpy(v, b2b->h, sizeof(b2b->h)); OPENSSL_memcpy(&v[8], kIV, sizeof(kIV)); @@ -99,7 +99,7 @@ static void blake2b_transform( void BLAKE2B256_Init(BLAKE2B_CTX *b2b) { OPENSSL_memset(b2b, 0, sizeof(BLAKE2B_CTX)); - OPENSSL_STATIC_ASSERT(sizeof(kIV) == sizeof(b2b->h), ""); + OPENSSL_STATIC_ASSERT(sizeof(kIV) == sizeof(b2b->h), _); OPENSSL_memcpy(&b2b->h, kIV, sizeof(kIV)); // https://tools.ietf.org/html/rfc7693#section-2.5 @@ -145,7 +145,7 @@ void BLAKE2B256_Final(uint8_t out[BLAKE2B256_DIGEST_LENGTH], BLAKE2B_CTX *b2b) { sizeof(b2b->block.bytes) - b2b->block_used); blake2b_transform(b2b, b2b->block.words, b2b->block_used, /*is_final_block=*/1); - OPENSSL_STATIC_ASSERT(BLAKE2B256_DIGEST_LENGTH <= sizeof(b2b->h), ""); + OPENSSL_STATIC_ASSERT(BLAKE2B256_DIGEST_LENGTH <= sizeof(b2b->h), _); memcpy(out, b2b->h, BLAKE2B256_DIGEST_LENGTH); } diff --git a/crypto/cipher_extra/internal.h b/crypto/cipher_extra/internal.h index c2af48e226..8abc6a8edc 100644 --- a/crypto/cipher_extra/internal.h +++ b/crypto/cipher_extra/internal.h @@ -156,9 +156,9 @@ union chacha20_poly1305_seal_data { #if defined(OPENSSL_X86_64) && !defined(OPENSSL_NO_ASM) OPENSSL_STATIC_ASSERT(sizeof(union chacha20_poly1305_open_data) == 48, - "wrong chacha20_poly1305_open_data size"); + _wrong_chacha20_poly1305_open_data_size); OPENSSL_STATIC_ASSERT(sizeof(union chacha20_poly1305_seal_data) == 48 + 8 + 8, - "wrong chacha20_poly1305_seal_data size"); + _wrong_chacha20_poly1305_seal_data_size); OPENSSL_INLINE int chacha20_poly1305_asm_capable(void) { const int sse41_capable = (OPENSSL_ia32cap_P[1] & (1 << 19)) != 0; diff --git a/crypto/fipsmodule/rand/rand.c b/crypto/fipsmodule/rand/rand.c index aa0f05b619..7f39a26a8b 100644 --- a/crypto/fipsmodule/rand/rand.c +++ b/crypto/fipsmodule/rand/rand.c @@ -273,7 +273,7 @@ static void rand_get_seed(struct rand_thread_state *state, BORINGSSL_FIPS_abort(); } - OPENSSL_STATIC_ASSERT(sizeof(entropy) % CRNGT_BLOCK_SIZE == 0, ""); + OPENSSL_STATIC_ASSERT(sizeof(entropy) % CRNGT_BLOCK_SIZE == 0, _); for (size_t i = CRNGT_BLOCK_SIZE; i < sizeof(entropy); i += CRNGT_BLOCK_SIZE) { if (CRYPTO_memcmp(entropy + i - CRNGT_BLOCK_SIZE, entropy + i, diff --git a/crypto/poly1305/poly1305.c b/crypto/poly1305/poly1305.c index 31a567d76c..80a26b0f72 100644 --- a/crypto/poly1305/poly1305.c +++ b/crypto/poly1305/poly1305.c @@ -52,7 +52,7 @@ struct poly1305_state_st { OPENSSL_STATIC_ASSERT( sizeof(struct poly1305_state_st) + 63 <= sizeof(poly1305_state), - "poly1305_state isn't large enough to hold aligned poly1305_state_st"); + _poly1305_state_isn_t_large_enough_to_hold_aligned_poly1305_state_st); static inline struct poly1305_state_st *poly1305_aligned_state( poly1305_state *state) { diff --git a/crypto/poly1305/poly1305_vec.c b/crypto/poly1305/poly1305_vec.c index 83f1efee34..681c99de52 100644 --- a/crypto/poly1305/poly1305_vec.c +++ b/crypto/poly1305/poly1305_vec.c @@ -94,7 +94,7 @@ typedef struct poly1305_state_internal_t { OPENSSL_STATIC_ASSERT( sizeof(struct poly1305_state_internal_t) + 63 <= sizeof(poly1305_state), - "poly1305_state isn't large enough to hold aligned poly1305_state_internal_t"); + _poly1305_state_isn_t_large_enough_to_hold_aligned_poly1305_state_internal_t); static inline poly1305_state_internal *poly1305_aligned_state( poly1305_state *state) { diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h index a4f62447ee..9269553e46 100644 --- a/include/openssl/asn1.h +++ b/include/openssl/asn1.h @@ -923,7 +923,6 @@ BSSL_NAMESPACE_END #define ASN1_R_AUX_ERROR 101 #define ASN1_R_BAD_GET_ASN1_OBJECT_CALL 102 #define ASN1_R_BAD_OBJECT_HEADER 103 -#define ASN1_R_BAD_TEMPLATE 200 #define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 104 #define ASN1_R_BN_LIB 105 #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 diff --git a/tests/ci/valgrind_suppressions_crypto_test.supp b/tests/ci/valgrind_suppressions_crypto_test.supp index b49efbae53..322a58e302 100644 --- a/tests/ci/valgrind_suppressions_crypto_test.supp +++ b/tests/ci/valgrind_suppressions_crypto_test.supp @@ -75,3 +75,71 @@ fun:_ZN7testing8internal7PrintToI13ASN1TestParamEEvRKT_PSo fun:_ZN7testing8internal16UniversalPrinterI13ASN1TestParamE5PrintERKS2_PSo } + +{ + + Memcheck:Cond + fun:_itoa_word + fun:vfprintf + fun:vsnprintf + fun:snprintf + fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo + fun:_ZN7testing12_GLOBAL__N_124PrintBytesInObjectToImplEPKhmPSo + fun:_ZN7testing8internal20PrintBytesInObjectToEPKhmPSo + fun:_ZN7testing8internal15FallbackPrinter10PrintValueI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal17PrintWithFallbackI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal7PrintToI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal16UniversalPrinterI13ASN1TestParamE5PrintERKS2_PSo + fun:_ZN7testing8internal14UniversalPrintI13ASN1TestParamEEvRKT_PSo +} + +{ + + Memcheck:Value8 + fun:_itoa_word + fun:vfprintf + fun:vsnprintf + fun:snprintf + fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo + fun:_ZN7testing12_GLOBAL__N_124PrintBytesInObjectToImplEPKhmPSo + fun:_ZN7testing8internal20PrintBytesInObjectToEPKhmPSo + fun:_ZN7testing8internal15FallbackPrinter10PrintValueI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal17PrintWithFallbackI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal7PrintToI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal16UniversalPrinterI13ASN1TestParamE5PrintERKS2_PSo + fun:_ZN7testing8internal14UniversalPrintI13ASN1TestParamEEvRKT_PSo +} + +{ + + Memcheck:Cond + fun:_itoa_word + fun:vfprintf + fun:vsnprintf + fun:snprintf + fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo + fun:_ZN7testing12_GLOBAL__N_124PrintBytesInObjectToImplEPKhmPSo + fun:_ZN7testing8internal20PrintBytesInObjectToEPKhmPSo + fun:_ZN7testing8internal15FallbackPrinter10PrintValueI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal17PrintWithFallbackI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal7PrintToI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal16UniversalPrinterI13ASN1TestParamE5PrintERKS2_PSo + fun:_ZN7testing8internal14UniversalPrintI13ASN1TestParamEEvRKT_PSo +} + +{ + + Memcheck:Cond + fun:vfprintf + fun:vsnprintf + fun:snprintf + fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo + fun:_ZN7testing12_GLOBAL__N_124PrintBytesInObjectToImplEPKhmPSo + fun:_ZN7testing8internal20PrintBytesInObjectToEPKhmPSo + fun:_ZN7testing8internal15FallbackPrinter10PrintValueI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal17PrintWithFallbackI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal7PrintToI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal16UniversalPrinterI13ASN1TestParamE5PrintERKS2_PSo + fun:_ZN7testing8internal14UniversalPrintI13ASN1TestParamEEvRKT_PSo + fun:_ZN7testing8internal21UniversalTersePrinterI13ASN1TestParamE5PrintERKS2_PSo +}