Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-10-01 03:51:34 +0400
committerAdam Langley <agl@google.com>2014-10-01 06:01:53 +0400
commit775b75f9decb4ce10e9d8eabb93eae1ea9441811 (patch)
tree45eea916637b0cf397657943fcbc7165f585e6f5 /crypto/ec/ec_asn1.c
parentde211dbd7bf48e2ce4c4a9b76a9af98daad6fb48 (diff)
Fix Windows shared library build.
Windows is much pickier about dllimport/dllexport. Declare it on the declaration, not the definition. Also ensure that the declaration precedes the definition. Finally, remove a stray OPENSSL_EXPORT. Change-Id: Id50b9de5acbe5adf1b15b22dd60b7a5c13a80cce Reviewed-on: https://boringssl-review.googlesource.com/1862 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/ec/ec_asn1.c')
-rw-r--r--crypto/ec/ec_asn1.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index 7920ae83..36f1cd59 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -106,6 +106,8 @@ typedef struct ec_parameters_st {
ASN1_INTEGER *cofactor;
} ECPARAMETERS;
+DECLARE_ASN1_ALLOC_FUNCTIONS(ECPARAMETERS);
+
ASN1_SEQUENCE(ECPARAMETERS) = {
ASN1_SIMPLE(ECPARAMETERS, version, LONG),
ASN1_SIMPLE(ECPARAMETERS, fieldID, X9_62_FIELDID),
@@ -115,7 +117,6 @@ ASN1_SEQUENCE(ECPARAMETERS) = {
ASN1_OPT(ECPARAMETERS, cofactor, ASN1_INTEGER)
} ASN1_SEQUENCE_END(ECPARAMETERS);
-DECLARE_ASN1_ALLOC_FUNCTIONS(ECPARAMETERS);
IMPLEMENT_ASN1_ALLOC_FUNCTIONS(ECPARAMETERS);
typedef struct ecpk_parameters_st {
@@ -134,15 +135,19 @@ typedef struct ec_privatekey_st {
ASN1_BIT_STRING *publicKey;
} EC_PRIVATEKEY;
+DECLARE_ASN1_FUNCTIONS_const(ECPKPARAMETERS);
+DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS);
+
ASN1_CHOICE(ECPKPARAMETERS) = {
ASN1_SIMPLE(ECPKPARAMETERS, value.named_curve, ASN1_OBJECT),
ASN1_SIMPLE(ECPKPARAMETERS, value.parameters, ECPARAMETERS),
} ASN1_CHOICE_END(ECPKPARAMETERS);
-DECLARE_ASN1_FUNCTIONS_const(ECPKPARAMETERS);
-DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS);
IMPLEMENT_ASN1_FUNCTIONS_const(ECPKPARAMETERS);
+DECLARE_ASN1_FUNCTIONS_const(EC_PRIVATEKEY);
+DECLARE_ASN1_ENCODE_FUNCTIONS_const(EC_PRIVATEKEY, EC_PRIVATEKEY);
+
ASN1_SEQUENCE(EC_PRIVATEKEY) = {
ASN1_SIMPLE(EC_PRIVATEKEY, version, LONG),
ASN1_SIMPLE(EC_PRIVATEKEY, privateKey, ASN1_OCTET_STRING),
@@ -150,8 +155,6 @@ ASN1_SEQUENCE(EC_PRIVATEKEY) = {
ASN1_EXP_OPT(EC_PRIVATEKEY, publicKey, ASN1_BIT_STRING, 1),
} ASN1_SEQUENCE_END(EC_PRIVATEKEY);
-DECLARE_ASN1_FUNCTIONS_const(EC_PRIVATEKEY);
-DECLARE_ASN1_ENCODE_FUNCTIONS_const(EC_PRIVATEKEY, EC_PRIVATEKEY);
IMPLEMENT_ASN1_FUNCTIONS_const(EC_PRIVATEKEY);