[openssl-commits] [openssl] master update
Matt Caswell
matt at openssl.org
Wed Sep 30 14:38:48 UTC 2015
The branch master has been updated
via dd35486db671dca36caffecc7ee1f5f6483b3a4b (commit)
via 5530d5187c77877b610b11c4aadedd7107386afa (commit)
from 19948ceab73d11217cf4df51e5b489aa487a2561 (commit)
- Log -----------------------------------------------------------------
commit dd35486db671dca36caffecc7ee1f5f6483b3a4b
Author: Matt Caswell <matt at openssl.org>
Date: Wed Sep 30 14:09:26 2015 +0100
Fix libeay.num
Removed duplicated ordinals from libeay.num
Reviewed-by: Richard Levitte <levitte at openssl.org>
commit 5530d5187c77877b610b11c4aadedd7107386afa
Author: Matt Caswell <matt at openssl.org>
Date: Wed Sep 30 14:06:14 2015 +0100
Add a test for duplicated ordinals
Occaisionally we have had problems where there are duplicated ordinals in
libeay.num or ssleay.num. This adds a test for this issue.
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
.../{70-test_sslskewith0p.t => 90-test_ordinals.t} | 77 +++++++++++-----------
util/libeay.num | 17 +++--
2 files changed, 48 insertions(+), 46 deletions(-)
copy test/recipes/{70-test_sslskewith0p.t => 90-test_ordinals.t} (67%)
diff --git a/test/recipes/70-test_sslskewith0p.t b/test/recipes/90-test_ordinals.t
similarity index 67%
copy from test/recipes/70-test_sslskewith0p.t
copy to test/recipes/90-test_ordinals.t
index d8d74b3..3e28641 100755
--- a/test/recipes/70-test_sslskewith0p.t
+++ b/test/recipes/90-test_ordinals.t
@@ -53,49 +53,52 @@
# Hudson (tjh at cryptsoft.com).
use strict;
-use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/;
-use TLSProxy::Proxy;
+use OpenSSL::Test qw/:DEFAULT top_file/;
-my $test_name = "test_sslskewith0p";
-setup($test_name);
+setup("test_ordinals");
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
- unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ }
- grep { /^SHARED_LIBS=/ }
- do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";
+plan tests => 2;
-$ENV{OPENSSL_ENGINES} = top_dir("engines");
-$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
-my $proxy = TLSProxy::Proxy->new(
- \&ske_0_p_filter,
- cmdstr(app(["openssl"])),
- top_file("apps", "server.pem")
-);
+ok(testordinals(top_file("util", "libeay.num")), "Test libeay.num");
+ok(testordinals(top_file("util", "ssleay.num")), "Test ssleay.num");
-plan tests => 1;
-
-#We must use an anon DHE cipher for this test
-$proxy->cipherc('ADH-AES128-SHA:@SECLEVEL=0');
-$proxy->ciphers('ADH-AES128-SHA:@SECLEVEL=0');
-
-$proxy->start();
-ok(TLSProxy::Message->fail, "ServerKeyExchange with 0 p");
-
-sub ske_0_p_filter
+sub testordinals
{
- my $proxy = shift;
-
- # We're only interested in the SKE - always in flight 1
- if ($proxy->flight != 1) {
- return;
- }
+ my $filename = shift;
+ my $cnt = 0;
+ my $ret = 1;
+ my $qualifier = "";
+ my $newqual;
+ my $lastfunc = "";
- foreach my $message (@{$proxy->message_list}) {
- if ($message->mt == TLSProxy::Message::MT_SERVER_KEY_EXCHANGE) {
- #Set p to a value of 0
- $message->p(pack('C', 0));
-
- $message->repack();
+ open(my $fh, '<', $filename);
+ while (my $line = <$fh>) {
+ my @tokens = split(/( |\t|:)+/, $line);
+ #Check the line looks sane
+ if ($#tokens < 8 || $#tokens > 10) {
+ print STDERR "Invalid line:\n$line\n";
+ $ret = 0;
+ last;
+ }
+ if ($tokens[4] eq "NOEXIST") {
+ #Ignore this line
+ next;
}
+ #Some ordinals can be repeated, e.g. if one is VMS and another is !VMS
+ $newqual = $tokens[6];
+ $newqual =~ s/!//g;
+ if ($cnt > $tokens[2]
+ || ($cnt == $tokens[2] && ($qualifier ne $newqual
+ || $qualifier eq "FUNCTION"))) {
+ print STDERR "Invalid ordinal detected: ".$tokens[2]."\n";
+ $ret = 0;
+ last;
+ }
+ $cnt = $tokens[2];
+ $qualifier = $newqual;
+ $lastfunc = $tokens[0];
}
+ close($fh);
+
+ return $ret;
}
diff --git a/util/libeay.num b/util/libeay.num
index 1d9e2a5..1b7bb47 100755
--- a/util/libeay.num
+++ b/util/libeay.num
@@ -4629,15 +4629,14 @@ EVP_PKEY_meth_get_ctrl 4988 EXIST::FUNCTION:
EVP_PKEY_meth_get_derive 4989 EXIST::FUNCTION:
EVP_PKEY_meth_get_decrypt 4990 EXIST::FUNCTION:
EVP_PKEY_meth_get_copy 4991 EXIST::FUNCTION:
-X509_get0_subject_key_id 4991 EXIST::FUNCTION:
-declare_dh_bn 4992 EXIST::FUNCTION:DH
-i2d_re_X509_CRL_tbs 4992 EXIST::FUNCTION:
-X509_REQ_get_X509_PUBKEY 4993 EXIST::FUNCTION:
-X509_REQ_get0_signature 4994 EXIST::FUNCTION:
-X509_REVOKED_get0_revocationDate 4995 EXIST::FUNCTION:
-X509_REVOKED_get0_serialNumber 4996 EXIST::FUNCTION:
-X509_CRL_get0_extensions 4997 EXIST::FUNCTION:
-X509_REQ_get_signature_nid 4998 EXIST::FUNCTION:
+X509_get0_subject_key_id 4992 EXIST::FUNCTION:
+i2d_re_X509_CRL_tbs 4993 EXIST::FUNCTION:
+X509_REQ_get_X509_PUBKEY 4994 EXIST::FUNCTION:
+X509_REQ_get0_signature 4995 EXIST::FUNCTION:
+X509_REVOKED_get0_revocationDate 4996 EXIST::FUNCTION:
+X509_REVOKED_get0_serialNumber 4997 EXIST::FUNCTION:
+X509_CRL_get0_extensions 4998 EXIST::FUNCTION:
+X509_REQ_get_signature_nid 4999 EXIST::FUNCTION:
X509_CRL_get_signature_nid 5000 EXIST::FUNCTION:
i2d_re_X509_REQ_tbs 5001 EXIST::FUNCTION:
X509_REVOKED_get0_extensions 5002 EXIST::FUNCTION:
More information about the openssl-commits
mailing list