summaryrefslogtreecommitdiff
path: root/src/gmcerts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmcerts.c')
-rw-r--r--src/gmcerts.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gmcerts.c b/src/gmcerts.c
index 96013392..b24a6d9c 100644
--- a/src/gmcerts.c
+++ b/src/gmcerts.c
@@ -170,6 +170,10 @@ void clearUse_GmIdentity(iGmIdentity *d) {
170 clear_StringSet(d->useUrls); 170 clear_StringSet(d->useUrls);
171} 171}
172 172
173const iString *name_GmIdentity(const iGmIdentity *d) {
174 return collect_String(subject_TlsCertificate(d->cert));
175}
176
173iDefineTypeConstruction(GmIdentity) 177iDefineTypeConstruction(GmIdentity)
174 178
175/*-----------------------------------------------------------------------------------------------*/ 179/*-----------------------------------------------------------------------------------------------*/
@@ -481,3 +485,13 @@ const iPtrArray *identities_GmCerts(const iGmCerts *d) {
481 return &d->idents; 485 return &d->idents;
482} 486}
483 487
488void signIn_GmCerts(iGmCerts *d, iGmIdentity *identity, const iString *url) {
489 signOut_GmCerts(d, url);
490 setUse_GmIdentity(identity, url, iTrue);
491}
492
493void signOut_GmCerts(iGmCerts *d, const iString *url) {
494 iForEach(PtrArray, i, &d->idents) {
495 setUse_GmIdentity(i.ptr, url, iFalse);
496 }
497}