-/* ssl/t1_enc.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <stdio.h>
#include "ssl_locl.h"
-#ifndef OPENSSL_NO_COMP
-# include <openssl/comp.h>
-#endif
+#include <openssl/comp.h>
#include <openssl/evp.h>
#include <openssl/kdf.h>
#include <openssl/rand.h>
SSL_R_COMPRESSION_LIBRARY_ERROR);
goto err2;
}
- if (!RECORD_LAYER_setup_comp_buffer(&s->rlayer))
- goto err;
}
#endif
/*
}
EVP_PKEY_free(mac_key);
}
-#ifdef TLS_DEBUG
+#ifdef SSL_DEBUG
printf("which = %04X\nmac key=", which);
{
int z;
}
#endif
-#ifdef TLS_DEBUG
+#ifdef SSL_DEBUG
printf("which = %04X\nkey=", which);
{
int z;
s->s3->tmp.key_block_length = num;
s->s3->tmp.key_block = p;
-#ifdef TLS_DEBUG
+#ifdef SSL_DEBUG
printf("client random\n");
{
int z;
#endif
if (!tls1_generate_key_block(s, p, num))
goto err;
-#ifdef TLS_DEBUG
+#ifdef SSL_DEBUG
printf("\nkey block\n");
{
int z;
for (z = 0; z < num; z++)
- printf("%02X%c", p1[z], ((z + 1) % 16) ? ' ' : '\n');
+ printf("%02X%c", p[z], ((z + 1) % 16) ? ' ' : '\n');
}
#endif
const unsigned char *context,
size_t contextlen, int use_context)
{
- unsigned char *buff;
unsigned char *val = NULL;
size_t vallen = 0, currentvalpos;
int rv;
- buff = OPENSSL_malloc(olen);
- if (buff == NULL)
- goto err2;
-
/*
* construct PRF arguments we construct the PRF argument ourself rather
* than passing separate values into the TLS PRF to ensure that the
SSLerr(SSL_F_TLS1_EXPORT_KEYING_MATERIAL, ERR_R_MALLOC_FAILURE);
rv = 0;
ret:
- CRYPTO_clear_free(val, vallen);
- CRYPTO_clear_free(buff, olen);
+ OPENSSL_clear_free(val, vallen);
return (rv);
}
return (TLS1_AD_UNKNOWN_PSK_IDENTITY);
case SSL_AD_INAPPROPRIATE_FALLBACK:
return (TLS1_AD_INAPPROPRIATE_FALLBACK);
+ case SSL_AD_NO_APPLICATION_PROTOCOL:
+ return (TLS1_AD_NO_APPLICATION_PROTOCOL);
default:
return (-1);
}