summaryrefslogtreecommitdiff
path: root/src/gmcerts.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-23 11:20:53 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-23 11:20:53 +0300
commit12fdf29fffaad285687bef9075214077654ebd74 (patch)
tree00591dfd9966bdf7a24c98257c407536dfae4ba8 /src/gmcerts.h
parentcb394df2956b5a24ea3e179bdfa313ff959f407c (diff)
GmCerts: Identity management
Loading and creating client certificates.
Diffstat (limited to 'src/gmcerts.h')
-rw-r--r--src/gmcerts.h26
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
27iDeclareType(GmIdentity)
28iDeclareTypeConstruction(GmIdentity)
29iDeclareTypeSerialization(GmIdentity)
30
31enum iGmIdentityFlags {
32 temporary_GmIdentityFlag = 0x1, /* not saved persistently */
33};
34
35struct 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
27iDeclareType(GmCerts) 45iDeclareType(GmCerts)
28iDeclareTypeConstructionArgs(GmCerts, const char *saveDir) 46iDeclareTypeConstructionArgs(GmCerts, const char *saveDir)
29 47
30iBool checkTrust_GmCerts (iGmCerts *, iRangecc domain, const iTlsCertificate *cert); 48iBool checkTrust_GmCerts (iGmCerts *, iRangecc domain, const iTlsCertificate *cert);
49
50const iGmIdentity * identityForUrl_GmCerts (const iGmCerts *, const iString *url);
51
52iGmIdentity * newIdentity_GmCerts (iGmCerts *, int flags, iDate validUntil,
53 const iString *commonName, const iString *userId,
54 const iString *org, const iString *country);