Rename start_async_job to ssl_start_async_job
Make it clear that this function is ssl specific. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
46a283c01c
commit
7fecbf6f21
@ -2124,6 +2124,7 @@ void ERR_load_SSL_strings(void);
|
||||
# define SSL_F_SSL_SET_WFD 196
|
||||
# define SSL_F_SSL_SHUTDOWN 224
|
||||
# define SSL_F_SSL_SRP_CTX_INIT 313
|
||||
# define SSL_F_SSL_START_ASYNC_JOB 388
|
||||
# define SSL_F_SSL_UNDEFINED_CONST_FUNCTION 243
|
||||
# define SSL_F_SSL_UNDEFINED_FUNCTION 197
|
||||
# define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244
|
||||
@ -2139,7 +2140,6 @@ void ERR_load_SSL_strings(void);
|
||||
# define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206
|
||||
# define SSL_F_SSL_VERIFY_CERT_CHAIN 207
|
||||
# define SSL_F_SSL_WRITE 208
|
||||
# define SSL_F_START_ASYNC_JOB 388
|
||||
# define SSL_F_STATE_MACHINE 353
|
||||
# define SSL_F_TLS12_CHECK_PEER_SIGALG 333
|
||||
# define SSL_F_TLS1_CERT_VERIFY_MAC 286
|
||||
|
@ -316,6 +316,7 @@ static ERR_STRING_DATA SSL_str_functs[] = {
|
||||
{ERR_FUNC(SSL_F_SSL_SET_WFD), "SSL_set_wfd"},
|
||||
{ERR_FUNC(SSL_F_SSL_SHUTDOWN), "SSL_shutdown"},
|
||||
{ERR_FUNC(SSL_F_SSL_SRP_CTX_INIT), "SSL_SRP_CTX_init"},
|
||||
{ERR_FUNC(SSL_F_SSL_START_ASYNC_JOB), "SSL_START_ASYNC_JOB"},
|
||||
{ERR_FUNC(SSL_F_SSL_UNDEFINED_CONST_FUNCTION),
|
||||
"ssl_undefined_const_function"},
|
||||
{ERR_FUNC(SSL_F_SSL_UNDEFINED_FUNCTION), "ssl_undefined_function"},
|
||||
@ -335,7 +336,6 @@ static ERR_STRING_DATA SSL_str_functs[] = {
|
||||
"SSL_use_RSAPrivateKey_file"},
|
||||
{ERR_FUNC(SSL_F_SSL_VERIFY_CERT_CHAIN), "ssl_verify_cert_chain"},
|
||||
{ERR_FUNC(SSL_F_SSL_WRITE), "SSL_write"},
|
||||
{ERR_FUNC(SSL_F_START_ASYNC_JOB), "START_ASYNC_JOB"},
|
||||
{ERR_FUNC(SSL_F_STATE_MACHINE), "STATE_MACHINE"},
|
||||
{ERR_FUNC(SSL_F_TLS12_CHECK_PEER_SIGALG), "tls12_check_peer_sigalg"},
|
||||
{ERR_FUNC(SSL_F_TLS1_CERT_VERIFY_MAC), "tls1_cert_verify_mac"},
|
||||
|
@ -969,14 +969,14 @@ long SSL_get_default_timeout(const SSL *s)
|
||||
return (s->method->get_timeout());
|
||||
}
|
||||
|
||||
static int start_async_job(SSL *s, struct ssl_async_args *args,
|
||||
static int ssl_start_async_job(SSL *s, struct ssl_async_args *args,
|
||||
int (*func)(void *)) {
|
||||
int ret;
|
||||
switch(ASYNC_start_job(&s->job, &ret, func, args,
|
||||
sizeof(struct ssl_async_args))) {
|
||||
case ASYNC_ERR:
|
||||
s->rwstate = SSL_NOTHING;
|
||||
SSLerr(SSL_F_START_ASYNC_JOB, SSL_R_FAILED_TO_INIT_ASYNC);
|
||||
SSLerr(SSL_F_SSL_START_ASYNC_JOB, SSL_R_FAILED_TO_INIT_ASYNC);
|
||||
return -1;
|
||||
case ASYNC_PAUSE:
|
||||
s->rwstate = SSL_ASYNC_PAUSED;
|
||||
@ -986,7 +986,7 @@ static int start_async_job(SSL *s, struct ssl_async_args *args,
|
||||
return ret;
|
||||
default:
|
||||
s->rwstate = SSL_NOTHING;
|
||||
SSLerr(SSL_F_START_ASYNC_JOB, ERR_R_INTERNAL_ERROR);
|
||||
SSLerr(SSL_F_SSL_START_ASYNC_JOB, ERR_R_INTERNAL_ERROR);
|
||||
/* Shouldn't happen */
|
||||
return -1;
|
||||
}
|
||||
@ -1030,7 +1030,7 @@ int SSL_read(SSL *s, void *buf, int num)
|
||||
args.type = 1;
|
||||
args.f.func1 = s->method->ssl_read;
|
||||
|
||||
return start_async_job(s, &args, ssl_io_intern);
|
||||
return ssl_start_async_job(s, &args, ssl_io_intern);
|
||||
} else {
|
||||
return s->method->ssl_read(s, buf, num);
|
||||
}
|
||||
@ -1055,7 +1055,7 @@ int SSL_peek(SSL *s, void *buf, int num)
|
||||
args.type = 1;
|
||||
args.f.func1 = s->method->ssl_peek;
|
||||
|
||||
return start_async_job(s, &args, ssl_io_intern);
|
||||
return ssl_start_async_job(s, &args, ssl_io_intern);
|
||||
} else {
|
||||
return s->method->ssl_peek(s, buf, num);
|
||||
}
|
||||
@ -1083,7 +1083,7 @@ int SSL_write(SSL *s, const void *buf, int num)
|
||||
args.type = 2;
|
||||
args.f.func2 = s->method->ssl_write;
|
||||
|
||||
return start_async_job(s, &args, ssl_io_intern);
|
||||
return ssl_start_async_job(s, &args, ssl_io_intern);
|
||||
} else {
|
||||
return s->method->ssl_write(s, buf, num);
|
||||
}
|
||||
@ -2523,7 +2523,7 @@ int SSL_do_handshake(SSL *s)
|
||||
|
||||
args.s = s;
|
||||
|
||||
ret = start_async_job(s, &args, ssl_do_handshake_intern);
|
||||
ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);
|
||||
} else {
|
||||
ret = s->handshake_func(s);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user