use DN from pkcs10 request if it exists
This commit is contained in:
@@ -289,11 +289,6 @@ static int issue()
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
id = identification_create_from_encoding(ID_DER_ASN1_DN,
|
|
||||||
chunk_from_chars(ASN1_SEQUENCE, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
DBG2(DBG_LIB, "Reading ca certificate:");
|
DBG2(DBG_LIB, "Reading ca certificate:");
|
||||||
ca = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
|
ca = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
|
||||||
@@ -430,6 +425,12 @@ static int issue()
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!id)
|
||||||
|
{
|
||||||
|
id = identification_create_from_encoding(ID_DER_ASN1_DN,
|
||||||
|
chunk_from_chars(ASN1_SEQUENCE, 0));
|
||||||
|
}
|
||||||
|
|
||||||
not_before = time(NULL);
|
not_before = time(NULL);
|
||||||
not_after = not_before + lifetime * 24 * 60 * 60;
|
not_after = not_before + lifetime * 24 * 60 * 60;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user