summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gmcerts.c12
-rw-r--r--src/gmcerts.h6
-rw-r--r--src/gmrequest.c1
3 files changed, 10 insertions, 9 deletions
diff --git a/src/gmcerts.c b/src/gmcerts.c
index 09728414..96013392 100644
--- a/src/gmcerts.c
+++ b/src/gmcerts.c
@@ -277,6 +277,7 @@ static void loadIdentityFromCertificate_GmCerts_(iGmCerts *d, const iString *crt
277 iDate today; 277 iDate today;
278 initCurrent_Date(&today); 278 initCurrent_Date(&today);
279 set_String(&ident->notes, collect_String(format_Date(&today, "Imported on %b %d, %Y"))); 279 set_String(&ident->notes, collect_String(format_Date(&today, "Imported on %b %d, %Y")));
280 pushBack_PtrArray(&d->idents, ident);
280 } 281 }
281 setCertificate_GmIdentity_(ident, cert); 282 setCertificate_GmIdentity_(ident, cert);
282 delete_Block(finger); 283 delete_Block(finger);
@@ -414,15 +415,16 @@ const iGmIdentity *identityForUrl_GmCerts(const iGmCerts *d, const iString *url)
414} 415}
415 416
416iGmIdentity *newIdentity_GmCerts(iGmCerts *d, int flags, iDate validUntil, const iString *commonName, 417iGmIdentity *newIdentity_GmCerts(iGmCerts *d, int flags, iDate validUntil, const iString *commonName,
417 const iString *userId, const iString *domain, const iString *org, 418 const iString *email, const iString *userId, const iString *domain,
418 const iString *country) { 419 const iString *org, const iString *country) {
419 const iTlsCertificateName names[] = { 420 const iTlsCertificateName names[] = {
420 { issuerCommonName_TlsCertificateNameType, collectNewCStr_String("Lagrange v" LAGRANGE_APP_VERSION) }, 421 { issuerCommonName_TlsCertificateNameType, collectNewCStr_String("Lagrange v" LAGRANGE_APP_VERSION) },
421 { issuerDomain_TlsCertificateNameType, collectNewCStr_String("lagrange.skyjake.fi") }, 422 { issuerDomain_TlsCertificateNameType, collectNewCStr_String("lagrange.skyjake.fi") },
422 { subjectCommonName_TlsCertificateNameType, commonName }, 423 { subjectCommonName_TlsCertificateNameType, commonName },
423 { subjectUserId_TlsCertificateNameType, !isEmpty_String(userId) ? userId : NULL }, 424 { subjectEmailAddress_TlsCertificateNameType, !isEmpty_String(email) ? email : NULL },
424 { subjectDomain_TlsCertificateNameType, !isEmpty_String(domain) ? domain : NULL }, 425 { subjectUserId_TlsCertificateNameType, !isEmpty_String(userId) ? userId : NULL },
425 { subjectOrganization_TlsCertificateNameType, !isEmpty_String(org) ? org : NULL }, 426 { subjectDomain_TlsCertificateNameType, !isEmpty_String(domain) ? domain : NULL },
427 { subjectOrganization_TlsCertificateNameType, !isEmpty_String(org) ? org : NULL },
426 { subjectCountry_TlsCertificateNameType, !isEmpty_String(country) ? country : NULL }, 428 { subjectCountry_TlsCertificateNameType, !isEmpty_String(country) ? country : NULL },
427 { 0, NULL } 429 { 0, NULL }
428 }; 430 };
diff --git a/src/gmcerts.h b/src/gmcerts.h
index db1a6200..4be23169 100644
--- a/src/gmcerts.h
+++ b/src/gmcerts.h
@@ -69,9 +69,9 @@ iBool checkTrust_GmCerts (iGmCerts *, iRangecc domain, const
69 * @returns Created identity. GmCerts retains ownership of returned object. 69 * @returns Created identity. GmCerts retains ownership of returned object.
70 */ 70 */
71iGmIdentity * newIdentity_GmCerts (iGmCerts *, int flags, iDate validUntil, 71iGmIdentity * newIdentity_GmCerts (iGmCerts *, int flags, iDate validUntil,
72 const iString *commonName, const iString *userId, 72 const iString *commonName, const iString *email,
73 const iString *domain, const iString *org, 73 const iString *userId, const iString *domain,
74 const iString *country); 74 const iString *org, const iString *country);
75 75
76void deleteIdentity_GmCerts (iGmCerts *, iGmIdentity *identity); 76void deleteIdentity_GmCerts (iGmCerts *, iGmIdentity *identity);
77 77
diff --git a/src/gmrequest.c b/src/gmrequest.c
index b2022609..391c7e89 100644
--- a/src/gmrequest.c
+++ b/src/gmrequest.c
@@ -384,7 +384,6 @@ static const iBlock *replaceVariables_(const iBlock *block) {
384 } 384 }
385 remove_Block(replaced, span.start, size_Range(&span)); 385 remove_Block(replaced, span.start, size_Range(&span));
386 insertData_Block(replaced, span.start, repl.start, size_Range(&repl)); 386 insertData_Block(replaced, span.start, repl.start, size_Range(&repl));
387 printf("{%s}\n", cstr_Block(replaced));
388 iZap(m); 387 iZap(m);
389 } while (matchRange_RegExp(var, range_Block(replaced), &m)); 388 } while (matchRange_RegExp(var, range_Block(replaced), &m));
390 block = replaced; 389 block = replaced;