OpenVPN 3 Core Library
Loading...
Searching...
No Matches
cfsec.hpp
Go to the documentation of this file.
1// OpenVPN -- An application to securely tunnel IP networks
2// over a single port, with support for SSL/TLS-based
3// session authentication and key exchange,
4// packet encryption, packet authentication, and
5// packet compression.
6//
7// Copyright (C) 2012- OpenVPN Inc.
8//
9// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10//
11
12#ifndef OPENVPN_APPLECRYPTO_CF_CFSEC_H
13#define OPENVPN_APPLECRYPTO_CF_CFSEC_H
14
16
17#include <Security/SecCertificate.h>
18#include <Security/SecIdentity.h>
19#include <Security/SecPolicy.h>
20#include <Security/SecTrust.h>
21
22#ifndef OPENVPN_PLATFORM_IPHONE
23#include <Security/SecKeychain.h>
24#include <Security/SecAccess.h>
25#endif
26
30
31// Define C++ wrappings for Apple security-related objects.
32
33namespace openvpn::CF {
34OPENVPN_CF_WRAP(Cert, cert_cast, SecCertificateRef, SecCertificateGetTypeID)
35OPENVPN_CF_WRAP(Key, key_cast, SecKeyRef, SecKeyGetTypeID)
36OPENVPN_CF_WRAP(Identity, identity_cast, SecIdentityRef, SecIdentityGetTypeID)
37OPENVPN_CF_WRAP(Policy, policy_cast, SecPolicyRef, SecPolicyGetTypeID)
38OPENVPN_CF_WRAP(Trust, trust_cast, SecTrustRef, SecTrustGetTypeID)
39#ifndef OPENVPN_PLATFORM_IPHONE
40OPENVPN_CF_WRAP(Keychain, keychain_cast, SecKeychainRef, SecKeychainGetTypeID)
41OPENVPN_CF_WRAP(Access, access_cast, SecAccessRef, SecAccessGetTypeID)
42#endif
43} // namespace openvpn::CF
44
45
46#endif // OPENVPN_APPLECRYPTO_CF_CFSEC_H
#define OPENVPN_CF_WRAP(cls, castmeth, cftype, idmeth)
Definition cf.hpp:26