1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

AppleM1: Update openssl to v1.1.1l

This commit is contained in:
winlin 2022-08-14 19:05:01 +08:00
parent 1fe12b8e8c
commit b787656eea
990 changed files with 13406 additions and 18710 deletions

View file

@ -9,7 +9,7 @@ for masochists" document *and* a rather extensive commit log message. (I'd get
lynched for sticking all this in CHANGES or the commit mails :-).
ENGINE_TABLE underlies this restructuring, as described in the internal header
"eng_int.h", implemented in eng_table.c, and used in each of the "class" files;
"eng_local.h", implemented in eng_table.c, and used in each of the "class" files;
tb_rsa.c, tb_dsa.c, etc.
However, "EVP_CIPHER" underlies the motivation and design of ENGINE_TABLE so

View file

@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
#include "eng_int.h"
#include "eng_local.h"
void ENGINE_load_builtin_engines(void)
{

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
#include <openssl/conf.h>
/* #define ENGINE_CONF_DEBUG */

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
/*
* When querying a ENGINE-specific control command's 'description', this

View file

@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2017-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -22,11 +22,11 @@
#include <openssl/objects.h>
#include <crypto/cryptodev.h>
#include "internal/engine.h"
#include "crypto/engine.h"
/* #define ENGINE_DEVCRYPTO_DEBUG */
#ifdef CRYPTO_ALGORITHM_MIN
#if CRYPTO_ALGORITHM_MIN < CRYPTO_ALGORITHM_MAX
# define CHECK_BSD_STYLE_MACROS
#endif
@ -758,8 +758,9 @@ static int devcrypto_unload(ENGINE *e)
void engine_load_devcrypto_int()
{
ENGINE *e = NULL;
int fd;
if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
if ((fd = open("/dev/crypto", O_RDWR, 0)) < 0) {
#ifndef ENGINE_DEVCRYPTO_DEBUG
if (errno != ENOENT)
#endif
@ -767,6 +768,18 @@ void engine_load_devcrypto_int()
return;
}
#ifdef CRIOGET
if (ioctl(fd, CRIOGET, &cfd) < 0) {
fprintf(stderr, "Could not create crypto fd: %s\n", strerror(errno));
close(fd);
cfd = -1;
return;
}
close(fd);
#else
cfd = fd;
#endif
if ((e = ENGINE_new()) == NULL
|| !ENGINE_set_destroy_function(e, devcrypto_unload)) {
ENGINE_free(e);

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
#include "internal/dso.h"
#include <openssl/crypto.h>

View file

@ -8,7 +8,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
#include <openssl/conf.h>
int ENGINE_set_default(ENGINE *e, unsigned int flags)

View file

@ -8,7 +8,7 @@
*/
#include "e_os.h"
#include "eng_int.h"
#include "eng_local.h"
/*
* Initialise a engine type for use (or up its functional reference count if

View file

@ -1,5 +1,5 @@
/*
* Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -8,7 +8,7 @@
*/
#include "e_os.h"
#include "eng_int.h"
#include "eng_local.h"
#include <openssl/rand.h>
#include "internal/refcount.h"
@ -171,6 +171,7 @@ void engine_cleanup_int(void)
cleanup_stack = NULL;
}
CRYPTO_THREAD_lock_free(global_engine_lock);
global_engine_lock = NULL;
}
/* Now the "ex_data" support */

View file

@ -8,7 +8,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
/*
* The linked-list of pointers to engine types. engine_list_head incorporates

View file

@ -8,11 +8,11 @@
* https://www.openssl.org/source/license.html
*/
#ifndef HEADER_ENGINE_INT_H
# define HEADER_ENGINE_INT_H
#ifndef OSSL_CRYPTO_ENGINE_ENG_LOCAL_H
# define OSSL_CRYPTO_ENGINE_ENG_LOCAL_H
# include "internal/cryptlib.h"
# include "internal/engine.h"
# include "crypto/engine.h"
# include "internal/thread_once.h"
# include "internal/refcount.h"
@ -168,4 +168,4 @@ typedef struct st_engine_pile ENGINE_PILE;
DEFINE_LHASH_OF(ENGINE_PILE);
#endif /* HEADER_ENGINE_INT_H */
#endif /* OSSL_CRYPTO_ENGINE_ENG_LOCAL_H */

View file

@ -1,5 +1,5 @@
/*
* Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
@ -11,7 +11,7 @@
#include <stdio.h>
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
#include "internal/engine.h"
#include "crypto/engine.h"
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
@ -29,12 +29,14 @@
*/
#define TEST_ENG_OPENSSL_RC4
#ifndef OPENSSL_NO_STDIO
#define TEST_ENG_OPENSSL_PKEY
# define TEST_ENG_OPENSSL_PKEY
#endif
/* #define TEST_ENG_OPENSSL_HMAC */
/* #define TEST_ENG_OPENSSL_HMAC_INIT */
/* #define TEST_ENG_OPENSSL_RC4_OTHERS */
#define TEST_ENG_OPENSSL_RC4_P_INIT
#ifndef OPENSSL_NO_STDIO
# define TEST_ENG_OPENSSL_RC4_P_INIT
#endif
/* #define TEST_ENG_OPENSSL_RC4_P_CIPHER */
#define TEST_ENG_OPENSSL_SHA
/* #define TEST_ENG_OPENSSL_SHA_OTHERS */
@ -165,7 +167,7 @@ static int bind_fn(ENGINE *e, const char *id)
}
IMPLEMENT_DYNAMIC_CHECK_FN()
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
#endif /* ENGINE_DYNAMIC_SUPPORT */
#ifdef TEST_ENG_OPENSSL_RC4
/*-

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
/* Basic get/set stuff */

View file

@ -11,7 +11,7 @@
#include <stdio.h>
#include <string.h>
#include "internal/engine.h"
#include "crypto/engine.h"
#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/crypto.h>

View file

@ -10,7 +10,7 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/lhash.h>
#include "eng_int.h"
#include "eng_local.h"
/* The type of the items in the table */
struct st_engine_pile {
@ -26,7 +26,7 @@ struct st_engine_pile {
int uptodate;
};
/* The type exposed in eng_int.h */
/* The type exposed in eng_local.h */
struct st_engine_table {
LHASH_OF(ENGINE_PILE) piles;
}; /* ENGINE_TABLE */
@ -76,7 +76,7 @@ static int int_table_check(ENGINE_TABLE **t, int create)
}
/*
* Privately exposed (via eng_int.h) functions for adding and/or removing
* Privately exposed (via eng_local.h) functions for adding and/or removing
* ENGINEs from the implementation table
*/
int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,

View file

@ -8,9 +8,9 @@
*/
#include "e_os.h"
#include "eng_int.h"
#include "eng_local.h"
#include <openssl/evp.h>
#include "internal/asn1_int.h"
#include "crypto/asn1.h"
/*
* If this symbol is defined then ENGINE_get_pkey_asn1_meth_engine(), the
@ -147,7 +147,8 @@ const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
nidcount = e->pkey_asn1_meths(e, NULL, &nids, 0);
for (i = 0; i < nidcount; i++) {
e->pkey_asn1_meths(e, &ameth, NULL, nids[i]);
if (((int)strlen(ameth->pem_str) == len)
if (ameth != NULL
&& ((int)strlen(ameth->pem_str) == len)
&& strncasecmp(ameth->pem_str, str, len) == 0)
return ameth;
}

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
static ENGINE_TABLE *cipher_table = NULL;

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
static ENGINE_TABLE *dh_table = NULL;
static const int dummy_nid = 1;

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
static ENGINE_TABLE *digest_table = NULL;

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
static ENGINE_TABLE *dsa_table = NULL;
static const int dummy_nid = 1;

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
static ENGINE_TABLE *dh_table = NULL;
static const int dummy_nid = 1;

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
#include <openssl/evp.h>
static ENGINE_TABLE *pkey_meth_table = NULL;

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
static ENGINE_TABLE *rand_table = NULL;
static const int dummy_nid = 1;

View file

@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include "eng_int.h"
#include "eng_local.h"
static ENGINE_TABLE *rsa_table = NULL;
static const int dummy_nid = 1;