Add DSA_bits() function.
[openssl.git] / crypto / dsa / dsa_ameth.c
index b30368e32e33445df01f0e3c4dc8611473527463..f2f2cf5f556969ccbe5478f4668337366fdf62c5 100644 (file)
@@ -254,7 +254,7 @@ static int int_dsa_size(const EVP_PKEY *pkey)
 
 static int dsa_bits(const EVP_PKEY *pkey)
 {
-    return BN_num_bits(pkey->pkey.dsa->p);
+    return DSA_bits(pkey->pkey.dsa);
 }
 
 static int dsa_security_bits(const EVP_PKEY *pkey)
@@ -437,9 +437,9 @@ static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
     dsa_sig = d2i_DSA_SIG(NULL, &p, sig->length);
     if (dsa_sig) {
         int rv = 0;
-        BIGNUM *r, *s;
+        const BIGNUM *r, *s;
 
-        DSA_SIG_get0(&r, &s, dsa_sig);
+        DSA_SIG_get0(dsa_sig, &r, &s);
 
         if (BIO_write(bp, "\n", 1) != 1)
             goto err;