Commit 4e97e9b9 authored by Niels Möller's avatar Niels Möller
Browse files

* src/rsa.c (do_rsa_public_spki_key): Reverted the 2001-01-24

change "rsa-pkcs1-sha1" -> "rsa-pkcs1".
* src/testsuite/conv-2-test, src/testsuite/conv-3-test: Updated
testcases.

Rev: src/rsa.c:1.20
Rev: src/testsuite/conv-2-test:1.4
Rev: src/testsuite/conv-3-test:1.2
parent d1519695
......@@ -208,7 +208,14 @@ do_rsa_public_spki_key(struct verifier *s)
sexp_l(2, SA(E), sexp_un(self->e), -1),
-1);
#endif
return sexp_l(3, sexp_a(ATOM_RSA_PKCS1),
/* NOTE: The algorithm name "rsa-pkcs1-sha1" is the SPKI standard,
* and what lsh-1.2 used. "rsa-pkcs1" makes more sense, and is what
* gnupg uses internally (I think), and was used by some late
* lsh-1.3.x versions.
*
* However, since it doesn't matter much, for now we follow the SPKI
* standard and stay compatible with lsh-1.2. */
return sexp_l(3, sexp_a(ATOM_RSA_PKCS1_SHA1),
sexp_l(2, SA(N), sexp_un(self->key.n), -1),
sexp_l(2, SA(E), sexp_un(self->key.e), -1),
-1);
......
......@@ -24,12 +24,12 @@ ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEApUmWhj0f4TD/XcDW88zcKo1ZYBn09jT0RzP1aoPwKuzF
EOF
cat >test.out2 <<EOF
(public-key (rsa-pkcs1 (n |pUmWhj0f4TD/XcDW88zcKo1ZYBn09jT0RzP1aoPw
KuzFbvupfbvKjPB3SC6r8cXTH0OY60EdfcQs1Ymt
eIJNMEnWEvV9ZHPJYanU6dVSlajnbKwEhqrFMLlR
uS4UKJQ67A5NFt0WV9DjYaLIzY5RmPJYci/C8bo+
Pawj8r/j1As=|)
(e "#")))
(public-key (rsa-pkcs1-sha1 (n |pUmWhj0f4TD/XcDW88zcKo1ZYBn09jT0RzP1aoPw
KuzFbvupfbvKjPB3SC6r8cXTH0OY60EdfcQs1Ymt
eIJNMEnWEvV9ZHPJYanU6dVSlajnbKwEhqrFMLlR
uS4UKJQ67A5NFt0WV9DjYaLIzY5RmPJYci/C8bo+
Pawj8r/j1As=|)
(e "#")))
EOF
compare_output "conv-2-test"
......@@ -25,13 +25,13 @@ ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEApUmWhj0f4TD/XcDW88zcKo1ZYBn09jT0RzP1aoPwKuzF
EOF
cat >test.out2 <<EOF
(public-key (rsa-pkcs1 (n #a54996863d1fe130 ff5dc0d6f3ccdc2a 8d596019f4f634f4
4733f56a83f02aec c56efba97dbbca8c f077482eabf1c5d3
1f4398eb411d7dc4 2cd589ad78824d30 49d612f57d6473c9
61a9d4e9d55295a8 e76cac0486aac530 b951b92e1428943a
ec0e4d16dd1657d0 e361a2c8cd8e5198 f258722fc2f1ba3e
3dac23f2bfe3d40b#)
(e "#")))
(public-key (rsa-pkcs1-sha1 (n #a54996863d1fe130 ff5dc0d6f3ccdc2a 8d596019f4f634f4
4733f56a83f02aec c56efba97dbbca8c f077482eabf1c5d3
1f4398eb411d7dc4 2cd589ad78824d30 49d612f57d6473c9
61a9d4e9d55295a8 e76cac0486aac530 b951b92e1428943a
ec0e4d16dd1657d0 e361a2c8cd8e5198 f258722fc2f1ba3e
3dac23f2bfe3d40b#)
(e "#")))
EOF
compare_output "conv-3-test"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment