diff options
author | lloyd <[email protected]> | 2008-09-28 19:29:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 19:29:24 +0000 |
commit | 9bcfe627321ddc81691b835dffaa6324ac4684a4 (patch) | |
tree | fe5e8ae9813b853549558b59833022e87e83981b /src/x509/x509_ca.h | |
parent | 9822a701516396b7de4e41339faecd48ff8dc8ff (diff) |
Move all modules into src/ directory
Diffstat (limited to 'src/x509/x509_ca.h')
-rw-r--r-- | src/x509/x509_ca.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/x509/x509_ca.h b/src/x509/x509_ca.h new file mode 100644 index 000000000..969e62558 --- /dev/null +++ b/src/x509/x509_ca.h @@ -0,0 +1,68 @@ +/************************************************* +* X.509 Certificate Authority Header File * +* (C) 1999-2008 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_X509_CA_H__ +#define BOTAN_X509_CA_H__ + +#include <botan/x509cert.h> +#include <botan/x509_crl.h> +#include <botan/x509_ext.h> +#include <botan/pkcs8.h> +#include <botan/pkcs10.h> +#include <botan/pubkey.h> + +namespace Botan { + +/************************************************* +* X.509 Certificate Authority * +*************************************************/ +class BOTAN_DLL X509_CA + { + public: + X509_Certificate sign_request(const PKCS10_Request& req, + RandomNumberGenerator& rng, + const X509_Time& not_before, + const X509_Time& not_after); + + X509_Certificate ca_certificate() const; + + X509_CRL new_crl(RandomNumberGenerator& rng, u32bit = 0) const; + X509_CRL update_crl(const X509_CRL&, + const std::vector<CRL_Entry>&, + RandomNumberGenerator& rng, + u32bit = 0) const; + + static X509_Certificate make_cert(PK_Signer*, + RandomNumberGenerator&, + const AlgorithmIdentifier&, + const MemoryRegion<byte>&, + const X509_Time&, const X509_Time&, + const X509_DN&, const X509_DN&, + const Extensions&); + + X509_CA(const X509_Certificate&, const Private_Key&); + ~X509_CA(); + private: + X509_CA(const X509_CA&) {} + X509_CA& operator=(const X509_CA&) { return (*this); } + + X509_CRL make_crl(const std::vector<CRL_Entry>&, + u32bit, u32bit, RandomNumberGenerator&) const; + + AlgorithmIdentifier ca_sig_algo; + X509_Certificate cert; + PK_Signer* signer; + }; + +/************************************************* +* Choose a signing format for the key * +*************************************************/ +BOTAN_DLL PK_Signer* choose_sig_format(const Private_Key&, + AlgorithmIdentifier&); + + +} + +#endif |