aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/vendor/openssl/openssl.h
blob: 1ffaed519df6f6939bf3f6e26eb561e254a44038 (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
27
28
/*
* Utils for calling OpenSSL
* (C) 2015 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#ifndef BOTAN_CALL_OPENSSL_H__
#define BOTAN_CALL_OPENSSL_H__

#include <botan/secmem.h>
#include <botan/exceptn.h>
#include <memory>

#include <openssl/err.h>

namespace Botan {

class OpenSSL_Error : public Exception
   {
   public:
      OpenSSL_Error(const std::string& what) :
         Exception(what + " failed: " + ERR_error_string(ERR_get_error(), nullptr)) {}
   };

}

#endif