X509Context.h
1/* Emacs mode: -*- c++ -*- */
2/*
3 * Copyright (c) 2008-2009,2012 Isode Limited, London, England.
4 * All rights reserved.
5 *
6 * Acquisition and use of this software and related materials for any
7 * purpose requires a written licence agreement from Isode Limited,
8 * or a written licence from an organisation licenced by Isode Limited
9 * to grant such a licence.
10 *
11 * @VERSION@
12 *
13 */
14
15/*
16 * Declares things for X509_Context
17 */
18
19#ifndef __X509_CONTEXT_H
20#define __X509_CONTEXT_H
21
22#include <string>
23#include <list>
24#include <isode/crypto/x509.h>
25#include "cdecl.h"
26
27namespace X509_Context {
28 struct Config {
29 std::string ident_file;
30 std::string ident_pphr_file;
31 std::list<std::string> certs;
32 std::list<std::string> trust_anchors;
33 std::string ldap_host;
34 int ldap_port;
35 int check_revocation;
36 bool OCSPnonce;
37 std::string OCSPuri;
38 std::string OCSPresponder;
40
41 EVENTSVC_DLL Config() : ldap_port(389), check_revocation(0), OCSPnonce(false), lookup_flags(0) {}
42 EVENTSVC_DLL bool set_ldap_url(const std::string&);
43
44 EVENTSVC_DLL bool operator!=(const Config&) const;
45 };
46
47 struct Identity {
48 X509_IDENTITY *identity;
49 X509_CERT_CTX *cert_ctx;
50 EVENTSVC_DLL Identity(Config&);
51 EVENTSVC_DLL Identity(PKCS12 *p12, const char *pphr);
52
53 ~Identity() {
54 x509_destroy_identity(&identity);
55 x509_destroy_cert_ctx(&cert_ctx);
56 }
57
58 private:
59 Identity(const Identity&);
60 Identity(void);
61 Identity& operator=(const Identity&);
62 };
63}
64
65#endif
int lookup_flags
Things not to use for lookup.
Definition X509Context.h:39
std::string OCSPresponder
name of file for certificate of trusted responder signer
Definition X509Context.h:38
bool OCSPnonce
whether to use (and require) nonces
Definition X509Context.h:36
std::string OCSPuri
URI for an OCSP trusted responder.
Definition X509Context.h:37

All rights reserved © 2002 - 2024 Isode Ltd.