1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

openssl: Sync with upstream 1.0.2l

(cherry picked from commit 67305d1b0a)
This commit is contained in:
Rémi Verschelde
2017-05-27 17:50:43 +02:00
parent 22e1512638
commit 1fea09bfeb
208 changed files with 3126 additions and 1711 deletions

View File

@@ -1932,17 +1932,27 @@ SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
}
#ifdef OPENSSL_NO_COMP
void *SSL_COMP_get_compression_methods(void)
STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void)
{
return NULL;
}
int SSL_COMP_add_compression_method(int id, void *cm)
STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP)
*meths)
{
return NULL;
}
void SSL_COMP_free_compression_methods(void)
{
}
int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
{
return 1;
}
const char *SSL_COMP_get_name(const void *comp)
const char *SSL_COMP_get_name(const COMP_METHOD *comp)
{
return NULL;
}
@@ -1991,13 +2001,19 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
if (id < 193 || id > 255) {
SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,
SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE);
return 0;
return 1;
}
MemCheck_off();
comp = (SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP));
if (comp == NULL) {
MemCheck_on();
SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD, ERR_R_MALLOC_FAILURE);
return 1;
}
comp->id = id;
comp->method = cm;
comp->name = cm->name;
load_builtin_compressions();
if (ssl_comp_methods && sk_SSL_COMP_find(ssl_comp_methods, comp) >= 0) {
OPENSSL_free(comp);