]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(rsa_keypair_from_sexp): Bugfix: Call
authorNiels Möller <nisse@lysator.liu.se>
Mon, 30 Sep 2002 20:41:04 +0000 (22:41 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 30 Sep 2002 20:41:04 +0000 (22:41 +0200)
rsa_prepare_public_key and rsa_prepare_private_key.

Rev: src/nettle/sexp2rsa.c:1.2

sexp2rsa.c

index 1027765a4363152bb131f852e803313b85b83d50..940296c2445b8475aa227713b9d689759de4497b 100644 (file)
@@ -102,12 +102,18 @@ rsa_keypair_from_sexp(struct rsa_public_key *pub,
       GET(priv->a, &values[5]);
       GET(priv->b, &values[6]);
       GET(priv->c, &values[7]);
+
+      if (!rsa_prepare_private_key(priv))
+       return 0;
     }
 
   if (pub)
     {
       GET(pub->n, &values[0]);
       GET(pub->e, &values[1]);
+
+      if (!rsa_prepare_public_key(pub))
+       return 0;
     }
     
   return 1;