From 3099e920495c8e881387363de8e1b0bf7d1d5292 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Wed, 10 Jan 2018 12:51:35 -0500 Subject: In asn1print, if input file ends in .pem assume --pem flag --- src/cli/asn1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cli') diff --git a/src/cli/asn1.cpp b/src/cli/asn1.cpp index ca8f5f89f..938871253 100644 --- a/src/cli/asn1.cpp +++ b/src/cli/asn1.cpp @@ -27,7 +27,7 @@ class ASN1_Printer final : public Command std::vector contents; - if(flag_set("pem")) + if(flag_set("pem") || (input.size() > 4 && input.substr(input.size() - 4) == ".pem")) { #if defined(BOTAN_HAS_PEM_CODEC) std::string pem_label; -- cgit v1.2.3