aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd/x509print.cpp
blob: 006c51de8fa8c90ff3dc9ff8c2368ceb98bb33d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "apps.h"
#if defined(BOTAN_HAS_X509_CERTIFICATES)
#include <botan/x509cert.h>

namespace {

int x509print(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;
   }

REGISTER_APP(x509print);

}

#endif