bug in V3 extensions removed

Version++
This commit is contained in:
chris 2002-07-14 23:23:27 +00:00
parent 71b6ea7cdd
commit b94f7768b4
2 changed files with 9 additions and 6 deletions

View File

@ -99,24 +99,26 @@ void MainWindow::newCert()
}
cert->addV3ext(NID_basic_constraints, constraints);
cerr << "B-Const:" << constraints << endl;
// Subject Key identifier
if (dlg3->subKey->isChecked()) {
string subkey="hash";
cert->addV3ext(NID_subject_key_identifier, subkey);
cerr << subkey <<endl;
}
// Authority Key identifier
if (dlg3->authKey->isChecked()) {
string authkey="keyid,issuer:always";
cert->addV3ext(NID_authority_key_identifier, authkey);
cerr << authkey <<endl;
}
// key usage
char *keyusage[] ={"digitalSignature", "nonRepudiation", "keyEncipherment",
"dataEncipherment", "keyAgreement", "keyCertSign",
"cRLSign", "encipherOnly", "decipherOnly"};
QListBoxItem *item;
int i=0;
string keyuse;
string keyuse, keyuse1;
while ((item = dlg3->keyUsage->item(i))) {
if (item->selected()){
if (keyuse.length() > 0) keyuse +=", ";
@ -126,9 +128,10 @@ void MainWindow::newCert()
}
if (keyuse.length() > 0)
if (dlg3->kuCritical->isChecked()) keyuse = "critical," + keyuse;
cert->addV3ext(NID_key_usage, keyuse);
cerr << "KeyUsage:" <<keyuse;
if (dlg3->kuCritical->isChecked()) keyuse1 = "critical," + keyuse;
cert->addV3ext(NID_key_usage, keyuse1);
cerr << "KeyUsage:" <<keyuse1<< endl;
// and finally sign the request
cert->sign(signkey);

View File

@ -1,4 +1,4 @@
VERSION=0.2.0
VERSION=0.2.1
TAG=$(shell echo "V.$(VERSION)" |sed "s/\./_/g" )
TARGET=xca-$(VERSION)