aboutsummaryrefslogtreecommitdiff
path: root/pow/POW-0.7/POW.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-09-27 23:59:44 +0000
committerRob Austein <sra@hactrn.net>2007-09-27 23:59:44 +0000
commita3c6f733f3e2932c89ef892aa0d74e4f67bf2d69 (patch)
treeea81a97892e7c4f3ab3defdd6d4ffb90d4da9e16 /pow/POW-0.7/POW.c
parentc58ced06744f024259988cc540fc5a2e370d82ec (diff)
PKCS#10 signature verification. Getting this to work required
changing the implementation of POW.Asymmetric(), which appears to have been using the wrong OpenSSL functions for RSA public keys. If other things using public keys start acting funny, this may be why, and may require further examination. svn path=/pow/POW-0.7/POW.c; revision=1040
Diffstat (limited to 'pow/POW-0.7/POW.c')
-rw-r--r--pow/POW-0.7/POW.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pow/POW-0.7/POW.c b/pow/POW-0.7/POW.c
index c0d0c208..77f18f3e 100644
--- a/pow/POW-0.7/POW.c
+++ b/pow/POW-0.7/POW.c
@@ -4616,7 +4616,7 @@ asymmetric_object_der_read(int key_type, char *src, int len)
{
case RSA_PUBLIC_KEY:
{
- if( !(self->cipher = d2i_RSAPublicKey( NULL, (const unsigned char **) &ptr, len ) ) )
+ if( !(self->cipher = d2i_RSA_PUBKEY( NULL, (const unsigned char **) &ptr, len ) ) )
{ PyErr_SetString( SSLErrorObject, "could not load public key" ); goto error; }
self->key_type = RSA_PUBLIC_KEY;
@@ -4794,11 +4794,11 @@ asymmetric_object_der_write(asymmetric_object *self, PyObject *args)
}
case RSA_PUBLIC_KEY:
{
- len = i2d_RSAPublicKey(self->cipher, NULL);
+ len = i2d_RSA_PUBKEY(self->cipher, NULL);
if ( !(buf = malloc(len) ) )
{ PyErr_SetString( SSLErrorObject, "could not allocate memory" ); goto error; }
p = buf;
- if (!i2d_RSAPublicKey(self->cipher, &buf) )
+ if (!i2d_RSA_PUBKEY(self->cipher, &buf) )
{ PyErr_SetString( SSLErrorObject, "unable to write key" ); goto error; }
break;
}