Author: rjung Date: Sun Jul 10 16:40:31 2011 New Revision: 1144899 URL: http://svn.apache.org/viewvc?rev=1144899&view=rev Log: Revert r1141392 which seems to be a bad backport of r114138.
Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/sslcontext.c?rev=1144899&r1=1144898&r2=1144899&view=diff ============================================================================== --- tomcat/native/branches/1.1.x/native/src/sslcontext.c (original) +++ tomcat/native/branches/1.1.x/native/src/sslcontext.c Sun Jul 10 16:40:31 2011 @@ -447,6 +447,7 @@ static EVP_PKEY *load_pem_key(tcn_ssl_ct BIO *bio = NULL; EVP_PKEY *key = NULL; tcn_pass_cb_t *cb_data = c->cb_data; + int i; if ((bio = BIO_new(BIO_s_file())) == NULL) { return NULL; @@ -457,14 +458,14 @@ static EVP_PKEY *load_pem_key(tcn_ssl_ct } if (!cb_data) cb_data = &tcn_password_callback; - cert = PEM_read_bio_X509_AUX(bio, NULL, - (pem_password_cb *)SSL_password_callback, - (void *)cb_data); - if (cert == NULL && - (ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE)) { - ERR_clear_error(); + for (i = 0; i < 3; i++) { + key = PEM_read_bio_PrivateKey(bio, NULL, + (pem_password_cb *)SSL_password_callback, + (void *)cb_data); + if (key) + break; + cb_data->password[0] = '\0'; BIO_ctrl(bio, BIO_CTRL_RESET, 0, NULL); - cert = d2i_X509_bio(bio, NULL); } BIO_free(bio); return key; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org