From e14d6cf691c9d8ad49df280b580b6836a67c6a19 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 31 May 2018 13:49:47 +0100 Subject: Improve use of the test framework in the SM2 internal tests Also general clean up of those tests Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6386) --- crypto/include/internal/sm2.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'crypto/include/internal') diff --git a/crypto/include/internal/sm2.h b/crypto/include/internal/sm2.h index af24c0146b..91420a520c 100644 --- a/crypto/include/internal/sm2.h +++ b/crypto/include/internal/sm2.h @@ -57,13 +57,11 @@ int SM2_verify(int type, const unsigned char *dgst, int dgstlen, /* * SM2 encryption */ -size_t SM2_ciphertext_size(const EC_KEY *key, - const EVP_MD *digest, - size_t msg_len); +int SM2_ciphertext_size(const EC_KEY *key, const EVP_MD *digest, size_t msg_len, + size_t *ct_size); -size_t SM2_plaintext_size(const EC_KEY *key, - const EVP_MD *digest, - size_t msg_len); +int SM2_plaintext_size(const EC_KEY *key, const EVP_MD *digest, size_t msg_len, + size_t *pt_size); int SM2_encrypt(const EC_KEY *key, const EVP_MD *digest, @@ -76,8 +74,6 @@ int SM2_decrypt(const EC_KEY *key, const uint8_t *ciphertext, size_t ciphertext_len, uint8_t *ptext_buf, size_t *ptext_len); -int ERR_load_SM2_strings(void); - # ifdef __cplusplus } # endif -- cgit v1.2.3