--- openssl_tpm_engine-0.4.2/e_tpm.c	2013-03-13 18:04:43.442311549 +0100
+++ openssl_tpm_engine-0.4.2.patched/e_tpm.c	2013-03-13 18:07:23.910750350 +0100
@@ -681,7 +681,6 @@
 		TSSerr(TPM_F_TPM_ENGINE_LOAD_KEY, ERR_R_MALLOC_FAILURE);
 		return NULL;
 	}
-	pkey->type = EVP_PKEY_RSA;
 
 	if ((rsa = RSA_new()) == NULL) {
 		EVP_PKEY_free(pkey);
@@ -692,7 +691,6 @@
 	rsa->meth = &tpm_rsa;
 	/* call our local init function here */
 	rsa->meth->init(rsa);
-	pkey->pkey.rsa = rsa;
 
 	if (!fill_out_rsa_object(rsa, hKey)) {
 		EVP_PKEY_free(pkey);
