aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-04-04 19:54:06 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-04-04 19:54:06 +0000
commit06ddf8eb08af58e00032a5f8d381d837b82fa644 (patch)
tree581fedb7f7a0bad6cb721905ebbc42d0c5086ca1 /crypto
parent71fca64d96003e2683eec65dab4df124a642431b (diff)
downloadopenssl-06ddf8eb08af58e00032a5f8d381d837b82fa644.tar.gz
Updates from 1.0.0-stable
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bio/b_sock.c2
-rw-r--r--crypto/objects/objects.h22
-rw-r--r--crypto/pkcs12/p12_kiss.c2
-rw-r--r--crypto/x509/x509.h1
-rw-r--r--crypto/x509v3/v3_alt.c1
5 files changed, 20 insertions, 8 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 0eee25a0bc..da0f126f12 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -810,7 +810,7 @@ int BIO_accept(int sock, char **addr)
#ifdef EAI_FAMILY
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_BEOS_BONE) || defined(OPENSSL_SYS_MSDOS)
# define SOCKLEN_T size_t
-# else
+# elif !defined(SOCKLEN_T)
# define SOCKLEN_T socklen_t
#endif
do {
diff --git a/crypto/objects/objects.h b/crypto/objects/objects.h
index 65b6f01358..bd0ee52feb 100644
--- a/crypto/objects/objects.h
+++ b/crypto/objects/objects.h
@@ -1054,24 +1054,34 @@ const void * OBJ_bsearch_ex_(const void *key,const void *base,int num,
* the non-constness means a lot of complication, and in practice
* comparison routines do always not touch their arguments.
*/
-#define _IMPLEMENT_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm) \
+
+#define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm) \
static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \
{ \
type1 const *a = a_; \
type2 const *b = b_; \
return nm##_cmp(a,b); \
} \
- scope type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \
+ static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \
{ \
return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \
nm##_cmp_BSEARCH_CMP_FN); \
} \
extern void dummy_prototype(void)
-#define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \
- _IMPLEMENT_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp)
-#define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, cmp) \
- _IMPLEMENT_OBJ_BSEARCH_CMP_FN(, type1, type2, cmp)
+#define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \
+ static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \
+ { \
+ type1 const *a = a_; \
+ type2 const *b = b_; \
+ return nm##_cmp(a,b); \
+ } \
+ type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \
+ { \
+ return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \
+ nm##_cmp_BSEARCH_CMP_FN); \
+ } \
+ extern void dummy_prototype(void)
#define OBJ_bsearch(type1,key,type2,base,num,cmp) \
((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \
diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c
index 10ee5e7b94..292cc3ed4a 100644
--- a/crypto/pkcs12/p12_kiss.c
+++ b/crypto/pkcs12/p12_kiss.c
@@ -81,7 +81,7 @@ int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
STACK_OF(X509) **ca)
{
STACK_OF(X509) *ocerts = NULL;
- X509 *x;
+ X509 *x = NULL;
/* Check for NULL PKCS12 structure */
if(!p12)
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h
index e779c334e5..3beb69965b 100644
--- a/crypto/x509/x509.h
+++ b/crypto/x509/x509.h
@@ -116,6 +116,7 @@ extern "C" {
/* Under Win32 these are defined in wincrypt.h */
#undef X509_NAME
#undef X509_CERT_PAIR
+#undef X509_EXTENSIONS
#endif
#define X509_FILETYPE_PEM 1
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c
index 19b3a8b628..b13c5674a1 100644
--- a/crypto/x509v3/v3_alt.c
+++ b/crypto/x509v3/v3_alt.c
@@ -605,6 +605,7 @@ static int do_dirname(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx)
if (!ret)
X509_NAME_free(nm);
gen->d.dirn = nm;
+ X509V3_section_free(ctx, sk);
return ret;
}