亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? crypto.h

?? OpenVPN is a robust and highly flexible tunneling application that uses all of the encryption, authe
?? H
字號:
/* *  OpenVPN -- An application to securely tunnel IP networks *             over a single TCP/UDP port, with support for SSL/TLS-based *             session authentication and key exchange, *             packet encryption, packet authentication, and *             packet compression. * *  Copyright (C) 2002-2004 James Yonan <jim@yonan.net> * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program (see the file COPYING included with this *  distribution); if not, write to the Free Software Foundation, Inc., *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#ifndef CRYPTO_H#define CRYPTO_H#ifdef USE_CRYPTO/* * Does our OpenSSL library support crypto hardware acceleration? */#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES) && defined(HAVE_ENGINE_REGISTER_ALL_COMPLETE) && defined(HAVE_ENGINE_CLEANUP)#define CRYPTO_ENGINE 1#else#define CRYPTO_ENGINE 0#endif#include <openssl/objects.h>#include <openssl/rand.h>#include <openssl/evp.h>#include <openssl/hmac.h>#include <openssl/des.h>#include <openssl/md5.h>#include <openssl/sha.h>#include <openssl/err.h>#if CRYPTO_ENGINE#include <openssl/engine.h>#endif#include "basic.h"#include "buffer.h"#include "packet_id.h"#include "mtu.h"/* * Workarounds for incompatibilites between OpenSSL libraries. * Right now we accept OpenSSL libraries from 0.9.5 to 0.9.7. */#if SSLEAY_VERSION_NUMBER < 0x00907000L/* Workaround: EVP_CIPHER_mode is defined wrong in OpenSSL 0.9.6 but is fixed in 0.9.7 */#undef EVP_CIPHER_mode#define EVP_CIPHER_mode(e)                (((e)->flags) & EVP_CIPH_MODE)#define DES_cblock                        des_cblock#define DES_is_weak_key                   des_is_weak_key#define DES_check_key_parity              des_check_key_parity#define DES_set_odd_parity                des_set_odd_parity#define HMAC_CTX_init(ctx)                CLEAR (*ctx)#define HMAC_Init_ex(ctx,sec,len,md,impl) HMAC_Init(ctx, sec, len, md) #define HMAC_CTX_cleanup(ctx)             HMAC_cleanup(ctx)#define EVP_MD_CTX_cleanup(md)            CLEAR (*md)#define INFO_CALLBACK_SSL_CONST#endif#ifndef INFO_CALLBACK_SSL_CONST#define INFO_CALLBACK_SSL_CONST const#endif#if SSLEAY_VERSION_NUMBER < 0x00906000#undef EVP_CIPHER_mode#define EVP_CIPHER_mode(x) 1#define EVP_CIPHER_CTX_mode(x) 1#define EVP_CIPHER_flags(x) 0#define EVP_CIPH_CBC_MODE 1#define EVP_CIPH_CFB_MODE 0#define EVP_CIPH_OFB_MODE 0#define EVP_CIPH_VARIABLE_LENGTH 0#define OPENSSL_malloc(x) malloc(x)#define OPENSSL_free(x) free(x)static inline intEVP_CipherInit_ov (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, uint8_t *key, uint8_t *iv, int enc){  EVP_CipherInit (ctx, type, key, iv, enc);  return 1;}static inline intEVP_CipherUpdate_ov (EVP_CIPHER_CTX *ctx, uint8_t *out, int *outl, uint8_t *in, int inl){  EVP_CipherUpdate (ctx, out, outl, in, inl);  return 1;}static inline boolcipher_ok (const char* name){  const int i = strlen (name) - 4;  if (i >= 0)    return !strcmp (name + i, "-CBC");  else    return false;}#elsestatic inline intEVP_CipherInit_ov (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, uint8_t *key, uint8_t *iv, int enc){  return EVP_CipherInit (ctx, type, key, iv, enc);}static inline intEVP_CipherUpdate_ov (EVP_CIPHER_CTX *ctx, uint8_t *out, int *outl, uint8_t *in, int inl){  return EVP_CipherUpdate (ctx, out, outl, in, inl);}static inline boolcipher_ok (const char* name){  return true;}#endif#if SSLEAY_VERSION_NUMBER < 0x0090581f#undef DES_check_key_parity#define DES_check_key_parity(x) 1#endif#ifndef EVP_CIPHER_name#define EVP_CIPHER_name(e)		OBJ_nid2sn(EVP_CIPHER_nid(e))#endif#ifndef EVP_MD_name#define EVP_MD_name(e)			OBJ_nid2sn(EVP_MD_type(e))#endif/* * Max size in bytes of any cipher key that might conceivably be used. * * This value is checked at compile time in crypto.c to make sure * it is always at least EVP_MAX_KEY_LENGTH. * * We define our own value, since this parameter * is used to control the size of static key files. * If the OpenSSL library increases EVP_MAX_KEY_LENGTH, * we don't want our key files to be suddenly rendered * unusable. */#define MAX_CIPHER_KEY_LENGTH 64/* * Max size in bytes of any HMAC key that might conceivably be used. * * This value is checked at compile time in crypto.c to make sure * it is always at least EVP_MAX_MD_SIZE.  We define our own value * for the same reason as above. */#define MAX_HMAC_KEY_LENGTH 64/* * Defines a key type and key length for both cipher and HMAC. */struct key_type{  uint8_t cipher_length;  uint8_t hmac_length;  const EVP_CIPHER *cipher;  const EVP_MD *digest;};/* * A random key. */struct key{  uint8_t cipher[MAX_CIPHER_KEY_LENGTH];  uint8_t hmac[MAX_HMAC_KEY_LENGTH];};#define KEY_DIRECTION_BIDIRECTIONAL 0 /* same keys for both directions */#define KEY_DIRECTION_NORMAL        1 /* encrypt with keys[0], decrypt with keys[1] */#define KEY_DIRECTION_INVERSE       2 /* encrypt with keys[1], decrypt with keys[0] *//* * Dual random keys (for encrypt/decrypt) */struct key2{  int n;  struct key keys[2];};/* * Used for controlling bidirectional keys * vs. a separate key for each direction. */struct key_direction_state{  int out_key;  int in_key;  int need_keys;};/* * A key context for cipher and/or HMAC. */struct key_ctx{  EVP_CIPHER_CTX *cipher;  HMAC_CTX *hmac;};/* * Cipher/HMAC key context for both sending and receiving * directions. */struct key_ctx_bi{  struct key_ctx encrypt;  struct key_ctx decrypt;};/* * Options for encrypt/decrypt. */struct crypto_options{  struct key_ctx_bi *key_ctx_bi;  struct packet_id *packet_id;  struct packet_id_persist *pid_persist;  bool packet_id_long_form;  bool use_iv;  bool ignore_packet_id;};void init_key_type (struct key_type *kt, const char *ciphername,		    bool ciphername_defined, const char *authname,		    bool authname_defined, int keysize,		    bool cfb_ofb_allowed, bool warn);void read_key_file (struct key2 *key2, const char *filename, bool must_succeed);int write_key_file (const int nkeys, const char *filename);int read_passphrase_hash (const char *passphrase_file,			  const EVP_MD *digest,			  uint8_t *output,			  int len);void generate_key_random (struct key *key, const struct key_type *kt);void check_replay_iv_consistency(const struct key_type *kt, bool packet_id, bool use_iv);bool check_key (struct key *key, const struct key_type *kt);void fixup_key (struct key *key, const struct key_type *kt);void write_key (const struct key *key, const struct key_type *kt,		struct buffer *buf);int read_key (struct key *key, const struct key_type *kt, struct buffer *buf);bool cfb_ofb_mode (const struct key_type* kt);const char *kt_cipher_name (const struct key_type *kt);const char *kt_digest_name (const struct key_type *kt);int kt_key_size (const struct key_type *kt);/* enc parameter in init_key_ctx */#define DO_ENCRYPT 1#define DO_DECRYPT 0void init_key_ctx (struct key_ctx *ctx, struct key *key,		   const struct key_type *kt, int enc,		   const char *prefix);void free_key_ctx (struct key_ctx *ctx);void free_key_ctx_bi (struct key_ctx_bi *ctx);void openvpn_encrypt (struct buffer *buf, struct buffer work,		      const struct crypto_options *opt,		      const struct frame* frame);bool openvpn_decrypt (struct buffer *buf, struct buffer work,		      const struct crypto_options *opt,		      const struct frame* frame);void crypto_adjust_frame_parameters (struct frame *frame,				     const struct key_type* kt,				     bool cipher_defined,				     bool use_iv,				     bool packet_id,				     bool packet_id_long_form);void prng_init (void);void prng_bytes (uint8_t *output, int len);void test_crypto (const struct crypto_options *co, struct frame* f);const char *md5sum(uint8_t *buf, int len, int n_print_chars, struct gc_arena *gc);void show_available_ciphers (void);void show_available_digests (void);void init_crypto_lib_engine (void);void init_crypto_lib (void);void uninit_crypto_lib (void);/* key direction functions */void key_direction_state_init (struct key_direction_state *kds, int key_direction);void verify_fix_key2 (struct key2 *key2, const struct key_type *kt, const char *shared_secret_file);void must_have_n_keys (const char *filename, const char *option, const struct key2 *key2, int n);int ascii2keydirection (const char *str);const char *keydirection2ascii (int kd, bool remote);/* print keys */void key2_print (const struct key2* k,		 const struct key_type *kt,		 const char* prefix0,		 const char* prefix1);#ifdef USE_SSLvoid get_tls_handshake_key (const struct key_type *key_type,			    struct key_ctx_bi *ctx,			    const char *passphrase_file,			    bool key_direction);#elsevoid init_ssl_lib (void);void free_ssl_lib (void);#endif /* USE_SSL *//* * Inline functions */static inline boolkey_ctx_bi_defined(const struct key_ctx_bi* key){  return key->encrypt.cipher || key->encrypt.hmac || key->decrypt.cipher || key->decrypt.hmac;}#endif /* USE_CRYPTO */#endif /* CRYPTO_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人欧美edvon| 久久久国产一区二区三区四区小说 | 欧美中文字幕一区二区三区| 91麻豆精品国产91久久久久久久久 | 免费在线观看一区二区三区| 丰满少妇在线播放bd日韩电影| 欧美美女网站色| 国产精品成人在线观看 | 亚洲一区精品在线| 成人app下载| 久久这里只精品最新地址| 亚洲综合小说图片| 懂色av中文一区二区三区| 日韩亚洲欧美综合| 午夜精品久久久久影视| 91麻豆免费观看| 亚洲欧洲日产国产综合网| 国产成人激情av| 欧美成人一级视频| 婷婷激情综合网| 日本高清不卡aⅴ免费网站| 国产精品二区一区二区aⅴ污介绍| 国产一区二三区好的| 日韩一二在线观看| 日本91福利区| 精品国产乱码久久久久久蜜臀| 香蕉乱码成人久久天堂爱免费| 91麻豆免费视频| 亚洲精品成人精品456| 91国偷自产一区二区使用方法| 亚洲欧美日韩一区二区三区在线观看 | 国产女人18水真多18精品一级做 | 久久嫩草精品久久久精品| 免费精品视频最新在线| 日韩三级伦理片妻子的秘密按摩| 三级成人在线视频| 日韩欧美综合在线| 国产一区二区三区最好精华液| 国产亚洲欧美日韩在线一区| 福利电影一区二区三区| 国产精品电影一区二区| 91免费版在线| 亚洲夂夂婷婷色拍ww47| 精品久久久久一区| 26uuu亚洲婷婷狠狠天堂| 99国产一区二区三精品乱码| 色素色在线综合| 高清成人免费视频| 中文字幕va一区二区三区| 99视频精品在线| 一二三四区精品视频| 欧美精品乱码久久久久久按摩| 日本网站在线观看一区二区三区| 日韩一区二区免费视频| 国产成人在线免费观看| 亚洲女人的天堂| 欧美一三区三区四区免费在线看| 乱一区二区av| 国产精品麻豆网站| 欧美精品一卡二卡| 国产麻豆精品视频| 性做久久久久久久久| 久久美女艺术照精彩视频福利播放| 91在线观看免费视频| 日本午夜一区二区| 国产欧美日韩在线视频| 欧美亚洲另类激情小说| 国内外成人在线| 一区二区三区91| 国产欧美一区二区精品忘忧草| 一本高清dvd不卡在线观看| 青草av.久久免费一区| 综合分类小说区另类春色亚洲小说欧美| 欧美日本一区二区三区| 国产suv精品一区二区三区| 一区二区三区不卡视频在线观看| 久久夜色精品一区| 欧美三区在线视频| 99免费精品视频| 久久国产精品第一页| 亚洲国产精品欧美一二99| 久久影音资源网| 91精品在线免费| 一本色道久久综合亚洲精品按摩| 国内精品在线播放| 午夜精品免费在线观看| 亚洲女人****多毛耸耸8| 久久久久久久一区| 日韩一级成人av| 欧美日韩美少妇| 91美女视频网站| 成人三级在线视频| 激情综合网最新| 日韩—二三区免费观看av| 亚洲一区二区av电影| 国产精品成人一区二区艾草| 26uuu精品一区二区三区四区在线| 欧美日韩免费一区二区三区视频| av不卡免费在线观看| 成人一区二区三区视频在线观看| 国产一区二区三区在线观看精品 | 国产精品免费视频一区| 欧美精品一区二区三区四区| 日韩一区二区三区免费看| 欧美色手机在线观看| 欧美亚洲禁片免费| 欧洲视频一区二区| 在线看不卡av| 欧美亚洲图片小说| 欧美日韩一卡二卡三卡| 欧美三级中文字幕在线观看| 欧美午夜电影网| 欧美日韩美女一区二区| 欧美一区二区三区四区久久| 欧美福利电影网| 欧美一级视频精品观看| 日韩精品中文字幕一区二区三区| 精品国产乱码久久久久久夜甘婷婷| 精品国产欧美一区二区| 久久久不卡影院| 1区2区3区国产精品| 中文字幕在线不卡| 亚洲精品美腿丝袜| 午夜欧美大尺度福利影院在线看| 视频在线观看一区二区三区| 美腿丝袜亚洲三区| 国产成人在线视频免费播放| 99视频有精品| 在线播放亚洲一区| 日韩午夜激情免费电影| 久久久精品免费网站| 欧美国产激情一区二区三区蜜月| 国产精品黄色在线观看| 亚洲激情图片一区| 日本女人一区二区三区| 久久99精品久久久久久久久久久久| 国产麻豆一精品一av一免费| 91亚洲国产成人精品一区二三| 91福利小视频| 精品成人在线观看| 亚洲另类色综合网站| 蜜臀精品久久久久久蜜臀 | 综合电影一区二区三区| 午夜视频在线观看一区二区三区| 久久99国产精品免费| k8久久久一区二区三区 | 日韩毛片精品高清免费| 日韩精品福利网| 成人性生交大片| 欧美日韩成人在线一区| 中文字幕乱码久久午夜不卡| 亚洲成人av在线电影| 国产成人av电影在线观看| 欧美午夜片在线看| 久久婷婷久久一区二区三区| 亚洲一区二区三区四区五区黄 | 亚洲同性同志一二三专区| 日本午夜精品视频在线观看| 丁香婷婷综合色啪| 欧美二区乱c少妇| 中文字幕亚洲视频| 韩国毛片一区二区三区| 欧美日韩国产综合一区二区 | 精品国产a毛片| 亚洲一区二区三区四区中文字幕| 国产精品乡下勾搭老头1| 欧美日韩免费高清一区色橹橹| 国产精品久久99| 激情综合色综合久久综合| 欧美日韩激情一区| 亚洲柠檬福利资源导航| 国产福利电影一区二区三区| 欧美高清视频在线高清观看mv色露露十八 | 精品视频一区 二区 三区| 国产精品久久久久久久久久久免费看| 美女在线一区二区| 欧洲国内综合视频| 中文字幕中文字幕在线一区| 国产精品一线二线三线| 欧美一级片在线观看| 亚洲一区二区在线观看视频| 91视视频在线观看入口直接观看www | 久久午夜免费电影| 乱一区二区av| 日韩欧美国产一区二区在线播放| 亚洲高清视频在线| 色88888久久久久久影院按摩 | 91麻豆国产自产在线观看| 国产日本欧洲亚洲| 国产伦精一区二区三区| 欧美电影免费观看高清完整版在 | 亚洲v日本v欧美v久久精品| 91欧美激情一区二区三区成人| 国产精品久久久久久久久免费樱桃| 国产精品综合一区二区| 久久九九影视网| 国产成人8x视频一区二区| 久久精品视频网| 99久久精品国产一区二区三区| 日本一区二区三区久久久久久久久不 |