aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-08-17 15:30:20 +0200
committerMartin Willi <martin@strongswan.org>2009-08-26 11:23:51 +0200
commitcbfafc112557cc22e667b1c924c4c27695083b8c (patch)
treed46df8aa71f39ff490c0312a12013c75039ba309 /src/libstrongswan/plugins
parent5ef478aaee11cf8d4b21da603b290c19565210c6 (diff)
downloadstrongswan-cbfafc112557cc22e667b1c924c4c27695083b8c.tar.bz2
strongswan-cbfafc112557cc22e667b1c924c4c27695083b8c.tar.xz
enforce RSA_PRIME1 > RSA_PRIME2 (p > q) in PGP
Diffstat (limited to 'src/libstrongswan/plugins')
-rw-r--r--src/libstrongswan/plugins/pgp/pgp_builder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/pgp/pgp_builder.c b/src/libstrongswan/plugins/pgp/pgp_builder.c
index 8a6fc76b8..e3b370eee 100644
--- a/src/libstrongswan/plugins/pgp/pgp_builder.c
+++ b/src/libstrongswan/plugins/pgp/pgp_builder.c
@@ -202,10 +202,11 @@ static private_key_t *parse_rsa_private_key(chunk_t blob)
return NULL;
}
}
+ /* PGP has uses p < q, but we use p > q */
return lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
BUILD_RSA_MODULUS, mpi[0], BUILD_RSA_PUB_EXP, mpi[1],
- BUILD_RSA_PRIV_EXP, mpi[2], BUILD_RSA_PRIME1, mpi[3],
- BUILD_RSA_PRIME2, mpi[4], BUILD_RSA_COEFF, mpi[5],
+ BUILD_RSA_PRIV_EXP, mpi[2], BUILD_RSA_PRIME2, mpi[3],
+ BUILD_RSA_PRIME1, mpi[4], BUILD_RSA_COEFF, mpi[5],
BUILD_END);
}