aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-01-10 12:51:35 -0500
committerJack Lloyd <[email protected]>2018-01-10 12:51:35 -0500
commit3099e920495c8e881387363de8e1b0bf7d1d5292 (patch)
treed04e1c21f3d4b579784f3ed05f4c70ff88d3e190 /src/cli
parentb6f3f4c52de0630baf602e76d401fb840d57e03e (diff)
In asn1print, if input file ends in .pem assume --pem flag
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/asn1.cpp2
1 files changed, 1 insertions, 1 deletions
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<uint8_t> 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;