From da88bc5970335698b482b21c97c91330704dcbe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Sun, 2 Nov 2014 00:30:24 +0100 Subject: [PATCH] add: Read the CSR (naive approach) --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index e0a6c10..ce89594 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include +#include +#include #include "database.h" #include "mysql.h" @@ -42,6 +44,9 @@ int main( int argc, const char* argv[] ) { std::cout << cert->md << std::endl; std::cout << cert->csr << std::endl; std::cout << cert->csr_type << std::endl; + std::ifstream t( cert->csr ); + std::string str( std::istreambuf_iterator( t ), std::istreambuf_iterator() ); + std::cout << "CSR: " << str << std::endl; } if( !jp->finishJob( job ) ) { -- 2.39.2