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:
parent
1fe12b8e8c
commit
b787656eea
990 changed files with 13406 additions and 18710 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-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
|
||||
|
@ -185,6 +185,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
|
|||
BUF_MEM *buff = NULL;
|
||||
char *s, *p, *end;
|
||||
int again;
|
||||
int first_call = 1;
|
||||
long eline = 0;
|
||||
char btmp[DECIMAL_SIZE(eline) + 1];
|
||||
CONF_VALUE *v = NULL, *tv;
|
||||
|
@ -233,6 +234,19 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
|
|||
BIO_gets(in, p, CONFBUFSIZE - 1);
|
||||
p[CONFBUFSIZE - 1] = '\0';
|
||||
ii = i = strlen(p);
|
||||
if (first_call) {
|
||||
/* Other BOMs imply unsupported multibyte encoding,
|
||||
* so don't strip them and let the error raise */
|
||||
const unsigned char utf8_bom[3] = {0xEF, 0xBB, 0xBF};
|
||||
|
||||
if (i >= 3 && memcmp(p, utf8_bom, 3) == 0) {
|
||||
memmove(p, p + 3, i - 3);
|
||||
p[i - 3] = 0;
|
||||
i -= 3;
|
||||
ii -= 3;
|
||||
}
|
||||
first_call = 0;
|
||||
}
|
||||
if (i == 0 && !again) {
|
||||
/* the currently processed BIO is at EOF */
|
||||
BIO *parent;
|
||||
|
@ -376,11 +390,13 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
|
|||
if (biosk == NULL) {
|
||||
if ((biosk = sk_BIO_new_null()) == NULL) {
|
||||
CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
|
||||
BIO_free(next);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if (!sk_BIO_push(biosk, in)) {
|
||||
CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
|
||||
BIO_free(next);
|
||||
goto err;
|
||||
}
|
||||
/* continue with reading from the included BIO */
|
||||
|
@ -703,7 +719,9 @@ static BIO *process_include(char *include, OPENSSL_DIR_CTX **dirctx,
|
|||
static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
|
||||
{
|
||||
const char *filename;
|
||||
size_t pathlen;
|
||||
|
||||
pathlen = strlen(path);
|
||||
while ((filename = OPENSSL_DIR_read(dirctx, path)) != NULL) {
|
||||
size_t namelen;
|
||||
|
||||
|
@ -716,7 +734,7 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
|
|||
char *newpath;
|
||||
BIO *bio;
|
||||
|
||||
newlen = strlen(path) + namelen + 2;
|
||||
newlen = pathlen + namelen + 2;
|
||||
newpath = OPENSSL_zalloc(newlen);
|
||||
if (newpath == NULL) {
|
||||
CONFerr(CONF_F_GET_NEXT_FILE, ERR_R_MALLOC_FAILURE);
|
||||
|
@ -727,14 +745,11 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
|
|||
* If the given path isn't clear VMS syntax,
|
||||
* we treat it as on Unix.
|
||||
*/
|
||||
{
|
||||
size_t pathlen = strlen(path);
|
||||
|
||||
if (path[pathlen - 1] == ']' || path[pathlen - 1] == '>'
|
||||
|| path[pathlen - 1] == ':') {
|
||||
/* Clear VMS directory syntax, just copy as is */
|
||||
OPENSSL_strlcpy(newpath, path, newlen);
|
||||
}
|
||||
if (path[pathlen - 1] == ']'
|
||||
|| path[pathlen - 1] == '>'
|
||||
|| path[pathlen - 1] == ':') {
|
||||
/* Clear VMS directory syntax, just copy as is */
|
||||
OPENSSL_strlcpy(newpath, path, newlen);
|
||||
}
|
||||
#endif
|
||||
if (newpath[0] == '\0') {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* WARNING: do not edit!
|
||||
* Generated by crypto/conf/keysets.pl
|
||||
*
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2000-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
|
||||
|
@ -11,7 +11,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "internal/conf.h"
|
||||
#include "internal/ctype.h"
|
||||
#include "crypto/ctype.h"
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/conf.h>
|
||||
|
@ -356,8 +356,10 @@ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void)
|
|||
{
|
||||
OPENSSL_INIT_SETTINGS *ret = malloc(sizeof(*ret));
|
||||
|
||||
if (ret != NULL)
|
||||
memset(ret, 0, sizeof(*ret));
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(ret, 0, sizeof(*ret));
|
||||
ret->flags = DEFAULT_CONF_MFLAGS;
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <openssl/x509.h>
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/engine.h>
|
||||
#include "conf_lcl.h"
|
||||
#include "conf_local.h"
|
||||
|
||||
/* Load all OpenSSL builtin modules */
|
||||
|
||||
|
|
|
@ -35,13 +35,14 @@ void OPENSSL_config(const char *appname)
|
|||
memset(&settings, 0, sizeof(settings));
|
||||
if (appname != NULL)
|
||||
settings.appname = strdup(appname);
|
||||
settings.flags = DEFAULT_CONF_MFLAGS;
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, &settings);
|
||||
}
|
||||
#endif
|
||||
|
||||
int openssl_config_int(const OPENSSL_INIT_SETTINGS *settings)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
const char *filename;
|
||||
const char *appname;
|
||||
unsigned long flags;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <openssl/conf.h>
|
||||
#include <openssl/err.h>
|
||||
#include "internal/sslconf.h"
|
||||
#include "conf_lcl.h"
|
||||
#include "conf_local.h"
|
||||
|
||||
/*
|
||||
* SSL library configuration module placeholder. We load it here but defer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue