summaryrefslogtreecommitdiffstats
path: root/test/recipes
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2017-04-25 12:25:42 -0400
committerRich Salz <rsalz@openssl.org>2017-04-25 12:37:17 -0400
commitb5c4209be9162d4ceafb9aef833ca94ffa1cc5c9 (patch)
tree02dcc8e0d8a5368b0c7aa6780f7998c1d45f5f7d /test/recipes
parent645c694d85c8f48c74e7db8730ead874656c781e (diff)
Switch command-line utils to new nameopt API.
The CA names should be printed according to user's decision print_name instead of set of BIO_printf dump_cert_text instead of set of BIO_printf Testing cyrillic output of X509_CRL_print_ex Write and use X509_CRL_print_ex Reduce usage of X509_NAME_online Using X509_REQ_print_ex instead of X509_REQ_print Fix nameopt processing. Make dump_cert_text nameopt-friendly Move nameopt getter/setter to apps/apps.c Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3262)
Diffstat (limited to 'test/recipes')
-rw-r--r--test/recipes/25-test_crl.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/recipes/25-test_crl.t b/test/recipes/25-test_crl.t
index e8ce5f8552..456accbc2d 100644
--- a/test/recipes/25-test_crl.t
+++ b/test/recipes/25-test_crl.t
@@ -15,10 +15,14 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
setup("test_crl");
-plan tests => 5;
+plan tests => 7;
require_ok(srctop_file('test','recipes','tconversion.pl'));
+my $pem = srctop_file("test/certs", "cyrillic_crl.pem");
+my $out = "cyrillic_crl.out";
+my $utf = srctop_file("test/certs", "cyrillic_crl.utf8");
+
subtest 'crl conversions' => sub {
tconversion("crl", srctop_file("test","testcrl.pem"));
};
@@ -32,6 +36,12 @@ ok(compare1stline([qw{openssl crl -noout -fingerprint -sha256 -in},
srctop_file('test', 'testcrl.pem')],
'SHA256 Fingerprint=B3:A9:FD:A7:2E:8C:3D:DF:D0:F1:C3:1A:96:60:B5:FD:B0:99:7C:7F:0E:E4:34:F5:DB:87:62:36:BC:F1:BC:1B'));
+ok(run(app(["openssl", "crl", "-text", "-in", $pem, "-out", $out,
+ "-nameopt", "utf8"])));
+is(cmp_text($out, srctop_file("test/certs", "cyrillic_crl.utf8")),
+ 0, 'Comparing utf8 output');
+unlink $out;
+
sub compare1stline {
my ($cmdarray, $str) = @_;
my @lines = run(app($cmdarray), capture => 1);