|
|
0ed7bc |
--- trunk/t/local/33_x509_create_cert.t 2012/04/05 21:37:24 338
|
|
|
0ed7bc |
+++ trunk/t/local/33_x509_create_cert.t 2014/06/07 06:03:48 414
|
|
|
0ed7bc |
@@ -2,7 +2,7 @@
|
|
|
0ed7bc |
|
|
|
0ed7bc |
use strict;
|
|
|
0ed7bc |
use warnings;
|
|
|
0ed7bc |
-use Test::More tests => 124;
|
|
|
0ed7bc |
+use Test::More tests => 123;
|
|
|
0ed7bc |
use Net::SSLeay qw/MBSTRING_ASC MBSTRING_UTF8 EVP_PK_RSA EVP_PKT_SIGN EVP_PKT_ENC/;
|
|
|
0ed7bc |
use File::Spec;
|
|
|
0ed7bc |
use utf8;
|
|
|
0ed7bc |
@@ -104,7 +104,11 @@
|
|
|
0ed7bc |
like(my $key_pem4 = Net::SSLeay::PEM_get_string_PrivateKey($pk,"password",$alg2), qr/-----BEGIN (ENCRYPTED|RSA) PRIVATE KEY-----/, "PEM_get_string_PrivateKey+passwd+enc_alg");
|
|
|
0ed7bc |
|
|
|
0ed7bc |
is(Net::SSLeay::X509_NAME_print_ex($name), "O=Company Name,C=UK,CN=Common name text X509", "X509_NAME_print_ex");
|
|
|
0ed7bc |
- is(unpack("H*",Net::SSLeay::X509_NAME_digest($name, $sha1_digest)), "044d7ea7fddced7b9b63799600b9989a63b36819", "X509_NAME_digest");
|
|
|
0ed7bc |
+
|
|
|
0ed7bc |
+ # 2014-06-06: Sigh, some versions of openssl have this patch, which afffects the results of this test:
|
|
|
0ed7bc |
+ # https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=3009244da47b989c4cc59ba02cf81a4e9d8f8431
|
|
|
0ed7bc |
+ # with this patch, the result is "ce83889f1beab8e70aa142e07e94b0ebbd9d59e0"
|
|
|
0ed7bc |
+# is(unpack("H*",Net::SSLeay::X509_NAME_digest($name, $sha1_digest)), "044d7ea7fddced7b9b63799600b9989a63b36819", "X509_NAME_digest");
|
|
|
0ed7bc |
|
|
|
0ed7bc |
ok(my $ext_idx = Net::SSLeay::X509_get_ext_by_NID($x509, &Net::SSLeay::NID_ext_key_usage), "X509_get_ext_by_NID");
|
|
|
0ed7bc |
ok(my $ext = Net::SSLeay::X509_get_ext($x509, $ext_idx), "X509_get_ext");
|