projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add function CMS_RecipientInfo_encrypt
[oweals/openssl.git]
/
crypto
/
rsa
/
rsa_null.c
diff --git
a/crypto/rsa/rsa_null.c
b/crypto/rsa/rsa_null.c
index a8e3e0175473da6641026d6ea14343f73a5a579c..2f2202f142f903742fbbe5cc849d2c5274326d44 100644
(file)
--- a/
crypto/rsa/rsa_null.c
+++ b/
crypto/rsa/rsa_null.c
@@
-1,5
+1,5
@@
/* rsa_null.c */
/* rsa_null.c */
-/* Written by Dr Stephen N Henson (s
henson@bigfoot.com
) for the OpenSSL
+/* Written by Dr Stephen N Henson (s
teve@openssl.org
) for the OpenSSL
* project 1999.
*/
/* ====================================================================
* project 1999.
*/
/* ====================================================================
@@
-69,15
+69,17
@@
* operations (like storing RSA keys) are permitted.
*/
* 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);
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);
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);
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);
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={
static int RSA_null_init(RSA *rsa);
static int RSA_null_finish(RSA *rsa);
static RSA_METHOD rsa_null_meth={
@@
-86,51
+88,57
@@
static RSA_METHOD rsa_null_meth={
RSA_null_public_decrypt,
RSA_null_private_encrypt,
RSA_null_private_decrypt,
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_null_init,
RSA_null_finish,
0,
NULL,
+ NULL,
+ NULL,
+ NULL
};
};
-RSA_METHOD *RSA_null_method(void)
+
const
RSA_METHOD *RSA_null_method(void)
{
return(&rsa_null_meth);
}
{
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)
{
unsigned char *to, RSA *rsa, int padding)
{
- RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+ RSAerr(RSA_F_RSA_NULL
_PUBLIC_ENCRYPT
, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
return -1;
}
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)
{
unsigned char *to, RSA *rsa, int padding)
{
- RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+ RSAerr(RSA_F_RSA_NULL
_PRIVATE_ENCRYPT
, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
return -1;
}
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)
{
unsigned char *to, RSA *rsa, int padding)
{
- RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+ RSAerr(RSA_F_RSA_NULL
_PRIVATE_DECRYPT
, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
return -1;
}
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)
{
unsigned char *to, RSA *rsa, int padding)
{
- RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+ RSAerr(RSA_F_RSA_NULL
_PUBLIC_DECRYPT
, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
return -1;
}
return -1;
}
+#if 0 /* not currently used */
static int RSA_null_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
{
static int RSA_null_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
{
-
RSAerr(RSA_F_RSA_NULL
, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
+
...err(RSA_F_RSA_NULL_MOD_EXP
, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED);
return -1;
}
return -1;
}
+#endif
static int RSA_null_init(RSA *rsa)
{
static int RSA_null_init(RSA *rsa)
{
@@
-141,5
+149,3
@@
static int RSA_null_finish(RSA *rsa)
{
return(1);
}
{
return(1);
}
-
-