DTLS 1.2 cached record support.
[oweals/openssl.git] / ssl / ssl_rsa.c
index 507a3d17739b1728ccaa9af1d3fe1efe2e0492be..2837624ae9e387590cba33fdc8ac17259f2defc6 100644 (file)
@@ -463,23 +463,6 @@ static int ssl_set_cert(CERT *c, X509 *x)
                X509_free(c->pkeys[i].x509);
        CRYPTO_add(&x->references,1,CRYPTO_LOCK_X509);
        c->pkeys[i].x509=x;
-#ifndef OPENSSL_NO_TLSEXT
-       /* Free the old authz data, if it exists. */
-       if (c->pkeys[i].authz != NULL)
-               {
-               OPENSSL_free(c->pkeys[i].authz);
-               c->pkeys[i].authz = NULL;
-               c->pkeys[i].authz_length = 0;
-               }
-
-       /* Free the old serverinfo data, if it exists. */
-       if (c->pkeys[i].serverinfo != NULL)
-               {
-               OPENSSL_free(c->pkeys[i].serverinfo);
-               c->pkeys[i].serverinfo = NULL;
-               c->pkeys[i].serverinfo_length = 0;
-               }
-#endif
        c->key= &(c->pkeys[i]);
 
        c->valid=0;
@@ -1083,7 +1066,7 @@ int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
        if (!serverinfo_process_buffer(serverinfo, serverinfo_length, NULL))
                {
                SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO,SSL_R_INVALID_SERVERINFO_DATA);
-               return(0);
+               return 0;
                }
        if (!ssl_cert_inst(&ctx->cert))
                {
@@ -1096,7 +1079,7 @@ int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
                return 0;
                }
        ctx->cert->key->serverinfo = OPENSSL_realloc(ctx->cert->key->serverinfo,
-                                                                                               serverinfo_length);
+                                                    serverinfo_length);
        if (ctx->cert->key->serverinfo == NULL)
                {
                SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO,ERR_R_MALLOC_FAILURE);
@@ -1110,7 +1093,7 @@ int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
        if (!serverinfo_process_buffer(serverinfo, serverinfo_length, ctx))
                {
                SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO,SSL_R_INVALID_SERVERINFO_DATA);
-               return(0);
+               return 0;
                }
        return 1;
        }