diff --git a/lib/pki_evp.cpp b/lib/pki_evp.cpp index 570f3e4d..5eed8b49 100644 --- a/lib/pki_evp.cpp +++ b/lib/pki_evp.cpp @@ -846,8 +846,8 @@ void pki_evp::writePKCS8(XFile &file, const EVP_CIPHER *enc, pem_password_cb *cb, bool pem) const { pass_info p(XCA_TITLE, - tr("Please enter the password protecting the PKCS#8 key '%1'") - .arg(getIntName())); + tr("Please enter the password to protect the PKCS#8 key '%1' in file:\n%2") + .arg(getIntName()).arg(nativeSeparator(file.fileName()))); EVP_PKEY *pkey = decryptKey(); if (!pkey) { pki_openssl_error(); @@ -903,8 +903,8 @@ void pki_evp::writeKey(XFile &file, const EVP_CIPHER *enc, pem_password_cb *cb, bool pem) const { pass_info p(XCA_TITLE, - tr("Please enter the export password for the private key '%1'") - .arg(getIntName())); + tr("Please enter the password to protect the private key '%1' in file:\n%2") + .arg(getIntName()).arg(nativeSeparator(file.fileName()))); if (isPubKey()) { writePublic(file, pem); diff --git a/lib/pki_pkcs12.cpp b/lib/pki_pkcs12.cpp index 8539121f..7706578f 100644 --- a/lib/pki_pkcs12.cpp +++ b/lib/pki_pkcs12.cpp @@ -133,12 +133,15 @@ void pki_pkcs12::writePKCS12(XFile &file, encAlgo &encAlgo) const { Passwd pass; PKCS12 *pkcs12; - pass_info p(XCA_TITLE, - tr("Please enter the password to encrypt the PKCS#12 file")); if (cert == NULL || key == NULL) my_error(tr("No key or no Cert and no pkcs12")); + pass_info p(XCA_TITLE, + tr("Please enter the password to encrypt the key of certificate '%1' " + "in the PKCS#12 file:\n%2") + .arg(cert->getIntName()).arg(nativeSeparator(file.fileName()))); + if (PwDialogCore::execute(&p, &pass, true) != 1) return;