I'm having troubles with ext/openssl.c and OpenSSL 0.9.7g on SuSE 10: EVP_PKEY_EC is not defined.
The attached patch fixes the problem for me. - Chris
Index: ext/openssl/openssl.c =================================================================== RCS file: /repository/php-src/ext/openssl/openssl.c,v retrieving revision 1.98.2.5.2.11 diff -u -r1.98.2.5.2.11 openssl.c --- ext/openssl/openssl.c 15 Aug 2006 20:27:20 -0000 1.98.2.5.2.11 +++ ext/openssl/openssl.c 23 Aug 2006 15:40:57 -0000 @@ -70,7 +70,9 @@ OPENSSL_KEYTYPE_DSA, OPENSSL_KEYTYPE_DH, OPENSSL_KEYTYPE_DEFAULT = OPENSSL_KEYTYPE_RSA, +#ifdef EVP_PKEY_EC OPENSSL_KEYTYPE_EC = OPENSSL_KEYTYPE_DH +1 +#endif }; enum php_openssl_cipher_type { @@ -695,7 +697,9 @@ REGISTER_LONG_CONSTANT("OPENSSL_KEYTYPE_DSA", OPENSSL_KEYTYPE_DSA, CONST_CS|CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("OPENSSL_KEYTYPE_DH", OPENSSL_KEYTYPE_DH, CONST_CS|CONST_PERSISTENT); +#ifdef EVP_PKEY_EC REGISTER_LONG_CONSTANT("OPENSSL_KEYTYPE_EC", OPENSSL_KEYTYPE_EC, CONST_CS|CONST_PERSISTENT); +#endif /* Determine default SSL configuration file */ config_filename = getenv("OPENSSL_CONF"); @@ -2327,9 +2331,11 @@ case EVP_PKEY_DH: ktype = OPENSSL_KEYTYPE_DH; break; +#ifdef EVP_PKEY_EC case EVP_PKEY_EC: ktype = OPENSSL_KEYTYPE_EC; break; +#endif default: ktype = -1; break;
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php