mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Extend password write dialogs by the file name
Now the Password dialog for exported items also shows the file name of the current export and not only the internal name of the item.
This commit is contained in:
parent
ec3dec0b44
commit
1ac1dc0a71
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user