]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix external symbols related to dsa keys
authorShane Lontis <shane.lontis@oracle.com>
Thu, 18 Feb 2021 06:30:37 +0000 (16:30 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Fri, 26 Feb 2021 00:50:30 +0000 (10:50 +1000)
Partial fix for #12964

This adds ossl_ names for the following symbols:

dsa_check_pairwise, dsa_check_params, dsa_check_priv_key, dsa_check_pub_key, dsa_check_pub_key_partial,
dsa_do_sign_int, dsa_ffc_params_fromdata,
dsa_generate_ffc_parameters, dsa_generate_public_key,
dsa_get0_params, dsa_key_fromdata, dsa_new_with_ctx, dsa_pkey_method, dsa_sign_int

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14231)

16 files changed:
crypto/dsa/dsa_ameth.c
crypto/dsa/dsa_backend.c
crypto/dsa/dsa_check.c
crypto/dsa/dsa_gen.c
crypto/dsa/dsa_key.c
crypto/dsa/dsa_lib.c
crypto/dsa/dsa_local.h
crypto/dsa/dsa_ossl.c
crypto/dsa/dsa_pmeth.c
crypto/dsa/dsa_sign.c
crypto/evp/pmeth_lib.c
include/crypto/dsa.h
include/crypto/evp.h
providers/implementations/encode_decode/encode_key2text.c
providers/implementations/keymgmt/dsa_kmgmt.c
providers/implementations/signature/dsa.c

index 3b35a7005efe4d5378304283bdc39fac6d960071..c073f6b799c42086a4c13041bb663c0ff5bd5607 100644 (file)
@@ -539,15 +539,15 @@ static int dsa_pkey_import_from(const OSSL_PARAM params[], void *vpctx)
 {
     EVP_PKEY_CTX *pctx = vpctx;
     EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx);
-    DSA *dsa = dsa_new_with_ctx(pctx->libctx);
+    DSA *dsa = ossl_dsa_new(pctx->libctx);
 
     if (dsa == NULL) {
         ERR_raise(ERR_LIB_DSA, ERR_R_MALLOC_FAILURE);
         return 0;
     }
 
-    if (!dsa_ffc_params_fromdata(dsa, params)
-        || !dsa_key_fromdata(dsa, params)
+    if (!ossl_dsa_ffc_params_fromdata(dsa, params)
+        || !ossl_dsa_key_fromdata(dsa, params)
         || !EVP_PKEY_assign_DSA(pkey, dsa)) {
         DSA_free(dsa);
         return 0;
index d24d08eebda55510501eaa2579c2260926167140..e6f8f3645ed02ac1b6895e9567293a5adfb23b5a 100644 (file)
@@ -22,7 +22,7 @@
  * implementations alike.
  */
 
-int dsa_key_fromdata(DSA *dsa, const OSSL_PARAM params[])
+int ossl_dsa_key_fromdata(DSA *dsa, const OSSL_PARAM params[])
 {
     const OSSL_PARAM *param_priv_key, *param_pub_key;
     BIGNUM *priv_key = NULL, *pub_key = NULL;
index 7f56a785ab4dc80e00c17078035598f55a539d57..705c7d22a0f84493323fcb1b25e3b70c9709df9d 100644 (file)
@@ -19,7 +19,7 @@
 #include "dsa_local.h"
 #include "crypto/dsa.h"
 
-int dsa_check_params(const DSA *dsa, int checktype, int *ret)
+int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret)
 {
     if (checktype == OSSL_KEYMGMT_VALIDATE_QUICK_CHECK)
         return ossl_ffc_params_simple_validate(dsa->libctx, &dsa->params,
@@ -37,7 +37,7 @@ int dsa_check_params(const DSA *dsa, int checktype, int *ret)
 /*
  * See SP800-56Ar3 Section 5.6.2.3.1 : FFC Full public key validation.
  */
-int dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret)
+int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret)
 {
     return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret);
 }
@@ -47,12 +47,12 @@ int dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret)
  * To only be used with ephemeral FFC public keys generated using the approved
  * safe-prime groups.
  */
-int dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret)
+int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret)
 {
     return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret);
 }
 
-int dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret)
+int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret)
 {
     *ret = 0;
 
@@ -64,7 +64,7 @@ int dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret)
  * FFC pairwise check from SP800-56A R3.
  *    Section 5.6.2.1.4 Owner Assurance of Pair-wise Consistency
  */
-int dsa_check_pairwise(const DSA *dsa)
+int ossl_dsa_check_pairwise(const DSA *dsa)
 {
     int ret = 0;
     BN_CTX *ctx = NULL;
@@ -84,7 +84,7 @@ int dsa_check_pairwise(const DSA *dsa)
         goto err;
 
     /* recalculate the public key = (g ^ priv) mod p */
-    if (!dsa_generate_public_key(ctx, dsa, dsa->priv_key, pub_key))
+    if (!ossl_dsa_generate_public_key(ctx, dsa, dsa->priv_key, pub_key))
         goto err;
     /* check it matches the existing pubic_key */
     ret = BN_cmp(pub_key, dsa->pub_key) == 0;
index 9d6d9a8d4acbd6350d46128e4f908a95549e9a27..2be9f48e272fb949c7dab8b8eb60eb20850cf958 100644 (file)
@@ -23,8 +23,8 @@
 #include "crypto/dsa.h"
 #include "dsa_local.h"
 
-int dsa_generate_ffc_parameters(DSA *dsa, int type, int pbits, int qbits,
-                                BN_GENCB *cb)
+int ossl_dsa_generate_ffc_parameters(DSA *dsa, int type, int pbits, int qbits,
+                                     BN_GENCB *cb)
 {
     int ret = 0, res;
 
@@ -59,12 +59,12 @@ int DSA_generate_parameters_ex(DSA *dsa, int bits,
 
     /* The old code used FIPS 186-2 DSA Parameter generation */
     if (bits <= 1024 && seed_len == 20) {
-        if (!dsa_generate_ffc_parameters(dsa, DSA_PARAMGEN_TYPE_FIPS_186_2,
-                                         bits, 160, cb))
+        if (!ossl_dsa_generate_ffc_parameters(dsa, DSA_PARAMGEN_TYPE_FIPS_186_2,
+                                              bits, 160, cb))
             return 0;
     } else {
-        if (!dsa_generate_ffc_parameters(dsa, DSA_PARAMGEN_TYPE_FIPS_186_4,
-                                         bits, 0, cb))
+        if (!ossl_dsa_generate_ffc_parameters(dsa, DSA_PARAMGEN_TYPE_FIPS_186_4,
+                                              bits, 0, cb))
             return 0;
     }
 
index 8646d01957f1ab8a661bc282e481ccc9d386ee49..2b7dc4e43d58cb66d3f0ede7bb9e1f2d2769f9bb 100644 (file)
@@ -40,8 +40,8 @@ int DSA_generate_key(DSA *dsa)
     return dsa_keygen(dsa, 0);
 }
 
-int dsa_generate_public_key(BN_CTX *ctx, const DSA *dsa, const BIGNUM *priv_key,
-                            BIGNUM *pub_key)
+int ossl_dsa_generate_public_key(BN_CTX *ctx, const DSA *dsa,
+                                 const BIGNUM *priv_key, BIGNUM *pub_key)
 {
     int ret = 0;
     BIGNUM *prk = BN_new();
@@ -97,7 +97,7 @@ static int dsa_keygen(DSA *dsa, int pairwise_test)
         pub_key = dsa->pub_key;
     }
 
-    if (!dsa_generate_public_key(ctx, dsa, priv_key, pub_key))
+    if (!ossl_dsa_generate_public_key(ctx, dsa, priv_key, pub_key))
         goto err;
 
     dsa->priv_key = priv_key;
index 0c84a6294fc8bb50dcb992637bf34dd74149ef38..5de633e11ee1d57b92345a6c93ad91e69316a85c 100644 (file)
@@ -190,7 +190,7 @@ DSA *DSA_new_method(ENGINE *engine)
     return dsa_new_intern(engine, NULL);
 }
 
-DSA *dsa_new_with_ctx(OSSL_LIB_CTX *libctx)
+DSA *ossl_dsa_new(OSSL_LIB_CTX *libctx)
 {
     return dsa_new_intern(NULL, libctx);
 }
@@ -336,19 +336,19 @@ int DSA_bits(const DSA *dsa)
     return -1;
 }
 
-FFC_PARAMS *dsa_get0_params(DSA *dsa)
+FFC_PARAMS *ossl_dsa_get0_params(DSA *dsa)
 {
     return &dsa->params;
 }
 
-int dsa_ffc_params_fromdata(DSA *dsa, const OSSL_PARAM params[])
+int ossl_dsa_ffc_params_fromdata(DSA *dsa, const OSSL_PARAM params[])
 {
     int ret;
     FFC_PARAMS *ffc;
 
     if (dsa == NULL)
         return 0;
-    ffc = dsa_get0_params(dsa);
+    ffc = ossl_dsa_get0_params(dsa);
     if (ffc == NULL)
         return 0;
 
index 240e84f11e1adbedf74b227fec9bc9148a4b15d1..c4ed654b99dda82a1f0c1f9a790a01e0c8945ec2 100644 (file)
@@ -69,4 +69,4 @@ struct dsa_method {
     int (*dsa_keygen) (DSA *dsa);
 };
 
-DSA_SIG *dsa_do_sign_int(const unsigned char *dgst, int dlen, DSA *dsa);
+DSA_SIG *ossl_dsa_do_sign_int(const unsigned char *dgst, int dlen, DSA *dsa);
index bd51a2c716bf84a4d67ba95d4cac9701ab168333..2f8cbe8ad403738d9ba213860bbeebf836a46680 100644 (file)
@@ -67,7 +67,7 @@ const DSA_METHOD *DSA_OpenSSL(void)
     return &openssl_dsa_meth;
 }
 
-DSA_SIG *dsa_do_sign_int(const unsigned char *dgst, int dlen, DSA *dsa)
+DSA_SIG *ossl_dsa_do_sign_int(const unsigned char *dgst, int dlen, DSA *dsa)
 {
     BIGNUM *kinv = NULL;
     BIGNUM *m, *blind, *blindm, *tmp;
@@ -185,7 +185,7 @@ DSA_SIG *dsa_do_sign_int(const unsigned char *dgst, int dlen, DSA *dsa)
 
 static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
 {
-    return dsa_do_sign_int(dgst, dlen, dsa);
+    return ossl_dsa_do_sign_int(dgst, dlen, dsa);
 }
 
 static int dsa_sign_setup_no_digest(DSA *dsa, BN_CTX *ctx_in,
index 909be63867d866869900277038f7a1c0c241db27..e5709b62c901aa5b046e0c96e00d51ba61f5121c 100644 (file)
@@ -281,7 +281,7 @@ static const EVP_PKEY_METHOD dsa_pkey_meth = {
     pkey_dsa_ctrl_str
 };
 
-const EVP_PKEY_METHOD *dsa_pkey_method(void)
+const EVP_PKEY_METHOD *ossl_dsa_pkey_method(void)
 {
     return &dsa_pkey_meth;
 }
index 0f866c12fec06f5c515ca12316aa018b7235e24c..84817d300980ba7c3ec4351693fd083e6f53cf08 100644 (file)
@@ -150,8 +150,8 @@ int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
     return 1;
 }
 
-int dsa_sign_int(int type, const unsigned char *dgst,
-                 int dlen, unsigned char *sig, unsigned int *siglen, DSA *dsa)
+int ossl_dsa_sign_int(int type, const unsigned char *dgst, int dlen,
+                      unsigned char *sig, unsigned int *siglen, DSA *dsa)
 {
     DSA_SIG *s;
 
@@ -159,7 +159,7 @@ int dsa_sign_int(int type, const unsigned char *dgst,
     if (dsa->libctx == NULL || dsa->meth != DSA_get_default_method())
         s = DSA_do_sign(dgst, dlen, dsa);
     else
-        s = dsa_do_sign_int(dgst, dlen, dsa);
+        s = ossl_dsa_do_sign_int(dgst, dlen, dsa);
     if (s == NULL) {
         *siglen = 0;
         return 0;
@@ -172,7 +172,7 @@ int dsa_sign_int(int type, const unsigned char *dgst,
 int DSA_sign(int type, const unsigned char *dgst, int dlen,
              unsigned char *sig, unsigned int *siglen, DSA *dsa)
 {
-    return dsa_sign_int(type, dgst, dlen, sig, siglen, dsa);
+    return ossl_dsa_sign_int(type, dgst, dlen, sig, siglen, dsa);
 }
 
 /* data has already been hashed (probably with SHA or SHA-1). */
@@ -206,4 +206,3 @@ int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
     DSA_SIG_free(s);
     return ret;
 }
-
index 9499d666bd7e624713acc2d819653833fea50a09..def0e92a376f9a84c98fe6d6fdcddd0e69b818a0 100644 (file)
@@ -54,7 +54,7 @@ static pmeth_fn standard_methods[] = {
     ossl_dh_pkey_method,
 # endif
 # ifndef OPENSSL_NO_DSA
-    dsa_pkey_method,
+    ossl_dsa_pkey_method,
 # endif
 # ifndef OPENSSL_NO_EC
     ec_pkey_method,
index a47fbcd84174db505605932e789e9fdc5c089077..331baf320ef302876a5030c7281097f6e1a97875 100644 (file)
 #define DSA_PARAMGEN_TYPE_FIPS_186_4   0   /* Use FIPS186-4 standard */
 #define DSA_PARAMGEN_TYPE_FIPS_186_2   1   /* Use legacy FIPS186-2 standard */
 
-DSA *dsa_new_with_ctx(OSSL_LIB_CTX *libctx);
+DSA *ossl_dsa_new(OSSL_LIB_CTX *libctx);
 void ossl_dsa_set0_libctx(DSA *d, OSSL_LIB_CTX *libctx);
 
-int dsa_generate_ffc_parameters(DSA *dsa, int type, int pbits, int qbits,
-                                BN_GENCB *cb);
+int ossl_dsa_generate_ffc_parameters(DSA *dsa, int type, int pbits, int qbits,
+                                     BN_GENCB *cb);
 
-int dsa_sign_int(int type, const unsigned char *dgst,
-                 int dlen, unsigned char *sig, unsigned int *siglen, DSA *dsa);
+int ossl_dsa_sign_int(int type, const unsigned char *dgst, int dlen,
+                      unsigned char *sig, unsigned int *siglen, DSA *dsa);
 
-FFC_PARAMS *dsa_get0_params(DSA *dsa);
-int dsa_ffc_params_fromdata(DSA *dsa, const OSSL_PARAM params[]);
-int dsa_key_fromdata(DSA *dsa, const OSSL_PARAM params[]);
+FFC_PARAMS *ossl_dsa_get0_params(DSA *dsa);
+int ossl_dsa_ffc_params_fromdata(DSA *dsa, const OSSL_PARAM params[]);
+int ossl_dsa_key_fromdata(DSA *dsa, const OSSL_PARAM params[]);
 
-int dsa_generate_public_key(BN_CTX *ctx, const DSA *dsa, const BIGNUM *priv_key,
-                            BIGNUM *pub_key);
-int dsa_check_params(const DSA *dsa, int checktype, int *ret);
-int dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret);
-int dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret);
-int dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret);
-int dsa_check_pairwise(const DSA *dsa);
+int ossl_dsa_generate_public_key(BN_CTX *ctx, const DSA *dsa,
+                                 const BIGNUM *priv_key, BIGNUM *pub_key);
+int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret);
+int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret);
+int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key,
+                                   int *ret);
+int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret);
+int ossl_dsa_check_pairwise(const DSA *dsa);
 
 #endif
index e48afbf203deebe7254f4525f6f38156b2a2b9ba..1b0a00dac284e918e1b73b82936c7162912fe61b 100644 (file)
@@ -181,7 +181,7 @@ void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx);
 
 const EVP_PKEY_METHOD *ossl_dh_pkey_method(void);
 const EVP_PKEY_METHOD *ossl_dhx_pkey_method(void);
-const EVP_PKEY_METHOD *dsa_pkey_method(void);
+const EVP_PKEY_METHOD *ossl_dsa_pkey_method(void);
 const EVP_PKEY_METHOD *ec_pkey_method(void);
 const EVP_PKEY_METHOD *ecx25519_pkey_method(void);
 const EVP_PKEY_METHOD *ecx448_pkey_method(void);
index 4b4cfc8fa77e52e07006817bba6ae8059c789314..103a647467c9e602654d7c30af6b080ee2214813 100644 (file)
@@ -24,7 +24,7 @@
 #include "internal/ffc.h"
 #include "crypto/bn.h"           /* bn_get_words() */
 #include "crypto/dh.h"           /* ossl_dh_get0_params() */
-#include "crypto/dsa.h"          /* dsa_get0_params() */
+#include "crypto/dsa.h"          /* ossl_dsa_get0_params() */
 #include "crypto/ec.h"           /* ec_key_get_libctx */
 #include "crypto/ecx.h"          /* ECX_KEY, etc... */
 #include "crypto/rsa.h"          /* RSA_PSS_PARAMS_30, etc... */
@@ -315,7 +315,7 @@ static int dsa_to_text(BIO *out, const void *key, int selection)
         }
     }
     if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
-        params = dsa_get0_params((DSA *)dsa);
+        params = ossl_dsa_get0_params((DSA *)dsa);
         if (params == NULL) {
             ERR_raise(ERR_LIB_PROV, PROV_R_NOT_PARAMETERS);
             return 0;
index a02a3e6b01008c3574fbcc04f6d9195b8f1a88db..18313aa32935c2e3dfe13b4cada1263da8fd4551 100644 (file)
@@ -117,7 +117,7 @@ static void *dsa_newdata(void *provctx)
 {
     if (!ossl_prov_is_running())
         return NULL;
-    return dsa_new_with_ctx(PROV_LIBCTX_OF(provctx));
+    return ossl_dsa_new(PROV_LIBCTX_OF(provctx));
 }
 
 static void dsa_freedata(void *keydata)
@@ -160,8 +160,8 @@ static int dsa_match(const void *keydata1, const void *keydata2, int selection)
         ok = ok
             && BN_cmp(DSA_get0_priv_key(dsa1), DSA_get0_priv_key(dsa2)) == 0;
     if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
-        FFC_PARAMS *dsaparams1 = dsa_get0_params((DSA *)dsa1);
-        FFC_PARAMS *dsaparams2 = dsa_get0_params((DSA *)dsa2);
+        FFC_PARAMS *dsaparams1 = ossl_dsa_get0_params((DSA *)dsa1);
+        FFC_PARAMS *dsaparams2 = ossl_dsa_get0_params((DSA *)dsa2);
 
         ok = ok && ossl_ffc_params_cmp(dsaparams1, dsaparams2, 1);
     }
@@ -180,9 +180,9 @@ static int dsa_import(void *keydata, int selection, const OSSL_PARAM params[])
         return 0;
 
     if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0)
-        ok = ok && dsa_ffc_params_fromdata(dsa, params);
+        ok = ok && ossl_dsa_ffc_params_fromdata(dsa, params);
     if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
-        ok = ok && dsa_key_fromdata(dsa, params);
+        ok = ok && ossl_dsa_key_fromdata(dsa, params);
 
     return ok;
 }
@@ -199,7 +199,7 @@ static int dsa_export(void *keydata, int selection, OSSL_CALLBACK *param_cb,
         goto err;
 
     if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0)
-        ok = ok && ossl_ffc_params_todata(dsa_get0_params(dsa), tmpl, NULL);
+        ok = ok && ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), tmpl, NULL);
     if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
         ok = ok && dsa_key_todata(dsa, tmpl, NULL);
 
@@ -289,7 +289,7 @@ static ossl_inline int dsa_get_params(void *key, OSSL_PARAM params[])
     if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
         && !OSSL_PARAM_set_utf8_string(p, DSA_DEFAULT_MD))
         return 0;
-    return ossl_ffc_params_todata(dsa_get0_params(dsa), NULL, params)
+    return ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), NULL, params)
            && dsa_key_todata(dsa, NULL, params);
 }
 
@@ -313,7 +313,7 @@ static int dsa_validate_domparams(const DSA *dsa, int checktype)
 {
     int status = 0;
 
-    return dsa_check_params(dsa, checktype, &status);
+    return ossl_dsa_check_params(dsa, checktype, &status);
 }
 
 static int dsa_validate_public(const DSA *dsa)
@@ -324,7 +324,7 @@ static int dsa_validate_public(const DSA *dsa)
     DSA_get0_key(dsa, &pub_key, NULL);
     if (pub_key == NULL)
         return 0;
-    return dsa_check_pub_key(dsa, pub_key, &status);
+    return ossl_dsa_check_pub_key(dsa, pub_key, &status);
 }
 
 static int dsa_validate_private(const DSA *dsa)
@@ -335,7 +335,7 @@ static int dsa_validate_private(const DSA *dsa)
     DSA_get0_key(dsa, NULL, &priv_key);
     if (priv_key == NULL)
         return 0;
-    return dsa_check_priv_key(dsa, priv_key, &status);
+    return ossl_dsa_check_priv_key(dsa, priv_key, &status);
 }
 
 static int dsa_validate(const void *keydata, int selection, int checktype)
@@ -361,7 +361,7 @@ static int dsa_validate(const void *keydata, int selection, int checktype)
     /* If the whole key is selected, we do a pairwise validation */
     if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR)
         == OSSL_KEYMGMT_SELECT_KEYPAIR)
-        ok = ok && dsa_check_pairwise(dsa);
+        ok = ok && ossl_dsa_check_pairwise(dsa);
     return ok;
 }
 
@@ -397,7 +397,7 @@ static int dsa_gen_set_template(void *genctx, void *templ)
 
     if (!ossl_prov_is_running() || gctx == NULL || dsa == NULL)
         return 0;
-    gctx->ffc_params = dsa_get0_params(dsa);
+    gctx->ffc_params = ossl_dsa_get0_params(dsa);
     return 1;
 }
 
@@ -514,7 +514,7 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg)
 
     if (!ossl_prov_is_running() || gctx == NULL)
         return NULL;
-    dsa = dsa_new_with_ctx(gctx->libctx);
+    dsa = ossl_dsa_new(gctx->libctx);
     if (dsa == NULL)
         return NULL;
 
@@ -524,7 +524,7 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg)
     if (gencb != NULL)
         BN_GENCB_set(gencb, dsa_gencb, genctx);
 
-    ffc = dsa_get0_params(dsa);
+    ffc = ossl_dsa_get0_params(dsa);
     /* Copy the template value if one was passed */
     if (gctx->ffc_params != NULL
         && !ossl_ffc_params_copy(ffc, gctx->ffc_params))
@@ -546,9 +546,9 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg)
     }
     if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
 
-         if (dsa_generate_ffc_parameters(dsa, gctx->gen_type,
-                                         gctx->pbits, gctx->qbits,
-                                         gencb) <= 0)
+         if (ossl_dsa_generate_ffc_parameters(dsa, gctx->gen_type,
+                                              gctx->pbits, gctx->qbits,
+                                              gencb) <= 0)
              goto end;
     }
     ossl_ffc_params_enable_flags(ffc, FFC_PARAM_FLAG_VALIDATE_LEGACY,
index 620bfa845c19eae013407d665a5547113fea05cb..81e435c4198a5a8f09027a2297b9b5b7daa5fe89 100644 (file)
@@ -223,7 +223,7 @@ static int dsa_sign(void *vpdsactx, unsigned char *sig, size_t *siglen,
     if (mdsize != 0 && tbslen != mdsize)
         return 0;
 
-    ret = dsa_sign_int(0, tbs, tbslen, sig, &sltmp, pdsactx->dsa);
+    ret = ossl_dsa_sign_int(0, tbs, tbslen, sig, &sltmp, pdsactx->dsa);
     if (ret <= 0)
         return 0;