diff options
author | Matt Caswell <matt@openssl.org> | 2018-05-31 15:53:30 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-06-04 11:59:56 +0100 |
commit | 2167239abaec5fa44072fa1194505af0b3fced89 (patch) | |
tree | 60528bbddc4973d9c660c66370f8cd9c33047642 /test/sm2_internal_test.c | |
parent | 206521a06efe10d1eafac5b313ce42850fd75136 (diff) | |
download | openssl-2167239abaec5fa44072fa1194505af0b3fced89.tar.gz |
Use lowercase for internal SM2 symbols
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6386)
Diffstat (limited to 'test/sm2_internal_test.c')
-rw-r--r-- | test/sm2_internal_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/sm2_internal_test.c b/test/sm2_internal_test.c index 272045fc3a..4ae7303329 100644 --- a/test/sm2_internal_test.c +++ b/test/sm2_internal_test.c @@ -161,7 +161,7 @@ static int test_sm2_crypt(const EC_GROUP *group, if (!TEST_ptr(pt) || !TEST_true(EC_POINT_mul(group, pt, priv, NULL, NULL, NULL)) || !TEST_true(EC_KEY_set_public_key(key, pt)) - || !TEST_true(SM2_ciphertext_size(key, digest, msg_len, &ctext_len))) + || !TEST_true(sm2_ciphertext_size(key, digest, msg_len, &ctext_len))) goto done; ctext = OPENSSL_zalloc(ctext_len); @@ -169,7 +169,7 @@ static int test_sm2_crypt(const EC_GROUP *group, goto done; start_fake_rand(k_hex); - if (!TEST_true(SM2_encrypt(key, digest, (const uint8_t *)message, msg_len, + if (!TEST_true(sm2_encrypt(key, digest, (const uint8_t *)message, msg_len, ctext, &ctext_len))) { restore_rand(); goto done; @@ -179,13 +179,13 @@ static int test_sm2_crypt(const EC_GROUP *group, if (!TEST_mem_eq(ctext, ctext_len, expected, ctext_len)) goto done; - if (!TEST_true(SM2_plaintext_size(key, digest, ctext_len, &ptext_len)) + if (!TEST_true(sm2_plaintext_size(key, digest, ctext_len, &ptext_len)) || !TEST_int_eq(ptext_len, msg_len)) goto done; recovered = OPENSSL_zalloc(ptext_len); if (!TEST_ptr(recovered) - || !TEST_true(SM2_decrypt(key, digest, ctext, ctext_len, recovered, &recovered_len)) + || !TEST_true(sm2_decrypt(key, digest, ctext, ctext_len, recovered, &recovered_len)) || !TEST_int_eq(recovered_len, msg_len) || !TEST_mem_eq(recovered, recovered_len, message, msg_len)) goto done; @@ -284,7 +284,7 @@ static int test_sm2_sign(const EC_GROUP *group, goto done; start_fake_rand(k_hex); - sig = SM2_do_sign(key, EVP_sm3(), userid, (const uint8_t *)message, msg_len); + sig = sm2_do_sign(key, EVP_sm3(), userid, (const uint8_t *)message, msg_len); restore_rand(); if (!TEST_ptr(sig)) @@ -298,7 +298,7 @@ static int test_sm2_sign(const EC_GROUP *group, || !TEST_BN_eq(s, sig_s)) goto done; - ok = SM2_do_verify(key, EVP_sm3(), sig, userid, (const uint8_t *)message, + ok = sm2_do_verify(key, EVP_sm3(), sig, userid, (const uint8_t *)message, msg_len); /* We goto done whether this passes or fails */ |