Update dependencies.
[openssl.git] / crypto / rsa / rsa_pmeth.c
index 5887c4f233bd44f488f98e09d84233a8b5864c7b..9dd0d4c7c708faac0527cf170b2d81a0626a860d 100644 (file)
 #include <openssl/asn1t.h>
 #include <openssl/x509.h>
 #include <openssl/rsa.h>
+#include <openssl/bn.h>
 #include <openssl/evp.h>
 #include "evp_locl.h"
-
-extern int int_rsa_verify(int dtype, const unsigned char *m, size_t m_len,
-               unsigned char *rm, size_t *prm_len,
-               const unsigned char *sigbuf, size_t siglen,
-               RSA *rsa);
+#include "rsa_locl.h"
 
 /* RSA pkey context structure */
 
@@ -439,7 +436,16 @@ static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
                case EVP_PKEY_CTRL_PKCS7_ENCRYPT:
                case EVP_PKEY_CTRL_PKCS7_DECRYPT:
                case EVP_PKEY_CTRL_PKCS7_SIGN:
+#ifndef OPENSSL_NO_CMS
+               case EVP_PKEY_CTRL_CMS_ENCRYPT:
+               case EVP_PKEY_CTRL_CMS_DECRYPT:
+               case EVP_PKEY_CTRL_CMS_SIGN:
+#endif
                return 1;
+               case EVP_PKEY_CTRL_PEER_KEY:
+                       RSAerr(RSA_F_PKEY_RSA_CTRL,
+                       RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
+                       return -2;      
 
                default:
                return -2;