[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Dr. Stephen Henson
steve at openssl.org
Thu Nov 17 03:54:57 UTC 2016
The branch OpenSSL_1_1_0-stable has been updated
via 3ead66d1c0ce8e16ea2d4a1447c42073d7773e88 (commit)
via 1142556755beae2d87c80702158fee50ad29fb48 (commit)
via c9a1525cdba39bfe1717773dda156fe6696102f8 (commit)
from a4905bf6423105cda266ea3dfa70c207b4b7c2ac (commit)
- Log -----------------------------------------------------------------
commit 3ead66d1c0ce8e16ea2d4a1447c42073d7773e88
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Wed Nov 16 23:03:43 2016 +0000
Fix MSBLOB format with RSA.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(cherry picked from commit 159f6e7ecfde9e98194d6111c85587b85b6a8fc5)
commit 1142556755beae2d87c80702158fee50ad29fb48
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Wed Nov 16 23:14:30 2016 +0000
Make MSBLOB format work with dsa utility.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(cherry picked from commit b3795987477f1d478fd8bd20efb812e71b190e8b)
commit c9a1525cdba39bfe1717773dda156fe6696102f8
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Wed Nov 16 23:04:14 2016 +0000
Add conversion test for MSBLOB format.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(cherry picked from commit d922634d0c63cee01c89869d79306cd2df628855)
-----------------------------------------------------------------------
Summary of changes:
apps/dsa.c | 5 ++---
crypto/pem/pvkfmt.c | 2 +-
test/recipes/15-test_dsa.t | 4 ++--
test/recipes/15-test_rsa.t | 2 +-
test/recipes/tconversion.pl | 1 +
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/apps/dsa.c b/apps/dsa.c
index bfb08e9..273f8d0 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -37,7 +37,7 @@ typedef enum OPTION_choice {
OPTIONS dsa_options[] = {
{"help", OPT_HELP, '-', "Display this summary"},
{"inform", OPT_INFORM, 'f', "Input format, DER PEM PVK"},
- {"outform", OPT_OUTFORM, 'F', "Output format, DER PEM PVK"},
+ {"outform", OPT_OUTFORM, 'f', "Output format, DER PEM PVK"},
{"in", OPT_IN, 's', "Input key"},
{"out", OPT_OUT, '>', "Output file"},
{"noout", OPT_NOOUT, '-', "Don't print key out"},
@@ -96,8 +96,7 @@ int dsa_main(int argc, char **argv)
infile = opt_arg();
break;
case OPT_OUTFORM:
- if (!opt_format
- (opt_arg(), OPT_FMT_PEMDER | OPT_FMT_PVK, &outformat))
+ if (!opt_format(opt_arg(), OPT_FMT_ANY, &outformat))
goto opthelp;
break;
case OPT_OUT:
diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c
index 416bfc2..248704e 100644
--- a/crypto/pem/pvkfmt.c
+++ b/crypto/pem/pvkfmt.c
@@ -548,7 +548,7 @@ static void write_rsa(unsigned char **out, RSA *rsa, int ispub)
hnbyte = (RSA_bits(rsa) + 15) >> 4;
RSA_get0_key(rsa, &n, &e, &d);
write_lebn(out, e, 4);
- write_lebn(out, n, -1);
+ write_lebn(out, n, nbyte);
if (ispub)
return;
RSA_get0_factors(rsa, &p, &q);
diff --git a/test/recipes/15-test_dsa.t b/test/recipes/15-test_dsa.t
index bf3b0d3..2fd236e 100644
--- a/test/recipes/15-test_dsa.t
+++ b/test/recipes/15-test_dsa.t
@@ -34,7 +34,7 @@ ok(run(test(["dsatest", "-app2_1"])), "running dsatest -app2_1");
tconversion("dsa", srctop_file("test","testdsa.pem"), "pkey");
};
subtest 'dsa conversions -- public key' => sub {
- tconversion("dsa", srctop_file("test","testdsapub.pem"), "dsa",
- "-pubin", "-pubout");
+ tconversion("msb", srctop_file("test","testdsapub.pem"), "dsa",
+ "-pubin", "-pubout");
};
}
diff --git a/test/recipes/15-test_rsa.t b/test/recipes/15-test_rsa.t
index cb1172a..a57ce63 100644
--- a/test/recipes/15-test_rsa.t
+++ b/test/recipes/15-test_rsa.t
@@ -35,7 +35,7 @@ ok(run(app([ 'openssl', 'rsa', '-check', '-in', srctop_file('test', 'testrsa.pem
tconversion("rsa", srctop_file("test","testrsa.pem"), "pkey");
};
subtest 'rsa conversions -- public key' => sub {
- tconversion("rsa", srctop_file("test","testrsapub.pem"), "rsa",
+ tconversion("msb", srctop_file("test","testrsapub.pem"), "rsa",
"-pubin", "-pubout");
};
}
diff --git a/test/recipes/tconversion.pl b/test/recipes/tconversion.pl
index e5fa9de..ee675e9 100644
--- a/test/recipes/tconversion.pl
+++ b/test/recipes/tconversion.pl
@@ -19,6 +19,7 @@ my %conversionforms = (
# Default conversion forms. Other series may be added with
# specific test types as key.
"*" => [ "d", "p" ],
+ "msb" => [ "d", "p", "msblob" ],
);
sub tconversion {
my $testtype = shift;
More information about the openssl-commits
mailing list