From 51b3b1cb6cf35dedccd0311289d43aa8c628648d Mon Sep 17 00:00:00 2001 From: toddouska Date: Sat, 1 Feb 2014 12:14:41 -0800 Subject: [PATCH] fix pkCurveOID c files, doesn't require openssl extra --- ctaocrypt/src/asn.c | 6 +++--- src/internal.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index fa4552e9f..410c91e48 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -1323,10 +1323,10 @@ void InitDecodedCert(DecodedCert* cert, byte* source, word32 inSz, void* heap) cert->extAuthKeyIdSz = 0; cert->extSubjKeyIdSrc = NULL; cert->extSubjKeyIdSz = 0; - #ifdef HAVE_ECC - cert->pkCurveOID = 0; - #endif /* HAVE_ECC */ #endif /* OPENSSL_EXTRA */ +#ifdef HAVE_ECC + cert->pkCurveOID = 0; +#endif /* HAVE_ECC */ #ifdef CYASSL_SEP cert->deviceTypeSz = 0; cert->deviceType = NULL; diff --git a/src/internal.c b/src/internal.c index 08f7cefa1..d797d75cc 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1282,6 +1282,9 @@ void InitX509(CYASSL_X509* x509, int dynamicFlag) x509->altNamesNext = NULL; x509->dynamicMemory = (byte)dynamicFlag; x509->isCa = 0; +#ifdef HAVE_ECC + x509->pkCurveOID = 0; +#endif /* HAVE_ECC */ #ifdef OPENSSL_EXTRA x509->pathLength = 0; x509->basicConstSet = 0; @@ -1300,9 +1303,6 @@ void InitX509(CYASSL_X509* x509, int dynamicFlag) x509->keyUsageSet = 0; x509->keyUsageCrit = 0; x509->keyUsage = 0; - #ifdef HAVE_ECC - x509->pkCurveOID = 0; - #endif /* HAVE_ECC */ #ifdef CYASSL_SEP x509->certPolicySet = 0; x509->certPolicyCrit = 0; @@ -3225,14 +3225,14 @@ int CopyDecodedToX509(CYASSL_X509* x509, DecodedCert* dCert) } x509->keyUsageSet = dCert->extKeyUsageSet; x509->keyUsageCrit = dCert->extKeyUsageCrit; - #ifdef HAVE_ECC - x509->pkCurveOID = dCert->pkCurveOID; - #endif /* HAVE_ECC */ #ifdef CYASSL_SEP x509->certPolicySet = dCert->extCertPolicySet; x509->certPolicyCrit = dCert->extCertPolicyCrit; #endif /* CYASSL_SEP */ #endif /* OPENSSL_EXTRA */ +#ifdef HAVE_ECC + x509->pkCurveOID = dCert->pkCurveOID; +#endif /* HAVE_ECC */ return ret; }