PSS ASN.1 method
authorDr. Stephen Henson <steve@openssl.org>
Thu, 24 Nov 2016 21:42:49 +0000 (21:42 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 8 Jan 2017 01:42:46 +0000 (01:42 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2177)

crypto/asn1/standard_methods.h
crypto/include/internal/asn1_int.h
crypto/rsa/rsa_ameth.c

index 5b8f9dd447b537f3fdbb5a221cbbea8b88c09139..51b0e81f68d9566193849c7430a48aab4622a79b 100644 (file)
@@ -30,6 +30,9 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] = {
 #ifndef OPENSSL_NO_CMAC
     &cmac_asn1_meth,
 #endif
+#ifndef OPENSSL_NO_RSA
+    &rsa_pss_asn1_meth,
+#endif
 #ifndef OPENSSL_NO_DH
     &dhx_asn1_meth,
 #endif
index f70e3b47ba326bf04de7f418ec62fb2a2f19f9aa..a5fdc0eb1d5d620b37ec5d1c20a1c9f2f877d111 100644 (file)
@@ -64,6 +64,7 @@ extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth;
 extern const EVP_PKEY_ASN1_METHOD ecx25519_asn1_meth;
 extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth;
 extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2];
+extern const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth;
 
 /*
  * These are used internally in the ASN1_OBJECT to keep track of whether the
index 7259bc92bcf4601e1a1b248088663d214a6caec0..733a6bf86cc592ec601487b541e89282875bc8ee 100644 (file)
@@ -836,3 +836,34 @@ const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2] = {
      EVP_PKEY_RSA,
      ASN1_PKEY_ALIAS}
 };
+
+const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth = {
+     EVP_PKEY_RSA_PSS,
+     EVP_PKEY_RSA_PSS,
+     ASN1_PKEY_SIGPARAM_NULL,
+
+     "RSA-PSS",
+     "OpenSSL RSA-PSS method",
+
+     rsa_pub_decode,
+     rsa_pub_encode,
+     rsa_pub_cmp,
+     rsa_pub_print,
+
+     rsa_priv_decode,
+     rsa_priv_encode,
+     rsa_priv_print,
+
+     int_rsa_size,
+     rsa_bits,
+     rsa_security_bits,
+
+     0, 0, 0, 0, 0, 0,
+
+     rsa_sig_print,
+     int_rsa_free,
+     rsa_pkey_ctrl,
+     0, 0,
+     rsa_item_verify,
+     rsa_item_sign,
+};