diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-01 13:55:11 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-01 13:55:11 +0200 |
commit | f4942e1b4da6dc1334dcdb4f2daae670bfa1f813 (patch) | |
tree | 3b0b638d4351311e8322e9c35da11078c27585c0 /src/gmcerts.c | |
parent | b3550138da3a669999c06da41720f2be664d5e86 (diff) |
Added switching to the identity toolbar menu
One can now use the identity toolbar menu to switch between client certificates that have been used on the current site. The five latest ones are remembered.
Diffstat (limited to 'src/gmcerts.c')
-rw-r--r-- | src/gmcerts.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gmcerts.c b/src/gmcerts.c index f95fea7d..345c36e0 100644 --- a/src/gmcerts.c +++ b/src/gmcerts.c | |||
@@ -201,6 +201,15 @@ void clearUse_GmIdentity(iGmIdentity *d) { | |||
201 | clear_StringSet(d->useUrls); | 201 | clear_StringSet(d->useUrls); |
202 | } | 202 | } |
203 | 203 | ||
204 | const iString *findUse_GmIdentity(const iGmIdentity *d, const iString *url) { | ||
205 | iConstForEach(StringSet, using, d->useUrls) { | ||
206 | if (startsWith_String(url, cstr_String(using.value))) { | ||
207 | return using.value; | ||
208 | } | ||
209 | } | ||
210 | return NULL; | ||
211 | } | ||
212 | |||
204 | const iString *name_GmIdentity(const iGmIdentity *d) { | 213 | const iString *name_GmIdentity(const iGmIdentity *d) { |
205 | iString *name = collect_String(subject_TlsCertificate(d->cert)); | 214 | iString *name = collect_String(subject_TlsCertificate(d->cert)); |
206 | if (startsWith_String(name, "CN = ")) { | 215 | if (startsWith_String(name, "CN = ")) { |