Add ECDH support.
[openssl.git] / crypto / rsa / rsa_null.c
index f38c25fe4c54530c74d268e0f4a4f00aa27c6846..64057fbdcf7b6442ecc2eee93b22fa88d5b3ce3f 100644 (file)
@@ -51,7 +51,7 @@
  * ====================================================================
  *
  * This product includes cryptographic software written by Eric Young
- * (null@cryptsoft.com).  This product includes software written by Tim
+ * (eay@cryptsoft.com).  This product includes software written by Tim
  * Hudson (tjh@cryptsoft.com).
  *
  */
  * operations (like storing RSA keys) are permitted.
  */
 
-static int RSA_null_public_encrypt(int flen, unsigned char *from,
+static int RSA_null_public_encrypt(int flen, const unsigned char *from,
                unsigned char *to, RSA *rsa,int padding);
-static int RSA_null_private_encrypt(int flen, unsigned char *from,
+static int RSA_null_private_encrypt(int flen, const unsigned char *from,
                unsigned char *to, RSA *rsa,int padding);
-static int RSA_null_public_decrypt(int flen, unsigned char *from,
+static int RSA_null_public_decrypt(int flen, const unsigned char *from,
                unsigned char *to, RSA *rsa,int padding);
-static int RSA_null_private_decrypt(int flen, unsigned char *from,
+static int RSA_null_private_decrypt(int flen, const unsigned char *from,
                unsigned char *to, RSA *rsa,int padding);
-static int RSA_null_mod_exp(BIGNUM *r0, BIGNUM *i, RSA *rsa);
+#if 0 /* not currently used */
+static int RSA_null_mod_exp(const BIGNUM *r0, const BIGNUM *i, RSA *rsa);
+#endif
 static int RSA_null_init(RSA *rsa);
 static int RSA_null_finish(RSA *rsa);
 static RSA_METHOD rsa_null_meth={
@@ -86,51 +88,54 @@ static RSA_METHOD rsa_null_meth={
        RSA_null_public_decrypt,
        RSA_null_private_encrypt,
        RSA_null_private_decrypt,
-       NULL, NULL,
+       NULL,
+       NULL,
        RSA_null_init,
        RSA_null_finish,
        0,
        NULL,
        };
 
-RSA_METHOD *RSA_null_method(void)
+const RSA_METHOD *RSA_null_method(void)
        {
        return(&rsa_null_meth);
        }
 
-static int RSA_null_public_encrypt(int flen, unsigned char *from,
+static int RSA_null_public_encrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
        RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
-static int RSA_null_private_encrypt(int flen, unsigned char *from,
+static int RSA_null_private_encrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
        RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
-static int RSA_null_private_decrypt(int flen, unsigned char *from,
+static int RSA_null_private_decrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
        RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
-static int RSA_null_public_decrypt(int flen, unsigned char *from,
+static int RSA_null_public_decrypt(int flen, const unsigned char *from,
             unsigned char *to, RSA *rsa, int padding)
        {
        RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
 
+#if 0 /* not currently used */
 static int RSA_null_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
        {
        RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
        return -1;
        }
+#endif
 
 static int RSA_null_init(RSA *rsa)
        {