Add functions returning security bits.
[openssl.git] / crypto / rsa / rsa_ameth.c
index 929193b..04d9f62 100644 (file)
@@ -170,6 +170,11 @@ static int rsa_bits(const EVP_PKEY *pkey)
        return BN_num_bits(pkey->pkey.rsa->n);
        }
 
+static int rsa_security_bits(const EVP_PKEY *pkey)
+       {
+       return RSA_security_bits(pkey->pkey.rsa);
+       }
+
 static void int_rsa_free(EVP_PKEY *pkey)
        {
        RSA_free(pkey->pkey.rsa);
@@ -993,6 +998,7 @@ const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[] =
 
                int_rsa_size,
                rsa_bits,
+               rsa_security_bits,
 
                0,0,0,0,0,0,