mirror of https://github.com/openssl/openssl.git
Make some simple getters take const SSL/SSL_CTX
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8145)
(cherry picked from commit 3499327bad
)
This commit is contained in:
parent
5dc422c7ab
commit
00f2bafec1
|
@ -19,10 +19,10 @@ SSL_set_block_padding - install callback to specify TLS 1.3 record padding
|
||||||
void SSL_set_record_padding_callback(SSL *ssl, size_t (*cb)(SSL *s, int type, size_t len, void *arg));
|
void SSL_set_record_padding_callback(SSL *ssl, size_t (*cb)(SSL *s, int type, size_t len, void *arg));
|
||||||
|
|
||||||
void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg);
|
void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg);
|
||||||
void *SSL_CTX_get_record_padding_callback_arg(SSL_CTX *ctx);
|
void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx);
|
||||||
|
|
||||||
void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg);
|
void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg);
|
||||||
void *SSL_get_record_padding_callback_arg(SSL *ssl);
|
void *SSL_get_record_padding_callback_arg(const SSL *ssl);
|
||||||
|
|
||||||
int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size);
|
int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size);
|
||||||
int SSL_set_block_padding(SSL *ssl, size_t block_size);
|
int SSL_set_block_padding(SSL *ssl, size_t block_size);
|
||||||
|
|
|
@ -11,7 +11,7 @@ SSL_CTX_set_ssl_version, SSL_set_ssl_method, SSL_get_ssl_method
|
||||||
|
|
||||||
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *method);
|
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *method);
|
||||||
int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
|
int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
|
||||||
const SSL_METHOD *SSL_get_ssl_method(SSL *ssl);
|
const SSL_METHOD *SSL_get_ssl_method(const SSL *ssl);
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ SSL_renegotiate_pending
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
|
||||||
int SSL_key_update(SSL *s, int updatetype);
|
int SSL_key_update(SSL *s, int updatetype);
|
||||||
int SSL_get_key_update_type(SSL *s);
|
int SSL_get_key_update_type(const SSL *s);
|
||||||
|
|
||||||
int SSL_renegotiate(SSL *s);
|
int SSL_renegotiate(SSL *s);
|
||||||
int SSL_renegotiate_abbreviated(SSL *s);
|
int SSL_renegotiate_abbreviated(SSL *s);
|
||||||
int SSL_renegotiate_pending(SSL *s);
|
int SSL_renegotiate_pending(const SSL *s);
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
|
|
@ -1917,17 +1917,17 @@ __owur STACK_OF(SSL_CIPHER) *SSL_get1_supported_ciphers(SSL *s);
|
||||||
|
|
||||||
__owur int SSL_do_handshake(SSL *s);
|
__owur int SSL_do_handshake(SSL *s);
|
||||||
int SSL_key_update(SSL *s, int updatetype);
|
int SSL_key_update(SSL *s, int updatetype);
|
||||||
int SSL_get_key_update_type(SSL *s);
|
int SSL_get_key_update_type(const SSL *s);
|
||||||
int SSL_renegotiate(SSL *s);
|
int SSL_renegotiate(SSL *s);
|
||||||
int SSL_renegotiate_abbreviated(SSL *s);
|
int SSL_renegotiate_abbreviated(SSL *s);
|
||||||
__owur int SSL_renegotiate_pending(SSL *s);
|
__owur int SSL_renegotiate_pending(const SSL *s);
|
||||||
int SSL_shutdown(SSL *s);
|
int SSL_shutdown(SSL *s);
|
||||||
__owur int SSL_verify_client_post_handshake(SSL *s);
|
__owur int SSL_verify_client_post_handshake(SSL *s);
|
||||||
void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);
|
void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);
|
||||||
void SSL_set_post_handshake_auth(SSL *s, int val);
|
void SSL_set_post_handshake_auth(SSL *s, int val);
|
||||||
|
|
||||||
__owur const SSL_METHOD *SSL_CTX_get_ssl_method(SSL_CTX *ctx);
|
__owur const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx);
|
||||||
__owur const SSL_METHOD *SSL_get_ssl_method(SSL *s);
|
__owur const SSL_METHOD *SSL_get_ssl_method(const SSL *s);
|
||||||
__owur int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
|
__owur int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
|
||||||
__owur const char *SSL_alert_type_string_long(int value);
|
__owur const char *SSL_alert_type_string_long(int value);
|
||||||
__owur const char *SSL_alert_type_string(int value);
|
__owur const char *SSL_alert_type_string(int value);
|
||||||
|
@ -2075,8 +2075,8 @@ void SSL_set_tmp_dh_callback(SSL *ssl,
|
||||||
int keylength));
|
int keylength));
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
__owur const COMP_METHOD *SSL_get_current_compression(SSL *s);
|
__owur const COMP_METHOD *SSL_get_current_compression(const SSL *s);
|
||||||
__owur const COMP_METHOD *SSL_get_current_expansion(SSL *s);
|
__owur const COMP_METHOD *SSL_get_current_expansion(const SSL *s);
|
||||||
__owur const char *SSL_COMP_get_name(const COMP_METHOD *comp);
|
__owur const char *SSL_COMP_get_name(const COMP_METHOD *comp);
|
||||||
__owur const char *SSL_COMP_get0_name(const SSL_COMP *comp);
|
__owur const char *SSL_COMP_get0_name(const SSL_COMP *comp);
|
||||||
__owur int SSL_COMP_get_id(const SSL_COMP *comp);
|
__owur int SSL_COMP_get_id(const SSL_COMP *comp);
|
||||||
|
@ -2120,20 +2120,20 @@ void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx,
|
||||||
size_t (*cb) (SSL *ssl, int type,
|
size_t (*cb) (SSL *ssl, int type,
|
||||||
size_t len, void *arg));
|
size_t len, void *arg));
|
||||||
void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg);
|
void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg);
|
||||||
void *SSL_CTX_get_record_padding_callback_arg(SSL_CTX *ctx);
|
void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx);
|
||||||
int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size);
|
int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size);
|
||||||
|
|
||||||
void SSL_set_record_padding_callback(SSL *ssl,
|
void SSL_set_record_padding_callback(SSL *ssl,
|
||||||
size_t (*cb) (SSL *ssl, int type,
|
size_t (*cb) (SSL *ssl, int type,
|
||||||
size_t len, void *arg));
|
size_t len, void *arg));
|
||||||
void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg);
|
void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg);
|
||||||
void *SSL_get_record_padding_callback_arg(SSL *ssl);
|
void *SSL_get_record_padding_callback_arg(const SSL *ssl);
|
||||||
int SSL_set_block_padding(SSL *ssl, size_t block_size);
|
int SSL_set_block_padding(SSL *ssl, size_t block_size);
|
||||||
|
|
||||||
int SSL_set_num_tickets(SSL *s, size_t num_tickets);
|
int SSL_set_num_tickets(SSL *s, size_t num_tickets);
|
||||||
size_t SSL_get_num_tickets(SSL *s);
|
size_t SSL_get_num_tickets(const SSL *s);
|
||||||
int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
|
int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
|
||||||
size_t SSL_CTX_get_num_tickets(SSL_CTX *ctx);
|
size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
|
||||||
|
|
||||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||||
# define SSL_cache_hit(s) SSL_session_reused(s)
|
# define SSL_cache_hit(s) SSL_session_reused(s)
|
||||||
|
|
|
@ -2107,7 +2107,7 @@ int SSL_key_update(SSL *s, int updatetype)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SSL_get_key_update_type(SSL *s)
|
int SSL_get_key_update_type(const SSL *s)
|
||||||
{
|
{
|
||||||
return s->key_update;
|
return s->key_update;
|
||||||
}
|
}
|
||||||
|
@ -2148,7 +2148,7 @@ int SSL_renegotiate_abbreviated(SSL *s)
|
||||||
return s->method->ssl_renegotiate(s);
|
return s->method->ssl_renegotiate(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SSL_renegotiate_pending(SSL *s)
|
int SSL_renegotiate_pending(const SSL *s)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* becomes true when negotiation is requested; false again once a
|
* becomes true when negotiation is requested; false again once a
|
||||||
|
@ -3428,12 +3428,12 @@ void ssl_update_cache(SSL *s, int mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const SSL_METHOD *SSL_CTX_get_ssl_method(SSL_CTX *ctx)
|
const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx)
|
||||||
{
|
{
|
||||||
return ctx->method;
|
return ctx->method;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SSL_METHOD *SSL_get_ssl_method(SSL *s)
|
const SSL_METHOD *SSL_get_ssl_method(const SSL *s)
|
||||||
{
|
{
|
||||||
return s->method;
|
return s->method;
|
||||||
}
|
}
|
||||||
|
@ -3871,7 +3871,7 @@ const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s)
|
||||||
return s->s3->tmp.new_cipher;
|
return s->s3->tmp.new_cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
const COMP_METHOD *SSL_get_current_compression(SSL *s)
|
const COMP_METHOD *SSL_get_current_compression(const SSL *s)
|
||||||
{
|
{
|
||||||
#ifndef OPENSSL_NO_COMP
|
#ifndef OPENSSL_NO_COMP
|
||||||
return s->compress ? COMP_CTX_get_method(s->compress) : NULL;
|
return s->compress ? COMP_CTX_get_method(s->compress) : NULL;
|
||||||
|
@ -3880,7 +3880,7 @@ const COMP_METHOD *SSL_get_current_compression(SSL *s)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const COMP_METHOD *SSL_get_current_expansion(SSL *s)
|
const COMP_METHOD *SSL_get_current_expansion(const SSL *s)
|
||||||
{
|
{
|
||||||
#ifndef OPENSSL_NO_COMP
|
#ifndef OPENSSL_NO_COMP
|
||||||
return s->expand ? COMP_CTX_get_method(s->expand) : NULL;
|
return s->expand ? COMP_CTX_get_method(s->expand) : NULL;
|
||||||
|
@ -4328,7 +4328,7 @@ void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg)
|
||||||
ctx->record_padding_arg = arg;
|
ctx->record_padding_arg = arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *SSL_CTX_get_record_padding_callback_arg(SSL_CTX *ctx)
|
void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx)
|
||||||
{
|
{
|
||||||
return ctx->record_padding_arg;
|
return ctx->record_padding_arg;
|
||||||
}
|
}
|
||||||
|
@ -4357,7 +4357,7 @@ void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg)
|
||||||
ssl->record_padding_arg = arg;
|
ssl->record_padding_arg = arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *SSL_get_record_padding_callback_arg(SSL *ssl)
|
void *SSL_get_record_padding_callback_arg(const SSL *ssl)
|
||||||
{
|
{
|
||||||
return ssl->record_padding_arg;
|
return ssl->record_padding_arg;
|
||||||
}
|
}
|
||||||
|
@ -4381,7 +4381,7 @@ int SSL_set_num_tickets(SSL *s, size_t num_tickets)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t SSL_get_num_tickets(SSL *s)
|
size_t SSL_get_num_tickets(const SSL *s)
|
||||||
{
|
{
|
||||||
return s->num_tickets;
|
return s->num_tickets;
|
||||||
}
|
}
|
||||||
|
@ -4393,7 +4393,7 @@ int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t SSL_CTX_get_num_tickets(SSL_CTX *ctx)
|
size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx)
|
||||||
{
|
{
|
||||||
return ctx->num_tickets;
|
return ctx->num_tickets;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue