diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-23 11:20:53 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-23 11:20:53 +0300 |
commit | 12fdf29fffaad285687bef9075214077654ebd74 (patch) | |
tree | 00591dfd9966bdf7a24c98257c407536dfae4ba8 /src/gmcerts.h | |
parent | cb394df2956b5a24ea3e179bdfa313ff959f407c (diff) |
GmCerts: Identity management
Loading and creating client certificates.
Diffstat (limited to 'src/gmcerts.h')
-rw-r--r-- | src/gmcerts.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/gmcerts.h b/src/gmcerts.h index 7f8bb3f5..6f34e5dd 100644 --- a/src/gmcerts.h +++ b/src/gmcerts.h | |||
@@ -24,7 +24,31 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
24 | 24 | ||
25 | #include <the_Foundation/tlsrequest.h> | 25 | #include <the_Foundation/tlsrequest.h> |
26 | 26 | ||
27 | iDeclareType(GmIdentity) | ||
28 | iDeclareTypeConstruction(GmIdentity) | ||
29 | iDeclareTypeSerialization(GmIdentity) | ||
30 | |||
31 | enum iGmIdentityFlags { | ||
32 | temporary_GmIdentityFlag = 0x1, /* not saved persistently */ | ||
33 | }; | ||
34 | |||
35 | struct Impl_GmIdentity { | ||
36 | // iString fileName; | ||
37 | iBlock fingerprint; | ||
38 | iTlsCertificate *cert; | ||
39 | iSortedArray useUrls; /* Strings */ | ||
40 | iChar icon; | ||
41 | iString notes; /* private, local usage notes */ | ||
42 | int flags; | ||
43 | }; | ||
44 | |||
27 | iDeclareType(GmCerts) | 45 | iDeclareType(GmCerts) |
28 | iDeclareTypeConstructionArgs(GmCerts, const char *saveDir) | 46 | iDeclareTypeConstructionArgs(GmCerts, const char *saveDir) |
29 | 47 | ||
30 | iBool checkTrust_GmCerts (iGmCerts *, iRangecc domain, const iTlsCertificate *cert); | 48 | iBool checkTrust_GmCerts (iGmCerts *, iRangecc domain, const iTlsCertificate *cert); |
49 | |||
50 | const iGmIdentity * identityForUrl_GmCerts (const iGmCerts *, const iString *url); | ||
51 | |||
52 | iGmIdentity * newIdentity_GmCerts (iGmCerts *, int flags, iDate validUntil, | ||
53 | const iString *commonName, const iString *userId, | ||
54 | const iString *org, const iString *country); | ||