]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
API renaming
authorDmitry Belyavskiy <beldmit@gmail.com>
Thu, 6 Aug 2020 15:04:27 +0000 (18:04 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Thu, 6 Aug 2020 15:04:27 +0000 (18:04 +0300)
test_digest.c

index 06b3db466e51c491ee1838d16b5a48c80914bfd5..6a355337dce2a479af876f2c54241656dd29e594 100644 (file)
@@ -529,7 +529,7 @@ static int do_hmac_prov(int iter, const EVP_MD *type, const char *plaintext,
     EVP_MAC *hmac;
     T(hmac = EVP_MAC_fetch(NULL, "HMAC", NULL));
     EVP_MAC_CTX *ctx;
-    T(ctx = EVP_MAC_new_ctx(hmac));
+    T(ctx = EVP_MAC_CTX_new(hmac));
     OSSL_PARAM params[] = {
        OSSL_PARAM_utf8_string(OSSL_MAC_PARAM_DIGEST,
            (char *)EVP_MD_name(type), 0),
@@ -537,11 +537,11 @@ static int do_hmac_prov(int iter, const EVP_MD *type, const char *plaintext,
            (char *)t->key, t->key_size),
        OSSL_PARAM_END
     };
-    T(EVP_MAC_set_ctx_params(ctx, params));
+    T(EVP_MAC_CTX_set_params(ctx, params));
     T(EVP_MAC_init(ctx));
     T(EVP_MAC_update(ctx, (unsigned char *)plaintext, t->psize));
     T(EVP_MAC_final(ctx, md, &len, EVP_MAX_MD_SIZE));
-    EVP_MAC_free_ctx(ctx);
+    EVP_MAC_CTX_free(ctx);
     EVP_MAC_free(hmac);
 
     if (t->mdsize)
@@ -606,17 +606,17 @@ static int do_cmac_prov(int iter, const char *plaintext,
     EVP_MAC *cmac;
     T(cmac = EVP_MAC_fetch(NULL, "CMAC", NULL));
     EVP_MAC_CTX *ctx;
-    T(ctx = EVP_MAC_new_ctx(cmac));
+    T(ctx = EVP_MAC_CTX_new(cmac));
     OSSL_PARAM params[] = {
        OSSL_PARAM_utf8_string(OSSL_MAC_PARAM_CIPHER, mdname, 0),
        OSSL_PARAM_octet_string(OSSL_MAC_PARAM_KEY, (char *)t->key, t->key_size),
        OSSL_PARAM_END
     };
-    T(EVP_MAC_set_ctx_params(ctx, params));
+    T(EVP_MAC_CTX_set_params(ctx, params));
     T(EVP_MAC_init(ctx));
     T(EVP_MAC_update(ctx, (unsigned char *)plaintext, t->psize));
     T(EVP_MAC_final(ctx, md, &len, EVP_MAX_MD_SIZE));
-    EVP_MAC_free_ctx(ctx);
+    EVP_MAC_CTX_free(ctx);
     EVP_MAC_free(cmac);
 
     /* CMAC provider will not respect outsize, and will output full block.