Improve use of the test framework in the SM2 internal tests
[openssl.git] / crypto / include / internal / sm2.h
index af24c0146b9c9e21685b553f2520ac900d1dd842..91420a520ca9bbc798184361e2786b950fd5c6f5 100644 (file)
@@ -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