aboutsummaryrefslogtreecommitdiffstats
path: root/include/asn1_obj.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-21 15:53:32 +0000
committerlloyd <[email protected]>2008-04-21 15:53:32 +0000
commit90224856d6cc454eba6d5eacf4439b2d732acd65 (patch)
tree284a7afe5ede70c79878dad222891fa155f60512 /include/asn1_obj.h
parent272a8523e3c19e1c297b335a316a335db6c7128d (diff)
Add BOTAN_DLL macro in all needed spots for working DLL export. Based
on a patch from Joel Low for MSVC, modified and tested with GCC using -fvisibility=hidden and the visibility attribute. Getting this working completely requires making the shared object and static lib builds completely distinct (which is also a win since it allows avoiding -fPIC usage, etc in the static lib). Currently too many things are being exported, though it is an improvement as internal-only code like the bigint_* functions are hidden.
Diffstat (limited to 'include/asn1_obj.h')
-rw-r--r--include/asn1_obj.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/include/asn1_obj.h b/include/asn1_obj.h
index d7ff332c9..a2eb5fd45 100644
--- a/include/asn1_obj.h
+++ b/include/asn1_obj.h
@@ -18,7 +18,7 @@ namespace Botan {
/*************************************************
* Attribute *
*************************************************/
-class Attribute : public ASN1_Object
+class BOTAN_DLL Attribute : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const;
@@ -35,7 +35,7 @@ class Attribute : public ASN1_Object
/*************************************************
* X.509 Time *
*************************************************/
-class X509_Time : public ASN1_Object
+class BOTAN_DLL X509_Time : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const;
@@ -62,7 +62,7 @@ class X509_Time : public ASN1_Object
/*************************************************
* Simple String *
*************************************************/
-class ASN1_String : public ASN1_Object
+class BOTAN_DLL ASN1_String : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const;
@@ -83,7 +83,7 @@ class ASN1_String : public ASN1_Object
/*************************************************
* Distinguished Name *
*************************************************/
-class X509_DN : public ASN1_Object
+class BOTAN_DLL X509_DN : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const;
@@ -113,7 +113,7 @@ class X509_DN : public ASN1_Object
/*************************************************
* Alternative Name *
*************************************************/
-class AlternativeName : public ASN1_Object
+class BOTAN_DLL AlternativeName : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const;
@@ -139,24 +139,26 @@ class AlternativeName : public ASN1_Object
/*************************************************
* Comparison Operations *
*************************************************/
-bool operator==(const AlgorithmIdentifier&, const AlgorithmIdentifier&);
-bool operator!=(const AlgorithmIdentifier&, const AlgorithmIdentifier&);
+bool BOTAN_DLL operator==(const AlgorithmIdentifier&,
+ const AlgorithmIdentifier&);
+bool BOTAN_DLL operator!=(const AlgorithmIdentifier&,
+ const AlgorithmIdentifier&);
-bool operator==(const X509_Time&, const X509_Time&);
-bool operator!=(const X509_Time&, const X509_Time&);
-bool operator<=(const X509_Time&, const X509_Time&);
-bool operator>=(const X509_Time&, const X509_Time&);
+bool BOTAN_DLL operator==(const X509_Time&, const X509_Time&);
+bool BOTAN_DLL operator!=(const X509_Time&, const X509_Time&);
+bool BOTAN_DLL operator<=(const X509_Time&, const X509_Time&);
+bool BOTAN_DLL operator>=(const X509_Time&, const X509_Time&);
-bool operator==(const X509_DN&, const X509_DN&);
-bool operator!=(const X509_DN&, const X509_DN&);
-bool operator<(const X509_DN&, const X509_DN&);
+bool BOTAN_DLL operator==(const X509_DN&, const X509_DN&);
+bool BOTAN_DLL operator!=(const X509_DN&, const X509_DN&);
+bool BOTAN_DLL operator<(const X509_DN&, const X509_DN&);
/*************************************************
* Helper Functions *
*************************************************/
-s32bit validity_check(const X509_Time&, const X509_Time&, u64bit);
+s32bit BOTAN_DLL validity_check(const X509_Time&, const X509_Time&, u64bit);
-bool is_string_type(ASN1_Tag);
+bool BOTAN_DLL is_string_type(ASN1_Tag);
}