aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd/x509print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/x509print.cpp')
-rw-r--r--src/cmd/x509print.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cmd/x509print.cpp b/src/cmd/x509print.cpp
new file mode 100644
index 000000000..935b50668
--- /dev/null
+++ b/src/cmd/x509print.cpp
@@ -0,0 +1,17 @@
+#include "apps.h"
+#include <botan/x509cert.h>
+
+int x509_main(int argc, char* argv[])
+ {
+ if(argc < 1)
+ {
+ std::cout << "Usage: " << argv[0] << " cert.pem\n";
+ return 1;
+ }
+
+ X509_Certificate cert(argv[1]);
+
+ std::cout << cert.to_string() << "\n";
+
+ return 0;
+ }