diff options
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 = ")) { |