https://bugs.koozali.org/show_bug.cgi?id=12420
Bug ID: 12420
Summary: phpki-ng Create and download file has no name
Classification: Contribs
Product: SME Contribs
Version: 10.0
Hardware: ---
OS: ---
Status: CONFIRMED
Severity: normal
Priority: P3
Component: phpki-ng
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
If we try Create and Download we get a file called:
p12
It should actually be:
SomeName.p12
I suspect that this is due to a copy error.
In manage_certs.php
We have this
case 'PKCS#12':
upload($config['pfx_dir'] . "/$serial.pfx",
"$rec[common_name].p12", 'application/x-pkcs12');
But in request_cert.php we can see some modified lines.
if ($submit == "Yes. Create and Download") {
switch ($cert_type) {
case 'server':
#
upload(array("$config[private_dir]/$serial-key.pem","$config[new_certs_dir]/$serial.pem",$config['cacert_pem']),
"$common_name ($email).pem",'application/pkix-cert');
upload(array($config['private_dir'] .
"/$serial-key.pem",$config['new_certs_dir'] .
"/$serial.pem",$config['cacert_pem']), $rec['common_name'] . "-Bundle.pem",
'application/pkix-cert');
break;
case 'email':
case 'email_signing':
case 'time_stamping':
case 'vpn_client_server':
case 'vpn_client':
case 'vpn_server':
# upload("$config[pfx_dir]/$serial.pfx", "$common_name
($email).p12", 'application/x-pkcs12');
upload($config['pfx_dir'] . "/$serial.pfx",
$rec['common_name'] . ".p12", 'application/x-pkcs12');
break;
}
The name was created like this:
"$common_name ($email).p12"
But has been changed to this:
$rec['common_name'] . ".p12"
First, I don't think $rec['common_name'] exists.
Also it means all p12 certificates would have the same name.
We probably ought to distinguish them for downloads.
Possibly linked is the
phpki/ca/manage_certs.php?stage=display&serial=100001
Shows this in the Subject and Issuer:
OU=IT, CN=My Server/[email protected]
Which should be like:
OU=IT, CN=My Server, [email protected]
As shown when you do
openssl x509 -in "My-cert.pem" -text -noout
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/