diff options
author | lloyd <[email protected]> | 2009-12-16 02:22:58 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-12-16 02:22:58 +0000 |
commit | 12afeca214c4414a0ced0bc4654d0fc5908dc77b (patch) | |
tree | d0706f470d406d68b4ec1f559d2e0f6426174c28 /src/cert | |
parent | 87cbaef441c6baba2699a8ea53ac2562c46c772d (diff) |
Make many more headers internal-only.
Fixes for the amalgamation generator for internal headers.
Remove BOTAN_DLL exporting macros from all internal-only headers;
the classes/functions there don't need to be exported, and
avoiding the PIC/GOT indirection can be a big win.
Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc
For GCC, use -fvisibility=hidden and set BOTAN_DLL to the
visibility __attribute__ to export those classes/functions.
Diffstat (limited to 'src/cert')
-rw-r--r-- | src/cert/cvc/asn1_eac_tm.cpp | 2 | ||||
-rw-r--r-- | src/cert/cvc/cvc_self.h | 75 | ||||
-rw-r--r-- | src/cert/cvc/eac_asn_obj.h | 16 | ||||
-rw-r--r-- | src/cert/x509/x509_crl.h | 2 | ||||
-rw-r--r-- | src/cert/x509/x509_ext.cpp | 2 | ||||
-rw-r--r-- | src/cert/x509/x509cert.cpp | 2 |
6 files changed, 50 insertions, 49 deletions
diff --git a/src/cert/cvc/asn1_eac_tm.cpp b/src/cert/cvc/asn1_eac_tm.cpp index f361e6098..ee2ed2ddf 100644 --- a/src/cert/cvc/asn1_eac_tm.cpp +++ b/src/cert/cvc/asn1_eac_tm.cpp @@ -11,7 +11,7 @@ #include <botan/ber_dec.h> #include <botan/charset.h> #include <botan/parsing.h> -#include <botan/rounding.h> +#include <botan/internal/rounding.h> #include <botan/time.h> namespace Botan { diff --git a/src/cert/cvc/cvc_self.h b/src/cert/cvc/cvc_self.h index db23547b9..fb24ecd3a 100644 --- a/src/cert/cvc/cvc_self.h +++ b/src/cert/cvc/cvc_self.h @@ -48,9 +48,9 @@ namespace CVC_EAC { * @result the self signed certificate */ -EAC1_1_CVC create_self_signed_cert(Private_Key const& key, - EAC1_1_CVC_Options const& opts, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL create_self_signed_cert(Private_Key const& key, + EAC1_1_CVC_Options const& opts, + RandomNumberGenerator& rng); /** * Create a CVC request. The key encoding will be according to the provided private key. * @param priv_key the private key associated with the requesting entity @@ -61,10 +61,10 @@ EAC1_1_CVC create_self_signed_cert(Private_Key const& key, * @param rng the rng to use * @result the new request */ -EAC1_1_Req create_cvc_req(Private_Key const& priv_key, - ASN1_Chr const& chr, - std::string const& hash_alg, - RandomNumberGenerator& rng); +EAC1_1_Req BOTAN_DLL create_cvc_req(Private_Key const& priv_key, + ASN1_Chr const& chr, + std::string const& hash_alg, + RandomNumberGenerator& rng); /** * Create an ADO from a request object. @@ -74,15 +74,16 @@ EAC1_1_Req create_cvc_req(Private_Key const& priv_key, * CHR of the entity associated with the provided private key * @param rng the rng to use */ -EAC1_1_ADO create_ado_req(Private_Key const& priv_key, - EAC1_1_Req const& req, - ASN1_Car const& car, - RandomNumberGenerator& rng); +EAC1_1_ADO BOTAN_DLL create_ado_req(Private_Key const& priv_key, + EAC1_1_Req const& req, + ASN1_Car const& car, + RandomNumberGenerator& rng); } /** -* This namespace represents EAC 1.1 CVC convenience functions following the specific german -* requirements. +* This namespace represents EAC 1.1 CVC convenience functions +* following the specific german requirements. */ + namespace DE_EAC { /** @@ -99,13 +100,13 @@ namespace DE_EAC { * @param rng the rng to use * @result the CVCA certificate created */ -EAC1_1_CVC create_cvca(Private_Key const& priv_key, - std::string const& hash, - ASN1_Car const& car, - bool iris, - bool fingerpr, - u32bit cvca_validity_months, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL create_cvca(Private_Key const& priv_key, + std::string const& hash, + ASN1_Car const& car, + bool iris, + bool fingerpr, + u32bit cvca_validity_months, + RandomNumberGenerator& rng); /** * Create a link certificate between two CVCA certificates. The key @@ -117,10 +118,10 @@ EAC1_1_CVC create_cvca(Private_Key const& priv_key, * the holder of the link certificate * @param rng a random number generator */ -EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer, - Private_Key const& priv_key, - EAC1_1_CVC const& to_be_signed, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL link_cvca(EAC1_1_CVC const& signer, + Private_Key const& priv_key, + EAC1_1_CVC const& to_be_signed, + RandomNumberGenerator& rng); /** * Create a CVC request. The key encoding will be implicitCA. @@ -132,10 +133,10 @@ EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer, * @param rng a random number generator * @result the new request */ -EAC1_1_Req create_cvc_req(Private_Key const& priv_key, - ASN1_Chr const& chr, - std::string const& hash_alg, - RandomNumberGenerator& rng); +EAC1_1_Req BOTAN_DLL create_cvc_req(Private_Key const& priv_key, + ASN1_Chr const& chr, + std::string const& hash_alg, + RandomNumberGenerator& rng); /** * Sign a CVC request. @@ -151,15 +152,15 @@ EAC1_1_Req create_cvc_req(Private_Key const& priv_key, * @result the new certificate * **/ -EAC1_1_CVC sign_request(EAC1_1_CVC const& signer_cert, - Private_Key const& priv_key, - EAC1_1_Req const& req, - u32bit seqnr, - u32bit seqnr_len, - bool domestic, - u32bit dvca_validity_months, - u32bit ca_is_validity_months, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL sign_request(EAC1_1_CVC const& signer_cert, + Private_Key const& priv_key, + EAC1_1_Req const& req, + u32bit seqnr, + u32bit seqnr_len, + bool domestic, + u32bit dvca_validity_months, + u32bit ca_is_validity_months, + RandomNumberGenerator& rng); } } diff --git a/src/cert/cvc/eac_asn_obj.h b/src/cert/cvc/eac_asn_obj.h index 3e70f6b74..652c9a6e6 100644 --- a/src/cert/cvc/eac_asn_obj.h +++ b/src/cert/cvc/eac_asn_obj.h @@ -226,14 +226,14 @@ class BOTAN_DLL ASN1_Chr : public ASN1_EAC_String /* * Comparison Operations */ -bool operator==(const EAC_Time&, const EAC_Time&); -bool operator!=(const EAC_Time&, const EAC_Time&); -bool operator<=(const EAC_Time&, const EAC_Time&); -bool operator>=(const EAC_Time&, const EAC_Time&); -bool operator>(const EAC_Time&, const EAC_Time&); -bool operator<(const EAC_Time&, const EAC_Time&); - -bool operator==(const ASN1_EAC_String&, const ASN1_EAC_String&); +bool BOTAN_DLL operator==(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator!=(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator<=(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator>=(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator>(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator<(const EAC_Time&, const EAC_Time&); + +bool BOTAN_DLL operator==(const ASN1_EAC_String&, const ASN1_EAC_String&); inline bool operator!=(const ASN1_EAC_String& lhs, const ASN1_EAC_String& rhs) { return !(lhs == rhs); diff --git a/src/cert/x509/x509_crl.h b/src/cert/x509/x509_crl.h index 6caef42cc..a7903e7e6 100644 --- a/src/cert/x509/x509_crl.h +++ b/src/cert/x509/x509_crl.h @@ -23,7 +23,7 @@ class BOTAN_DLL X509_CRL : public X509_Object /** * This class represents CRL related errors. */ - struct X509_CRL_Error : public Exception + struct BOTAN_DLL X509_CRL_Error : public Exception { X509_CRL_Error(const std::string& error) : Exception("X509_CRL: " + error) {} diff --git a/src/cert/x509/x509_ext.cpp b/src/cert/x509/x509_ext.cpp index 5e07cbd27..e88b5a268 100644 --- a/src/cert/x509/x509_ext.cpp +++ b/src/cert/x509/x509_ext.cpp @@ -11,7 +11,7 @@ #include <botan/ber_dec.h> #include <botan/oids.h> #include <botan/libstate.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <algorithm> #include <memory> diff --git a/src/cert/x509/x509cert.cpp b/src/cert/x509/x509cert.cpp index ac5839fb6..05f23298b 100644 --- a/src/cert/x509/x509cert.cpp +++ b/src/cert/x509/x509cert.cpp @@ -9,7 +9,7 @@ #include <botan/x509_ext.h> #include <botan/der_enc.h> #include <botan/ber_dec.h> -#include <botan/stl_util.h> +#include <botan/internal/stl_util.h> #include <botan/parsing.h> #include <botan/bigint.h> #include <botan/oids.h> |