fixed some Windows makefile build issues; added code signing to Windows makefiles
[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>
8fc1b3c5 13#include <openssl/bn.h>
9c3bf7f4
VK
14#include <openssl/opensslv.h>
15#include <openssl/err.h>
16
17#ifdef NETXMS_NO_AES
18#ifndef OPENSSL_NO_AES
19#define OPENSSL_NO_AES
20#endif
21#endif
22
23#ifdef NETXMS_NO_BF
24#ifndef OPENSSL_NO_BF
25#define OPENSSL_NO_BF
26#endif
27#endif
28
29#ifdef NETXMS_NO_IDEA
30#ifndef OPENSSL_NO_IDEA
31#define OPENSSL_NO_IDEA
32#endif
33#endif
34
35#ifdef NETXMS_NO_DES
36#ifndef OPENSSL_NO_DES
37#define OPENSSL_NO_DES
38#endif
39#endif
40
41#if OPENSSL_VERSION_NUMBER >= 0x00907000
42#define OPENSSL_CONST const
43#else
44#define OPENSSL_CONST
45#endif
46
47#elif WITH_COMMONCRYPTO
48
49#include <CommonCrypto/CommonCrypto.h>
50#include <Security/SecBase.h>
51#include <Security/SecKey.h>
52
53struct RSA
54{
55 SecKeyRef pubkey;
56 SecKeyRef privkey;
57};
58
59#endif
60
61#else /* no encryption */
62
63// Prevent compilation errors on function prototypes
64#define RSA void
65
66#endif
67
68#endif