diff options
Diffstat (limited to 'src/gmcerts.c')
-rw-r--r-- | src/gmcerts.c | 14 |
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 | ||
173 | const iString *name_GmIdentity(const iGmIdentity *d) { | ||
174 | return collect_String(subject_TlsCertificate(d->cert)); | ||
175 | } | ||
176 | |||
173 | iDefineTypeConstruction(GmIdentity) | 177 | iDefineTypeConstruction(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 | ||
488 | void signIn_GmCerts(iGmCerts *d, iGmIdentity *identity, const iString *url) { | ||
489 | signOut_GmCerts(d, url); | ||
490 | setUse_GmIdentity(identity, url, iTrue); | ||
491 | } | ||
492 | |||
493 | void signOut_GmCerts(iGmCerts *d, const iString *url) { | ||
494 | iForEach(PtrArray, i, &d->idents) { | ||
495 | setUse_GmIdentity(i.ptr, url, iFalse); | ||
496 | } | ||
497 | } | ||