diff options
author | Richard Levitte <levitte@openssl.org> | 2020-11-04 12:18:33 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-11 12:12:11 +0100 |
commit | 6849b73ccc38ea95e4b9d50b01e1c94f5ce8bca7 (patch) | |
tree | 2e5ab6caac3ebc00a6b9fba694aefd666d439799 /ssl/ssl_sess.c | |
parent | OSSL_STORE: Make sure the called OSSL_DECODER knows what to expect (diff) | |
download | openssl-6849b73ccc38ea95e4b9d50b01e1c94f5ce8bca7.tar.xz openssl-6849b73ccc38ea95e4b9d50b01e1c94f5ce8bca7.zip |
Convert all {NAME}err() in ssl/ to their corresponding ERR_raise() call
This was done using util/err-to-raise
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13316)
Diffstat (limited to 'ssl/ssl_sess.c')
-rw-r--r-- | ssl/ssl_sess.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index a10b1de071..5c9dd83087 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -71,7 +71,7 @@ SSL_SESSION *SSL_SESSION_new(void) ss = OPENSSL_zalloc(sizeof(*ss)); if (ss == NULL) { - SSLerr(SSL_F_SSL_SESSION_NEW, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE); return NULL; } @@ -81,7 +81,7 @@ SSL_SESSION *SSL_SESSION_new(void) ss->time = (unsigned long)time(NULL); ss->lock = CRYPTO_THREAD_lock_new(); if (ss->lock == NULL) { - SSLerr(SSL_F_SSL_SESSION_NEW, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE); OPENSSL_free(ss); return NULL; } @@ -218,7 +218,7 @@ SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) return dest; err: - SSLerr(SSL_F_SSL_SESSION_DUP, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE); SSL_SESSION_free(dest); return NULL; } @@ -811,8 +811,7 @@ int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, unsigned int sid_len) { if (sid_len > SSL_MAX_SSL_SESSION_ID_LENGTH) { - SSLerr(SSL_F_SSL_SESSION_SET1_ID, - SSL_R_SSL_SESSION_ID_TOO_LONG); + ERR_raise(ERR_LIB_SSL, SSL_R_SSL_SESSION_ID_TOO_LONG); return 0; } s->session_id_length = sid_len; @@ -956,8 +955,7 @@ int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, unsigned int sid_ctx_len) { if (sid_ctx_len > SSL_MAX_SID_CTX_LENGTH) { - SSLerr(SSL_F_SSL_SESSION_SET1_ID_CONTEXT, - SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG); + ERR_raise(ERR_LIB_SSL, SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG); return 0; } s->sid_ctx_length = sid_ctx_len; @@ -1023,7 +1021,7 @@ int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len) s->ext.session_ticket = OPENSSL_malloc(sizeof(TLS_SESSION_TICKET_EXT) + ext_len); if (s->ext.session_ticket == NULL) { - SSLerr(SSL_F_SSL_SET_SESSION_TICKET_EXT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE); return 0; } |