7101901 Apache HTTP server crashes when tested with TLSv1 using OpenSSL pkcs11 engine
--- a/components/openssl/openssl-1.0.0/engines/pkcs11/hw_pk11.c Thu Nov 17 14:40:44 2011 -0800
+++ b/components/openssl/openssl-1.0.0/engines/pkcs11/hw_pk11.c Thu Nov 17 16:59:01 2011 -0800
@@ -2911,9 +2911,12 @@
CK_BYTE_PTR pstate = NULL;
CK_ULONG ul_state_len;
+ if (from->md_data == NULL || to->digest->ctx_size == 0)
+ return (1);
+
/* The copy-from state */
state = (PK11_CIPHER_STATE *) from->md_data;
- if (state == NULL || state->sp == NULL)
+ if (state->sp == NULL)
goto err;
/* Initialize the copy-to state */