summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl_sess.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2014-04-17 13:37:51 +0000
committerBob Beck <beck@cvs.openbsd.org>2014-04-17 13:37:51 +0000
commit798a6f0972ce4f8ea25aa987dc43e626dc6d4087 (patch)
tree557371c7b1514332c466ec6233d3e6af96c88520 /lib/libssl/ssl_sess.c
parenteea79ffdb77e3dd4cdbd3f98ed1b44d9522496fa (diff)
Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
Diffstat (limited to 'lib/libssl/ssl_sess.c')
-rw-r--r--lib/libssl/ssl_sess.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c
index 0b1c655820d..f9f6ee5ecbf 100644
--- a/lib/libssl/ssl_sess.c
+++ b/lib/libssl/ssl_sess.c
@@ -195,7 +195,7 @@ SSL_SESSION
{
SSL_SESSION *ss;
- ss = (SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION));
+ ss = (SSL_SESSION *)malloc(sizeof(SSL_SESSION));
if (ss == NULL) {
SSLerr(SSL_F_SSL_SESSION_NEW, ERR_R_MALLOC_FAILURE);
return (0);
@@ -371,8 +371,8 @@ ssl_get_new_session(SSL *s, int session)
#ifndef OPENSSL_NO_EC
if (s->tlsext_ecpointformatlist) {
if (ss->tlsext_ecpointformatlist != NULL)
- OPENSSL_free(ss->tlsext_ecpointformatlist);
- if ((ss->tlsext_ecpointformatlist = OPENSSL_malloc(s->tlsext_ecpointformatlist_length)) == NULL) {
+ free(ss->tlsext_ecpointformatlist);
+ if ((ss->tlsext_ecpointformatlist = malloc(s->tlsext_ecpointformatlist_length)) == NULL) {
SSLerr(SSL_F_SSL_GET_NEW_SESSION, ERR_R_MALLOC_FAILURE);
SSL_SESSION_free(ss);
return 0;
@@ -382,8 +382,8 @@ ssl_get_new_session(SSL *s, int session)
}
if (s->tlsext_ellipticcurvelist) {
if (ss->tlsext_ellipticcurvelist != NULL)
- OPENSSL_free(ss->tlsext_ellipticcurvelist);
- if ((ss->tlsext_ellipticcurvelist = OPENSSL_malloc(s->tlsext_ellipticcurvelist_length)) == NULL) {
+ free(ss->tlsext_ellipticcurvelist);
+ if ((ss->tlsext_ellipticcurvelist = malloc(s->tlsext_ellipticcurvelist_length)) == NULL) {
SSLerr(SSL_F_SSL_GET_NEW_SESSION, ERR_R_MALLOC_FAILURE);
SSL_SESSION_free(ss);
return 0;
@@ -719,30 +719,30 @@ SSL_SESSION_free(SSL_SESSION *ss)
sk_SSL_CIPHER_free(ss->ciphers);
#ifndef OPENSSL_NO_TLSEXT
if (ss->tlsext_hostname != NULL)
- OPENSSL_free(ss->tlsext_hostname);
+ free(ss->tlsext_hostname);
if (ss->tlsext_tick != NULL)
- OPENSSL_free(ss->tlsext_tick);
+ free(ss->tlsext_tick);
#ifndef OPENSSL_NO_EC
ss->tlsext_ecpointformatlist_length = 0;
if (ss->tlsext_ecpointformatlist != NULL)
- OPENSSL_free(ss->tlsext_ecpointformatlist);
+ free(ss->tlsext_ecpointformatlist);
ss->tlsext_ellipticcurvelist_length = 0;
if (ss->tlsext_ellipticcurvelist != NULL)
- OPENSSL_free(ss->tlsext_ellipticcurvelist);
+ free(ss->tlsext_ellipticcurvelist);
#endif /* OPENSSL_NO_EC */
#endif
#ifndef OPENSSL_NO_PSK
if (ss->psk_identity_hint != NULL)
- OPENSSL_free(ss->psk_identity_hint);
+ free(ss->psk_identity_hint);
if (ss->psk_identity != NULL)
- OPENSSL_free(ss->psk_identity);
+ free(ss->psk_identity);
#endif
#ifndef OPENSSL_NO_SRP
if (ss->srp_username != NULL)
- OPENSSL_free(ss->srp_username);
+ free(ss->srp_username);
#endif
OPENSSL_cleanse(ss, sizeof(*ss));
- OPENSSL_free(ss);
+ free(ss);
}
int
@@ -768,7 +768,7 @@ SSL_set_session(SSL *s, SSL_SESSION *session)
#ifndef OPENSSL_NO_KRB5
if (s->kssl_ctx && !s->kssl_ctx->client_princ &&
session->krb5_client_princ_len > 0) {
- s->kssl_ctx->client_princ = (char *)OPENSSL_malloc(session->krb5_client_princ_len + 1);
+ s->kssl_ctx->client_princ = (char *)malloc(session->krb5_client_princ_len + 1);
memcpy(s->kssl_ctx->client_princ, session->krb5_client_princ,
session->krb5_client_princ_len);
s->kssl_ctx->client_princ[session->krb5_client_princ_len] = '\0';
@@ -900,11 +900,11 @@ SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len)
{
if (s->version >= TLS1_VERSION) {
if (s->tlsext_session_ticket) {
- OPENSSL_free(s->tlsext_session_ticket);
+ free(s->tlsext_session_ticket);
s->tlsext_session_ticket = NULL;
}
- s->tlsext_session_ticket = OPENSSL_malloc(sizeof(TLS_SESSION_TICKET_EXT) + ext_len);
+ s->tlsext_session_ticket = malloc(sizeof(TLS_SESSION_TICKET_EXT) + ext_len);
if (!s->tlsext_session_ticket) {
SSLerr(SSL_F_SSL_SET_SESSION_TICKET_EXT, ERR_R_MALLOC_FAILURE);
return 0;