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-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-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
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "bio_lcl.h"
|
||||
#include "bio_local.h"
|
||||
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
|
||||
|
@ -222,10 +222,10 @@ static int acpt_state(BIO *b, BIO_ACCEPT *c)
|
|||
break;
|
||||
|
||||
case ACPT_S_CREATE_SOCKET:
|
||||
ret = BIO_socket(BIO_ADDRINFO_family(c->addr_iter),
|
||||
BIO_ADDRINFO_socktype(c->addr_iter),
|
||||
BIO_ADDRINFO_protocol(c->addr_iter), 0);
|
||||
if (ret == (int)INVALID_SOCKET) {
|
||||
s = BIO_socket(BIO_ADDRINFO_family(c->addr_iter),
|
||||
BIO_ADDRINFO_socktype(c->addr_iter),
|
||||
BIO_ADDRINFO_protocol(c->addr_iter), 0);
|
||||
if (s == (int)INVALID_SOCKET) {
|
||||
SYSerr(SYS_F_SOCKET, get_last_socket_error());
|
||||
ERR_add_error_data(4,
|
||||
"hostname=", c->param_addr,
|
||||
|
@ -233,9 +233,10 @@ static int acpt_state(BIO *b, BIO_ACCEPT *c)
|
|||
BIOerr(BIO_F_ACPT_STATE, BIO_R_UNABLE_TO_CREATE_SOCKET);
|
||||
goto exit_loop;
|
||||
}
|
||||
c->accept_sock = ret;
|
||||
b->num = ret;
|
||||
c->accept_sock = s;
|
||||
b->num = s;
|
||||
c->state = ACPT_S_LISTEN;
|
||||
s = -1;
|
||||
break;
|
||||
|
||||
case ACPT_S_LISTEN:
|
||||
|
@ -433,8 +434,10 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||
b->init = 1;
|
||||
} else if (num == 1) {
|
||||
OPENSSL_free(data->param_serv);
|
||||
data->param_serv = BUF_strdup(ptr);
|
||||
b->init = 1;
|
||||
if ((data->param_serv = OPENSSL_strdup(ptr)) == NULL)
|
||||
ret = 0;
|
||||
else
|
||||
b->init = 1;
|
||||
} else if (num == 2) {
|
||||
data->bind_mode |= BIO_SOCK_NONBLOCK;
|
||||
} else if (num == 3) {
|
||||
|
@ -527,7 +530,12 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||
break;
|
||||
case BIO_CTRL_DUP:
|
||||
break;
|
||||
|
||||
case BIO_CTRL_EOF:
|
||||
if (b->next_bio == NULL)
|
||||
ret = 0;
|
||||
else
|
||||
ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue