unsigned char padtmp[40];
unsigned char sha1tmp[SHA_DIGEST_LENGTH];
- SHA_CTX *sha1 = EVP_MD_CTX_md_data(ctx);
+ SHA_CTX *sha1;
if (cmd != EVP_CTRL_SSL3_MASTER_SECRET)
+ return -2;
+
+ if (ctx == NULL)
return 0;
+ sha1 = EVP_MD_CTX_md_data(ctx);
+
/* SSLv3 client auth handling: see RFC-6101 5.6.8 */
if (mslen != 48)
return 0;
const EVP_MD *EVP_sha1(void)
{
- return (&sha1_md);
+ return &sha1_md;
}
static int init224(EVP_MD_CTX *ctx)
const EVP_MD *EVP_sha224(void)
{
- return (&sha224_md);
+ return &sha224_md;
}
static const EVP_MD sha256_md = {
const EVP_MD *EVP_sha256(void)
{
- return (&sha256_md);
+ return &sha256_md;
}
static int init384(EVP_MD_CTX *ctx)
const EVP_MD *EVP_sha384(void)
{
- return (&sha384_md);
+ return &sha384_md;
}
static const EVP_MD sha512_md = {
const EVP_MD *EVP_sha512(void)
{
- return (&sha512_md);
+ return &sha512_md;
}