From: Andreas Steffen Date: Mon, 7 Feb 2011 22:41:54 +0000 (+0100) Subject: use DN from pkcs10 request if it exists X-Git-Tag: 4.5.1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eead71eb75c0bba457e6f881663494f0a21fe7d4;p=thirdparty%2Fstrongswan.git use DN from pkcs10 request if it exists --- diff --git a/src/pki/commands/issue.c b/src/pki/commands/issue.c index 4829413987..6a5686d92a 100644 --- a/src/pki/commands/issue.c +++ b/src/pki/commands/issue.c @@ -289,11 +289,6 @@ static int issue() goto end; } } - else - { - id = identification_create_from_encoding(ID_DER_ASN1_DN, - chunk_from_chars(ASN1_SEQUENCE, 0)); - } DBG2(DBG_LIB, "Reading ca certificate:"); ca = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509, @@ -430,6 +425,12 @@ static int issue() goto end; } + if (!id) + { + id = identification_create_from_encoding(ID_DER_ASN1_DN, + chunk_from_chars(ASN1_SEQUENCE, 0)); + } + not_before = time(NULL); not_after = not_before + lifetime * 24 * 60 * 60;