fixed broken agent restart if agent started manually on systemd managed system; minor...
[public/netxms.git] / include / nxcrypto.h
CommitLineData
9c3bf7f4
VK
1#ifndef _nxcrypto_h_
2#define _nxcrypto_h_
3
4#if defined(_WITH_ENCRYPTION) && !defined(ORA_PROC)
5
6#if WITH_OPENSSL
7
8#include <openssl/crypto.h>
9#include <openssl/rsa.h>
10#include <openssl/pem.h>
11#include <openssl/evp.h>
12#include <openssl/rand.h>
13#include <openssl/opensslv.h>
14#include <openssl/err.h>
15
16#ifdef NETXMS_NO_AES
17#ifndef OPENSSL_NO_AES
18#define OPENSSL_NO_AES
19#endif
20#endif
21
22#ifdef NETXMS_NO_BF
23#ifndef OPENSSL_NO_BF
24#define OPENSSL_NO_BF
25#endif
26#endif
27
28#ifdef NETXMS_NO_IDEA
29#ifndef OPENSSL_NO_IDEA
30#define OPENSSL_NO_IDEA
31#endif
32#endif
33
34#ifdef NETXMS_NO_DES
35#ifndef OPENSSL_NO_DES
36#define OPENSSL_NO_DES
37#endif
38#endif
39
40#if OPENSSL_VERSION_NUMBER >= 0x00907000
41#define OPENSSL_CONST const
42#else
43#define OPENSSL_CONST
44#endif
45
46#elif WITH_COMMONCRYPTO
47
48#include <CommonCrypto/CommonCrypto.h>
49#include <Security/SecBase.h>
50#include <Security/SecKey.h>
51
52struct RSA
53{
54 SecKeyRef pubkey;
55 SecKeyRef privkey;
56};
57
58#endif
59
60#else /* no encryption */
61
62// Prevent compilation errors on function prototypes
63#define RSA void
64
65#endif
66
67#endif