projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Workaround for tlhelp32.h: place the missing header file in outinc
[openssl.git]
/
ssl
/
ssl_ciph.c
diff --git
a/ssl/ssl_ciph.c
b/ssl/ssl_ciph.c
index a5b2b970567e7056a3387116d35b15babaa48684..f63163f26c38cfd1964194803e67b0c51c4a04ee 100644
(file)
--- a/
ssl/ssl_ciph.c
+++ b/
ssl/ssl_ciph.c
@@
-518,7
+518,7
@@
static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p,
curr = curr->next;
}
curr = curr->next;
}
- number_uses =
M
alloc((max_strength_bits + 1) * sizeof(int));
+ number_uses =
OPENSSL_m
alloc((max_strength_bits + 1) * sizeof(int));
if (!number_uses)
{
SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT,ERR_R_MALLOC_FAILURE);
if (!number_uses)
{
SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT,ERR_R_MALLOC_FAILURE);
@@
-545,7
+545,7
@@
static int ssl_cipher_strength_sort(CIPHER_ORDER *list, CIPHER_ORDER **head_p,
ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i,
list, head_p, tail_p);
ssl_cipher_apply_rule(0, 0, 0, 0, CIPHER_ORD, i,
list, head_p, tail_p);
-
F
ree(number_uses);
+
OPENSSL_f
ree(number_uses);
return(1);
}
return(1);
}
@@
-738,7
+738,7
@@
STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
* it is used for allocation.
*/
num_of_ciphers = ssl_method->num_ciphers();
* it is used for allocation.
*/
num_of_ciphers = ssl_method->num_ciphers();
- list = (CIPHER_ORDER *)
M
alloc(sizeof(CIPHER_ORDER) * num_of_ciphers);
+ list = (CIPHER_ORDER *)
OPENSSL_m
alloc(sizeof(CIPHER_ORDER) * num_of_ciphers);
if (list == NULL)
{
SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
if (list == NULL)
{
SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
@@
-759,10
+759,10
@@
STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
num_of_group_aliases = sizeof(cipher_aliases) / sizeof(SSL_CIPHER);
num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
ca_list =
num_of_group_aliases = sizeof(cipher_aliases) / sizeof(SSL_CIPHER);
num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
ca_list =
- (SSL_CIPHER **)
M
alloc(sizeof(SSL_CIPHER *) * num_of_alias_max);
+ (SSL_CIPHER **)
OPENSSL_m
alloc(sizeof(SSL_CIPHER *) * num_of_alias_max);
if (ca_list == NULL)
{
if (ca_list == NULL)
{
-
F
ree(list);
+
OPENSSL_f
ree(list);
SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
return(NULL); /* Failure */
}
SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST,ERR_R_MALLOC_FAILURE);
return(NULL); /* Failure */
}
@@
-788,20
+788,20
@@
STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail,
ca_list);
ok = ssl_cipher_process_rulestr(rule_p, list, &head, &tail,
ca_list);
-
F
ree(ca_list); /* Not needed anymore */
+
OPENSSL_f
ree(ca_list); /* Not needed anymore */
if (!ok)
{ /* Rule processing failure */
if (!ok)
{ /* Rule processing failure */
-
F
ree(list);
+
OPENSSL_f
ree(list);
return(NULL);
}
/*
* Allocate new "cipherstack" for the result, return with error
* if we cannot get one.
*/
return(NULL);
}
/*
* Allocate new "cipherstack" for the result, return with error
* if we cannot get one.
*/
- if ((cipherstack = sk_SSL_CIPHER_new
(NULL
)) == NULL)
+ if ((cipherstack = sk_SSL_CIPHER_new
_null(
)) == NULL)
{
{
-
F
ree(list);
+
OPENSSL_f
ree(list);
return(NULL);
}
return(NULL);
}
@@
-819,7
+819,7
@@
STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
#endif
}
}
#endif
}
}
-
F
ree(list); /* Not needed any longer */
+
OPENSSL_f
ree(list); /* Not needed any longer */
/*
* The following passage is a little bit odd. If pointer variables
/*
* The following passage is a little bit odd. If pointer variables
@@
-976,8
+976,8
@@
char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
if (buf == NULL)
{
len=128;
if (buf == NULL)
{
len=128;
- buf=
M
alloc(len);
- if (buf == NULL) return("
M
alloc Error");
+ buf=
OPENSSL_m
alloc(len);
+ if (buf == NULL) return("
OPENSSL_m
alloc Error");
}
else if (len < 128)
return("Buffer too small");
}
else if (len < 128)
return("Buffer too small");
@@
-1037,7
+1037,8
@@
SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
return(NULL);
}
return(NULL);
}
-static int sk_comp_cmp(SSL_COMP **a,SSL_COMP **b)
+static int sk_comp_cmp(const SSL_COMP * const *a,
+ const SSL_COMP * const *b)
{
return((*a)->id-(*b)->id);
}
{
return((*a)->id-(*b)->id);
}
@@
-1052,7
+1053,7
@@
int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
SSL_COMP *comp;
STACK_OF(SSL_COMP) *sk;
SSL_COMP *comp;
STACK_OF(SSL_COMP) *sk;
- comp=(SSL_COMP *)
M
alloc(sizeof(SSL_COMP));
+ comp=(SSL_COMP *)
OPENSSL_m
alloc(sizeof(SSL_COMP));
comp->id=id;
comp->method=cm;
if (ssl_comp_methods == NULL)
comp->id=id;
comp->method=cm;
if (ssl_comp_methods == NULL)