summaryrefslogtreecommitdiff
path: root/libkeyring/rsaalg.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2008-06-11 12:31:51 +0000
committerCharles.Forsyth <devnull@localhost>2008-06-11 12:31:51 +0000
commit31a18a6996a6b5927e39cc553696c167e6c88e3d (patch)
tree40433c168b91d5c224cb8c338054eb9fb2ecbd37 /libkeyring/rsaalg.c
parentac4d5a82181d3f4d63469e7745ccd38126c04b24 (diff)
20080611-1331
Diffstat (limited to 'libkeyring/rsaalg.c')
-rw-r--r--libkeyring/rsaalg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libkeyring/rsaalg.c b/libkeyring/rsaalg.c
index 3a1d8ae1..44c3c262 100644
--- a/libkeyring/rsaalg.c
+++ b/libkeyring/rsaalg.c
@@ -50,7 +50,7 @@ rsa_str2pk(char *str, char **strp)
static void*
rsa_str2sig(char *str, char **strp)
{
- BigInt rsa;
+ mpint *rsa;
char *p;
rsa = base64tobig(str, &p);
@@ -101,7 +101,7 @@ rsa_pk2str(void *vrsa, char *buf, int len)
static int
rsa_sig2str(void *vrsa, char *buf, int len)
{
- BigInt rsa;
+ mpint *rsa;
char *cp, *ep;
rsa = vrsa;
@@ -145,18 +145,18 @@ rsa_genfrompk(void *vpub)
}
static void*
-rsa_sign(BigInt m, void *key)
+rsa_sign(mpint* m, void *key)
{
return rsadecrypt((RSApriv*)key, m, nil);
}
static int
-rsa_verify(BigInt m, void *sig, void *key)
+rsa_verify(mpint* m, void *sig, void *key)
{
- BigInt t;
+ mpint *t;
int r;
- t = rsaencrypt((RSApub*)key, (BigInt)sig, nil);
+ t = rsaencrypt((RSApub*)key, (mpint*)sig, nil);
r = mpcmp(t, m) == 0;
mpfree(t);
return r;
@@ -177,7 +177,7 @@ rsa_freepub(void *a)
static void
rsa_freesig(void *a)
{
- mpfree((BigInt)a);
+ mpfree(a);
}
SigAlgVec*