~ubuntu-branches/ubuntu/saucy/openvpn/saucy-proposed

« back to all changes in this revision

Viewing changes to src/openvpn/crypto_openssl.h

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2013-05-24 17:42:45 UTC
  • mfrom: (1.1.19) (10.2.22 sid)
  • Revision ID: package-import@ubuntu.com-20130524174245-g9y6wlforycufqy5
Tags: 2.3.1-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/openvpn.init.d:
    + Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    + Show per-VPN result messages.
    + Add "--script-security 2" by default for backwards compatabliity.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  OpenVPN -- An application to securely tunnel IP networks
 
3
 *             over a single TCP/UDP port, with support for SSL/TLS-based
 
4
 *             session authentication and key exchange,
 
5
 *             packet encryption, packet authentication, and
 
6
 *             packet compression.
 
7
 *
 
8
 *  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
 
9
 *  Copyright (C) 2010 Fox Crypto B.V. <openvpn@fox-it.com>
 
10
 *
 
11
 *  This program is free software; you can redistribute it and/or modify
 
12
 *  it under the terms of the GNU General Public License version 2
 
13
 *  as published by the Free Software Foundation.
 
14
 *
 
15
 *  This program is distributed in the hope that it will be useful,
 
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 *  GNU General Public License for more details.
 
19
 *
 
20
 *  You should have received a copy of the GNU General Public License
 
21
 *  along with this program (see the file COPYING included with this
 
22
 *  distribution); if not, write to the Free Software Foundation, Inc.,
 
23
 *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
24
 */
 
25
 
 
26
/**
 
27
 * @file Data Channel Cryptography OpenSSL-specific backend interface
 
28
 */
 
29
 
 
30
#ifndef CRYPTO_OPENSSL_H_
 
31
#define CRYPTO_OPENSSL_H_
 
32
 
 
33
#include <openssl/evp.h>
 
34
#include <openssl/hmac.h>
 
35
#include <openssl/md5.h>
 
36
 
 
37
/** Generic cipher key type %context. */
 
38
typedef EVP_CIPHER cipher_kt_t;
 
39
 
 
40
/** Generic message digest key type %context. */
 
41
typedef EVP_MD md_kt_t;
 
42
 
 
43
/** Generic cipher %context. */
 
44
typedef EVP_CIPHER_CTX cipher_ctx_t;
 
45
 
 
46
/** Generic message digest %context. */
 
47
typedef EVP_MD_CTX md_ctx_t;
 
48
 
 
49
/** Generic HMAC %context. */
 
50
typedef HMAC_CTX hmac_ctx_t;
 
51
 
 
52
/** Maximum length of an IV */
 
53
#define OPENVPN_MAX_IV_LENGTH   EVP_MAX_IV_LENGTH
 
54
 
 
55
/** Cipher is in CBC mode */
 
56
#define OPENVPN_MODE_CBC        EVP_CIPH_CBC_MODE
 
57
 
 
58
/** Cipher is in OFB mode */
 
59
#define OPENVPN_MODE_OFB        EVP_CIPH_OFB_MODE
 
60
 
 
61
/** Cipher is in CFB mode */
 
62
#define OPENVPN_MODE_CFB        EVP_CIPH_CFB_MODE
 
63
 
 
64
/** Cipher should encrypt */
 
65
#define OPENVPN_OP_ENCRYPT      1
 
66
 
 
67
/** Cipher should decrypt */
 
68
#define OPENVPN_OP_DECRYPT      0
 
69
 
 
70
#define DES_KEY_LENGTH 8
 
71
#define MD4_DIGEST_LENGTH       16
 
72
 
 
73
#endif /* CRYPTO_OPENSSL_H_ */