Merge branch 'PHP-7.1'

This commit is contained in:
Jakub Zelenka 2016-08-03 20:07:57 +01:00
commit 9ed2a70757

View File

@ -1016,7 +1016,8 @@ static int add_oid_section(struct php_x509_request * req) /* {{{ */
}
for (i = 0; i < sk_CONF_VALUE_num(sktmp); i++) {
cnf = sk_CONF_VALUE_value(sktmp, i);
if (OBJ_create(cnf->value, cnf->name, cnf->name) == NID_undef) {
if (OBJ_sn2nid(cnf->name) == NID_undef && OBJ_ln2nid(cnf->name) == NID_undef &&
OBJ_create(cnf->value, cnf->name, cnf->name) == NID_undef) {
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING, "problem creating object %s=%s", cnf->name, cnf->value);
return FAILURE;