]> git.tue.mpg.de Git - paraslash.git/commitdiff
openssl: Assign bignums in canonical order.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 7 May 2023 15:16:52 +0000 (17:16 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 15 May 2023 18:06:50 +0000 (20:06 +0200)
The order of the bignums stored in the private key is n, e, d, iqmp, p,
q. We read the bignums in this order, so assign the members of the RSA
structure in the same order. This does not really matter, but still..

openssl.c

index 409807993d405a000fbf50f8a83b6638de6dd700..f696cd9e83606bc4e6bdd89d666f0885575f1d9f 100644 (file)
--- a/openssl.c
+++ b/openssl.c
@@ -216,11 +216,11 @@ static int read_openssh_private_key(const unsigned char *blob,
        rsa->n = n;
        rsa->e = e;
        rsa->d = d;
+       rsa->iqmp = iqmp;
        rsa->p = p;
        rsa->q = q;
        rsa->dmp1 = dmp1;
        rsa->dmq1 = dmq1;
-       rsa->iqmp = iqmp;
 #endif
        *result = rsa;
        ret = 1;