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

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

?? ssl.h

?? OpenVPN is a robust and highly flexible tunneling application that uses all of the encryption, authe
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* *  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 OPENVPN_SSL_H#define OPENVPN_SSL_H#if defined(USE_CRYPTO) && defined(USE_SSL)#include <openssl/ssl.h>#include <openssl/bio.h>#include <openssl/rand.h>#include <openssl/err.h>#include "basic.h"#include "crypto.h"#include "packet_id.h"#include "session_id.h"#include "reliable.h"#include "socket.h"#include "mtu.h"#include "thread.h"/* * Openvpn Protocol. * * TCP/UDP Packet: *   packet length (16 bits, unsigned) -- TCP only, always sent as plaintext *   packet opcode (high 5 bits, see P_ constants below) *   key_id (low 3 bits, see key_id in struct tls_session below for comment) *   payload (n bytes) * * P_CONTROL* and P_ACK Payload: *   session_id (random 64 bit value to identify session) *   hmac for authentication (usually 16 or 20 bytes) *   packet-id for replay protection (4 or 8 bytes, includes *     sequence number and optional time_t timestamp) *   acknowledge packet_id array length (1 byte) *   acknowledge packet-id array (if length > 0) *   acknowledge remote session_id (if length > 0) *   control packet-id (4 bytes) *   TLS ciphertext (n bytes) (only for P_CONTROL) * * TLS plaintext packet (key_method == 1): *   cipher key length in bytes (1 byte) *   cipher key (n bytes) *   hmac key length in bytes (1 byte) *   hmac key (n bytes) *   options string (n bytes, null terminated, client/server options string must match) * * TLS plaintext packet (key_method >= 2): *   0 (4 bytes) *   key_method (1 byte) *   key_source structure (pre_master only defined for client -> server) *   options_string_length, including null (2 bytes) *   options string (n bytes, null terminated, client/server options string must match) * * P_DATA Payload: *   hmac of ciphertext IV + ciphertext (if enabled by --auth) *   ciphertext IV (size is cipher-dependent, if not disabled by --no-iv) *   P_DATA ciphertext * * P_DATA plaintext *   packet_id (4 or 8 bytes, if not disabled by --no-replay) *   user plaintext (n bytes) * * Notes: *   (1) Acknowledgements can be encoded in either the dedicated P_ACK record *       or they can be prepended to a P_CONTROL* record. *   (2) P_DATA and P_CONTROL/P_ACK use independent packet-id sequences because *       P_DATA is an unreliable channel while P_CONTROL/P_ACK is a reliable channel. *//* Used in the TLS PRF function */#define KEY_EXPANSION_ID "OpenVPN"/* packet opcode (high 5 bits) and key-id (low 3 bits) are combined in one byte */#define P_KEY_ID_MASK                  0x07#define P_OPCODE_SHIFT                 3/* packet opcodes -- the V1 is intended to allow protocol changes in the future */#define P_CONTROL_HARD_RESET_CLIENT_V1 1     /* initial key from client, forget previous state */#define P_CONTROL_HARD_RESET_SERVER_V1 2     /* initial key from server, forget previous state */#define P_CONTROL_SOFT_RESET_V1        3     /* new key, graceful transition from old to new key */#define P_CONTROL_V1                   4     /* control channel packet (usually TLS ciphertext) */#define P_ACK_V1                       5     /* acknowledgement for packets received */#define P_DATA_V1                      6     /* data channel packet *//* indicates key_method >= 2 */#define P_CONTROL_HARD_RESET_CLIENT_V2 7     /* initial key from client, forget previous state */#define P_CONTROL_HARD_RESET_SERVER_V2 8     /* initial key from server, forget previous state *//* define the range of legal opcodes */#define P_FIRST_OPCODE                 1#define P_LAST_OPCODE                  8/* key negotiation states */#define S_ERROR          -1#define S_UNDEF           0#define S_INITIAL         1	/* tls_init() was called */#define S_PRE_START       2	/* waiting for initial reset & acknowledgement */#define S_START           3	/* ready to exchange keys */#define S_SENT_KEY        4	/* client does S_SENT_KEY -> S_GOT_KEY */#define S_GOT_KEY         5	/* server does S_GOT_KEY -> S_SENT_KEY */#define S_ACTIVE          6	/* ready to exchange data channel packets */#define S_NORMAL          7	/* normal operations *//* * Are we ready to receive data channel packets? * * Also, if true, we can safely assume session has been * authenticated by TLS. * * NOTE: Assumes S_SENT_KEY + 1 == S_GOT_KEY. */#define DECRYPT_KEY_ENABLED(multi, ks) ((ks)->state >= (S_GOT_KEY - (multi)->opt.server))/* Should we aggregate TLS acknowledgements, and tack them onto control packets? */#define TLS_AGGREGATE_ACK/* * If TLS_AGGREGATE_ACK, set the * max number of acknowledgments that * can "hitch a ride" on an outgoing * non-P_ACK_V1 control packet. */#define CONTROL_SEND_ACK_MAX 4/* * Define number of buffers for send and receive in the reliability layer. */#define TLS_RELIABLE_N_SEND_BUFFERS  4 /* also window size for reliablity layer */#define TLS_RELIABLE_N_REC_BUFFERS   8/* * Various timeouts */ #define TLS_MULTI_REFRESH 15    /* call tls_multi_process once every n seconds */#define TLS_MULTI_HORIZON 2     /* call tls_multi_process frequently for n seconds after				   every packet sent/received action *//* The SSL/TLS worker thread will wait at most this many seconds for the interprocess   communication pipe to the main thread to be ready to accept writes. */#define TLS_MULTI_THREAD_SEND_TIMEOUT 5/* * Buffer sizes (also see mtu.h). */#define PLAINTEXT_BUFFER_SIZE 1024/* Maximum length of common name */#define TLS_CN_LEN 64/* * Range of key exchange methods */#define KEY_METHOD_MIN 1#define KEY_METHOD_MAX 2/* key method taken from lower 4 bits */#define KEY_METHOD_MASK 0x0F/* high 4 bits in key_method uint8_t is used for flags */#define TLS_PASS_CONFIG_INFO 0x10/* * Measure success rate of TLS handshakes, for debugging only *//* #define MEASURE_TLS_HANDSHAKE_STATS *//* * Key material, used as source for PRF-based * key expansion. */struct key_source {  uint8_t pre_master[48]; /* client generated */  uint8_t random1[32];    /* generated by both client and server */  uint8_t random2[32];    /* generated by both client and server */};struct key_source2 {  struct key_source client;  struct key_source server;};/* * Represents a single instantiation of a TLS negotiation and * data channel key exchange.  4 keys are kept: encrypt hmac, * decrypt hmac, encrypt cipher, and decrypt cipher.  The TLS * control channel is used to exchange these keys. * Each hard or soft reset will build * a fresh key_state.  Normally an openvpn session will contain two * key_state objects, one for the current TLS connection, and other * for the retiring or "lame duck" key.  The lame duck key_state is * used to maintain transmission continuity on the data-channel while * a key renegotiation is taking place. */struct key_state{  int state;  int key_id;			/* inherited from struct tls_session below */  SSL *ssl;			/* SSL object -- new obj created for each new key */  BIO *ssl_bio;			/* read/write plaintext from here */  BIO *ct_in;			/* write ciphertext to here */  BIO *ct_out;			/* read ciphertext from here */  time_t established;		/* when our state went S_ACTIVE */  time_t must_negotiate;	/* key negotiation times out if not finished before this time */  time_t must_die;		/* this object is destroyed at this time */  int initial_opcode;		/* our initial P_ opcode */  struct session_id session_id_remote; /* peer's random session ID */  struct sockaddr_in remote_addr;      /* peer's IP addr */  struct packet_id packet_id;	       /* for data channel, to prevent replay attacks */  struct key_ctx_bi key;	       /* data channel keys for encrypt/decrypt/hmac */  struct key_source2 *key_src;         /* source entropy for key expansion */  struct buffer plaintext_read_buf;  struct buffer plaintext_write_buf;  struct buffer ack_write_buf;  struct reliable *send_reliable; /* holds a copy of outgoing packets until ACK received */  struct reliable *rec_reliable;  /* order incoming ciphertext packets before we pass to TLS */  struct reliable_ack *rec_ack;	  /* buffers all packet IDs we want to ACK back to sender */  int n_bytes;			 /* how many bytes sent/recvd since last key exchange */  int n_packets;		 /* how many packets sent/recvd since last key exchange */};/* * Our const options, obtained directly or derived from * command line options. */struct tls_options{  /* our master SSL_CTX from which all SSL objects derived */  SSL_CTX *ssl_ctx;  /* data channel cipher, hmac, and key lengths */  struct key_type key_type;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合99re88久久爱| 美女网站在线免费欧美精品| 亚洲丰满少妇videoshd| 精品一区二区三区视频| 99re这里只有精品视频首页| 欧美一级久久久| 一区二区三区中文在线观看| 国产一区二区不卡老阿姨| 一本久道中文字幕精品亚洲嫩 | www.日本不卡| 日韩亚洲电影在线| 一区二区三区免费在线观看| 国内精品免费**视频| 欧美日韩高清一区二区不卡| 亚洲四区在线观看| 国产成人午夜片在线观看高清观看| 欧美精品久久99久久在免费线 | 国产人成亚洲第一网站在线播放| 天堂午夜影视日韩欧美一区二区| 精品少妇一区二区三区| 一区二区三区精品久久久| 国产高清亚洲一区| 精品捆绑美女sm三区| 日韩精品成人一区二区三区| 欧美中文字幕一区二区三区| 最新日韩在线视频| 不卡的电影网站| 欧美国产综合一区二区| 国产一区二区三区久久悠悠色av| 日韩精品一区二区三区在线观看| 婷婷丁香久久五月婷婷| 欧美日本韩国一区二区三区视频| 一级中文字幕一区二区| 91丨九色丨黑人外教| 亚洲欧美在线高清| 色综合久久综合中文综合网| 国产精品久久久久久久久晋中| 成人av网址在线| 国产精品久久久久久妇女6080 | 91福利国产精品| 亚洲免费在线视频一区 二区| av电影在线观看一区| 亚洲女子a中天字幕| 91国偷自产一区二区开放时间| 亚洲综合在线五月| 欧美精品在线一区二区| 视频一区二区三区在线| 日韩欧美区一区二| 国产a精品视频| 亚洲欧美另类图片小说| 精品视频色一区| 免费三级欧美电影| 久久久综合激的五月天| 99精品黄色片免费大全| 亚洲愉拍自拍另类高清精品| 51精品国自产在线| 国内精品国产成人| 国产精品久久久久婷婷二区次| 99精品久久久久久| 日韩av二区在线播放| 26uuuu精品一区二区| 成人激情动漫在线观看| 亚洲18色成人| 久久色中文字幕| 99麻豆久久久国产精品免费优播| 亚洲电影一区二区| 久久众筹精品私拍模特| 91在线视频网址| 蜜桃视频一区二区三区在线观看| 中文字幕欧美三区| 欧美亚洲动漫另类| 国产成人午夜高潮毛片| 五月天中文字幕一区二区| 欧美精品一区二区三| 91国在线观看| 国产一二三精品| 亚洲h在线观看| 国产欧美日韩综合| 欧美理论片在线| 成人av在线播放网址| 日产精品久久久久久久性色| 一区在线观看免费| 日韩女优毛片在线| 日本韩国一区二区| 国产精品91一区二区| 亚洲va国产va欧美va观看| 国产精品私人自拍| 精品蜜桃在线看| 欧美日韩成人一区| 色综合天天综合色综合av| 国产一区二区三区最好精华液| 日日噜噜夜夜狠狠视频欧美人| 国产精品不卡在线观看| 久久日韩精品一区二区五区| 欧美日韩1区2区| 色呦呦国产精品| 丁香六月综合激情| 国产一区二区在线观看视频| 日韩高清不卡一区二区三区| 亚洲在线视频免费观看| 亚洲色图欧洲色图| 国产精品视频第一区| 久久久精品tv| 欧美mv日韩mv| 精品国产一区二区在线观看| 91精品国产色综合久久不卡电影 | 国产婷婷一区二区| 欧美电影免费观看高清完整版在| 欧美色视频一区| 91久久线看在观草草青青| 99国产精品国产精品毛片| 成人高清免费在线播放| 成人精品视频一区二区三区| 福利一区二区在线| 成人精品视频一区二区三区 | 成人亚洲精品久久久久软件| 国内精品国产成人国产三级粉色| 精品一区二区三区影院在线午夜| 日韩av在线免费观看不卡| 三级成人在线视频| 日韩av一级片| 麻豆国产精品官网| 国产一区二区三区在线观看免费视频| 美国毛片一区二区三区| 精品一区二区av| 久久se精品一区二区| 久久国产精品一区二区| 国产精品一区二区三区乱码| 国产精品99久久久久久似苏梦涵 | 久久亚洲一级片| 久久精品一区二区三区不卡牛牛 | 日韩二区三区四区| 麻豆精品精品国产自在97香蕉| 久久精品国产亚洲高清剧情介绍| 久88久久88久久久| 国产精品一区二区无线| 成人动漫中文字幕| 一本一道综合狠狠老| 91精品国产综合久久香蕉的特点 | 狠狠色丁香久久婷婷综合_中| 激情综合色播五月| 成人一级视频在线观看| 一本到不卡精品视频在线观看| 欧美精品精品一区| 国产欧美日韩麻豆91| 亚洲欧美日韩综合aⅴ视频| 午夜电影网亚洲视频| 久久国产福利国产秒拍| 高清日韩电视剧大全免费| 色网站国产精品| 日韩欧美资源站| 国产精品日韩精品欧美在线| 亚洲国产一区视频| 国产剧情一区二区| 一本大道av一区二区在线播放| 这里只有精品视频在线观看| 中文av一区二区| 日韩高清中文字幕一区| 99久久777色| 欧美大片在线观看一区二区| 国产精品色眯眯| 天堂影院一区二区| 99精品欧美一区二区蜜桃免费| 日韩一级成人av| 国产精品欧美久久久久一区二区| 日本不卡一区二区三区高清视频| 成人激情小说网站| 欧美一区二区在线看| 亚洲情趣在线观看| 国产在线精品免费| 欧美精品日韩综合在线| 国产精品丝袜久久久久久app| 美腿丝袜在线亚洲一区 | 欧美乱妇一区二区三区不卡视频| 国产日韩欧美制服另类| 日韩国产精品久久久| 91免费观看视频| 久久久久久久久97黄色工厂| 性做久久久久久免费观看| 91在线精品秘密一区二区| 久久众筹精品私拍模特| 免费精品99久久国产综合精品| 91色porny蝌蚪| 欧美激情综合在线| 国产精品69毛片高清亚洲| 69堂国产成人免费视频| 亚洲午夜视频在线观看| 久久久久久久久一| 日韩va欧美va亚洲va久久| 欧美日本在线播放| 亚洲一二三四在线| 日本久久电影网| 亚洲欧美在线另类| 99re这里只有精品视频首页| 国产精品久久毛片a| 成人精品国产免费网站| 国产精品私房写真福利视频| 成人不卡免费av| 国产日韩成人精品| 成人久久久精品乱码一区二区三区 |