mirror of
https://github.com/chris2511/xca.git
synced 2026-09-14 11:06:19 +05:00
fix email:copy and issuer:copy for requests
This commit is contained in:
parent
fa92c4c31f
commit
e28e2cc4b2
@ -537,7 +537,6 @@ void NewX509::newKeyDone(QString name)
|
||||
{
|
||||
keyList->insertItem(0, name);
|
||||
keyList->setCurrentIndex(0);
|
||||
//on_keyList_highlighted(name);
|
||||
toggleOkBut();
|
||||
}
|
||||
|
||||
@ -677,14 +676,18 @@ void NewX509::editV3ext(QLineEdit *le, QString types, int n)
|
||||
|
||||
void NewX509::on_editSubAlt_clicked()
|
||||
{
|
||||
editV3ext(subAltName, "email,email:copy,RID,URI,DNS,IP,otherName",
|
||||
NID_subject_alt_name);
|
||||
QString s = "email,RID,URI,DNS,IP,otherName";
|
||||
if (pt != x509_req)
|
||||
s = QString("email:copy,") + s;
|
||||
editV3ext(subAltName, s, NID_subject_alt_name);
|
||||
}
|
||||
|
||||
void NewX509::on_editIssAlt_clicked()
|
||||
{
|
||||
editV3ext(issAltName, "email,RID,URI,DNS,IP,issuer:copy,otherName",
|
||||
NID_issuer_alt_name);
|
||||
QString s = "email,RID,URI,DNS,IP,otherName";
|
||||
if (pt != x509_req)
|
||||
s = QString("issuer:copy,");
|
||||
editV3ext(issAltName, s, NID_issuer_alt_name);
|
||||
}
|
||||
|
||||
void NewX509::on_editCrlDist_clicked()
|
||||
|
||||
@ -155,14 +155,32 @@ x509v3ext NewX509::getEkeyUsage()
|
||||
x509v3ext NewX509::getSubAltName()
|
||||
{
|
||||
x509v3ext ext;
|
||||
ext.create(NID_subject_alt_name, subAltName->text(), &ext_ctx);
|
||||
QString s = subAltName->text();
|
||||
if (pt == x509_req) {
|
||||
QStringList sn, sl = s.split(',');
|
||||
foreach (QString str, sl) {
|
||||
if (str != "email:copy")
|
||||
sn += str;
|
||||
}
|
||||
s = sn.join(",");
|
||||
}
|
||||
ext.create(NID_subject_alt_name, s, &ext_ctx);
|
||||
return ext;
|
||||
}
|
||||
|
||||
x509v3ext NewX509::getIssAltName()
|
||||
{
|
||||
x509v3ext ext;
|
||||
ext.create(NID_issuer_alt_name, issAltName->text(), &ext_ctx);
|
||||
QString s = issAltName->text();
|
||||
if (pt == x509_req) {
|
||||
QStringList sn, sl = s.split(',');
|
||||
foreach (QString str, sl) {
|
||||
if (str != "issuer:copy")
|
||||
sn += str;
|
||||
}
|
||||
s = sn.join(",");
|
||||
}
|
||||
ext.create(NID_issuer_alt_name, s, &ext_ctx);
|
||||
return ext;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user