diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gmcerts.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gmcerts.c b/src/gmcerts.c index d8e77b12..2c7b1122 100644 --- a/src/gmcerts.c +++ b/src/gmcerts.c | |||
@@ -589,8 +589,15 @@ static iGmIdentity *add_GmCerts_(iGmCerts *d, iTlsCertificate *cert, int flags) | |||
589 | iGmIdentity *newIdentity_GmCerts(iGmCerts *d, int flags, iDate validUntil, const iString *commonName, | 589 | iGmIdentity *newIdentity_GmCerts(iGmCerts *d, int flags, iDate validUntil, const iString *commonName, |
590 | const iString *email, const iString *userId, const iString *domain, | 590 | const iString *email, const iString *userId, const iString *domain, |
591 | const iString *org, const iString *country) { | 591 | const iString *org, const iString *country) { |
592 | /* Note: RFC 5280 defines a self-signed CA certificate as also being self-issued, so | ||
593 | to honor this definition we set the issuer and the subject to be fully equivalent. */ | ||
592 | const iTlsCertificateName names[] = { | 594 | const iTlsCertificateName names[] = { |
593 | { issuerCommonName_TlsCertificateNameType, commonName }, | 595 | { issuerCommonName_TlsCertificateNameType, commonName }, |
596 | { issuerEmailAddress_TlsCertificateNameType, !isEmpty_String(email) ? email : NULL }, | ||
597 | { issuerUserId_TlsCertificateNameType, !isEmpty_String(userId) ? userId : NULL }, | ||
598 | { issuerDomain_TlsCertificateNameType, !isEmpty_String(domain) ? domain : NULL }, | ||
599 | { issuerOrganization_TlsCertificateNameType, !isEmpty_String(org) ? org : NULL }, | ||
600 | { issuerCountry_TlsCertificateNameType, !isEmpty_String(country) ? country : NULL }, | ||
594 | { subjectCommonName_TlsCertificateNameType, commonName }, | 601 | { subjectCommonName_TlsCertificateNameType, commonName }, |
595 | { subjectEmailAddress_TlsCertificateNameType, !isEmpty_String(email) ? email : NULL }, | 602 | { subjectEmailAddress_TlsCertificateNameType, !isEmpty_String(email) ? email : NULL }, |
596 | { subjectUserId_TlsCertificateNameType, !isEmpty_String(userId) ? userId : NULL }, | 603 | { subjectUserId_TlsCertificateNameType, !isEmpty_String(userId) ? userId : NULL }, |