{-------------------------------------------------------------------------------
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      THIS ISN'T COMPLETE TRANSLATION OF C++ HEADERS AND NEVER WILL BE.

  FOR COPYRIGHT OF ORIGINAL ERIC YOUNG SOFTWARE LOOK AT FILES IN HEADER FOLDER.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

      Copyright (C) 1998 by Jan Tomasek <xtomasej@fel.cvut.cz>
      All rights reserved.

      This library is free for commercial and non-commercial use as long as
      the following conditions are aheared to.  The following conditions
      apply to all code found in this distribution.  The documentation
      included with this distribution is covered by the same copyright terms.

      Copyright remains Jan Tomasek's, and as such any Copyright notices in
      the code are not to be removed.
      If this package is used in a product, Jan Tomasek should be given
      attribution as the author of the parts of the library used.
      This can be in the form of a textual message at program startup or
      in documentation (online or textual) provided with the package.

      Redistribution and use in source and binary forms, with or without
      modification, are permitted provided that the following conditions
      are met:
      1. Redistributions of source code must retain the copyright
         notice, this list of conditions and the following disclaimer.
      2. Redistributions in binary form must reproduce the above copyright
         notice, this list of conditions and the following disclaimer in the
         documentation and/or other materials provided with the distribution.
      3. All advertising materials mentioning features or use of this software
         must display the following acknowledgement:
             "This product includes software written by
              Jan Tomasek <xtomasej@fel.cvut.cz>"

      THIS SOFTWARE IS PROVIDED BY JAN TOMASEK ``AS IS'' AND
      ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
      FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
      OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
      LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
      OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      SUCH DAMAGE.

      The licence and distribution terms for any publically available version or
      derivative of this code cannot be changed.  i.e. this code cannot simply
      be copied and put under another distribution licence
      [including the GNU Public Licence.]

History :
  28.07.98 Created
  22.08.98 Extracted const, types to one file for including in both SSLeay
           and LIBeay
-------------------------------------------------------------------------------}

{ The following are the possible values for ssl->state are are
  used to indicate where we are upto in the SSL connection establishment.
  The macros that follow are about the only things you should need to use
  and even then, only when using non-blocking IO.
  It can also be useful to work out where you were when the connection
  failed.}
Const SSL_ST_CONNECT                                             = $1000;
Const SSL_ST_ACCEPT                                              = $2000;
Const SSL_ST_MASK                                                = $0FFF;
Const SSL_ST_INIT                                                = (SSL_ST_CONNECT or SSL_ST_ACCEPT);
Const SSL_ST_BEFORE                                              = $4000;
Const SSL_ST_OK                                                  = $03;
Const SSL_ST_RENEGOTIATE                                         = ($04 or SSL_ST_INIT);

{$I ssl2c.inc}  {Constants from ssl2.h}
{$I ssl3c.inc}  {...            ssl3.h}
{$I pem_c.inc}  {               pem.h}
{$I md2_c.inc}  {               md2.h}
{$I md5_c.inc}  {               md5.h}
{$I sha_c.inc}  {               sha.h}
{$I mdc2c.inc}  {               mdc2.h}
{$I epv_c.inc}  {               epv.h}
{$I err_c.inc}  {               err.h}
{$I x509c.inc}  {               x509.h}
{$I x509v_c.inc}{               x509_vfy.h}

{ SSLeay version number for ASN.1 encoding of the session information }
{ Version 0 - initial version
  Version 1 - added the optional peer certificate}
const SSL_SESSION_ASN1_VERSION                                   = $0001;

{ text strings for the ciphers, this is not text! !@#}
const SSL_TXT_NULL_WITH_MD5                                      = SSL2_TXT_NULL_WITH_MD5;
const SSL_TXT_RC4_128_WITH_MD5                                   = SSL2_TXT_RC4_128_WITH_MD5;
const SSL_TXT_RC4_128_EXPORT40_WITH_MD5                          = SSL2_TXT_RC4_128_EXPORT40_WITH_MD5;
const SSL_TXT_RC2_128_CBC_WITH_MD5                               = SSL2_TXT_RC2_128_CBC_WITH_MD5;
const SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5                      = SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5;
const SSL_TXT_IDEA_128_CBC_WITH_MD5                              = SSL2_TXT_IDEA_128_CBC_WITH_MD5;
const SSL_TXT_DES_64_CBC_WITH_MD5                                = SSL2_TXT_DES_64_CBC_WITH_MD5;
const SSL_TXT_DES_64_CBC_WITH_SHA                                = SSL2_TXT_DES_64_CBC_WITH_SHA;
const SSL_TXT_DES_192_EDE3_CBC_WITH_MD5                          = SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5;
const SSL_TXT_DES_192_EDE3_CBC_WITH_SHA                          = SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA;

const SSL_MAX_SSL_SESSION_ID_LENGTH                              = 32;

const SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES                        = (512 div 8);
const SSL_MAX_KEY_ARG_LENGTH                                     = 8;
const SSL_MAX_MASTER_KEY_LENGTH                                  = 48;

{ These are used to specify which ciphers to use and not to use }
const SSL_TXT_LOW                                                = 'LOW';
const SSL_TXT_MEDIUM                                             = 'MEDIUM';
const SSL_TXT_HIGH                                               = 'HIGH';
const SSL_TXT_kFZA                                               = 'kFZA';
const SSL_TXT_aFZA                                               = 'aFZA';
const SSL_TXT_eFZA                                               = 'eFZA';
const SSL_TXT_FZA                                                = 'FZA';

const SSL_TXT_aNULL                                              = 'aNULL';
const SSL_TXT_eNULL                                              = 'eNULL';
const SSL_TXT_NULL                                               = 'NULL';

const SSL_TXT_kRSA                                               = 'kRSA';
const SSL_TXT_kDHr                                               = 'kDHr';
const SSL_TXT_kDHd                                               = 'kDHd';
const SSL_TXT_kEDH                                               = 'kEDH';
const SSL_TXT_aRSA                                               = 'aRSA';
const SSL_TXT_aDSS                                               = 'aDSS';
const SSL_TXT_saDH                                               = 'aDH';  {!!! originaly SSL_TXT_aDH}
const SSL_TXT_DSS                                                = 'DSS';
const SSL_TXT_DH                                                 = 'DH';
const SSL_TXT_EDH                                                = 'EDH';
const SSL_TXT_ADH                                                = 'ADH';
const SSL_TXT_RSA                                                = 'RSA';
const SSL_TXT_DES                                                = 'DES';
const SSL_TXT_3DES                                               = '3DES';
const SSL_TXT_RC4                                                = 'RC4';
const SSL_TXT_RC2                                                = 'RC2';
const SSL_TXT_IDEA                                               = 'IDEA';
const SSL_TXT_MD5                                                = 'MD5';
const SSL_TXT_SHA0                                               = 'SHA0';
const SSL_TXT_SHA1                                               = 'SHA1';
const SSL_TXT_SHA                                                = 'SHA';
const SSL_TXT_EXP                                                = 'EXP';
const SSL_TXT_EXPORT                                             = 'EXPORT';
const SSL_TXT_SSLV2                                              = 'SSLv2';
const SSL_TXT_SSLV3                                              = 'SSLv3';
const SSL_TXT_ALL                                                = 'ALL';

Const SSL_SENT_SHUTDOWN                                          = 1;
Const SSL_RECEIVED_SHUTDOWN                                      = 2;

Const SSL_FILETYPE_ASN1                                          = X509_FILETYPE_ASN1;
Const SSL_FILETYPE_PEM                                           = X509_FILETYPE_PEM;

Const SSL_OP_MICROSOFT_SESS_ID_BUG                               = $00000001; {L}
Const SSL_OP_NETSCAPE_CHALLENGE_BUG                              = $00000002; {L}
Const SSL_OP_NETSCAPE_CA_DN_BUG                                  = $00000004; {L}
Const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG                    = $00000008; {L}
Const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG                         = $00000010; {L}
Const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER                          = $00000020; {L}
Const SSL_OP_MSIE_SSLV2_RSA_PADDING                              = $00000040; {L}
Const SSL_OP_SSLEAY_080_CLIENT_DH_BUG                            = $00000080; {L}

{ If set, only use tmp_dh parameters once }
Const SSL_OP_SINGLE_DH_USE                                       = $00100000; {L}
{ Set to also use the tmp_rsa key when doing RSA operations. }
Const SSL_OP_EPHEMERAL_RSA                                       = $00200000; {L}

Const SSL_OP_NON_EXPORT_FIRST                                    = $40000000; {L}
Const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG                     = $80000000; {L}
Const SSL_OP_ALL                                                 = $000FFFFF; {L}

Const SSL_SESS_CACHE_OFF                                         = $00;
Const SSL_SESS_CACHE_CLIENT                                      = $01;
Const SSL_SESS_CACHE_SERVER                                      = $02;
Const SSL_SESS_CACHE_BOTH                                        = SSL_SESS_CACHE_CLIENT or SSL_SESS_CACHE_SERVER;
Const SSL_SESS_CACHE_NO_AUTO_CLEAR                               = $80;

Const SSL_NOTHING                                                = 1;
Const SSL_WRITING                                                = 2;
Const SSL_READING                                                = 3;
Const SSL_X509_LOOKUP                                            = 4;

Const SSL_CB_LOOP                                                = $01;
Const SSL_CB_EXIT                                                = $02;
Const SSL_CB_READ                                                = $04;
Const SSL_CB_WRITE                                               = $08;
Const SSL_CB_ALERT                                               = $4000; { used in callback }
Const SSL_CB_READ_ALERT                                          = (SSL_CB_ALERT or SSL_CB_READ);
Const SSL_CB_WRITE_ALERT                                         = (SSL_CB_ALERT or SSL_CB_WRITE);
Const SSL_CB_ACCEPT_LOOP                                         = (SSL_ST_ACCEPT or SSL_CB_LOOP);
Const SSL_CB_ACCEPT_EXIT                                         = (SSL_ST_ACCEPT or SSL_CB_EXIT);
Const SSL_CB_CONNECT_LOOP                                        = (SSL_ST_CONNECT or SSL_CB_LOOP);
Const SSL_CB_CONNECT_EXIT                                        = (SSL_ST_CONNECT or SSL_CB_EXIT);
Const SSL_CB_HANDSHAKE_START                                     = $10;
Const SSL_CB_HANDSHAKE_DONE                                      = $20;

{ The following 2 states are kept in ssl->rstate when reads fail,
  you should not need these }
Const SSL_ST_READ_HEADER                                         = $F0;
Const SSL_ST_READ_BODY                                           = $F1;
Const SSL_ST_READ_DONE                                           = $F2;

{ use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options
  are 'ored' with SSL_VERIFY_PEER if they are desired }
Const SSL_VERIFY_NONE                                            = $00;
Const SSL_VERIFY_PEER                                            = $01;
Const SSL_VERIFY_FAIL_IF_NO_PEER_CERT                            = $02;
Const SSL_VERIFY_CLIENT_ONCE                                     = $04;

Const SSL_RWERR_BAD_WRITE_RETRY                                  = (-2);
Const SSL_RWERR_BAD_MAC_DECODE                                   = (-3);
Const SSL_RWERR_INTERNAL_ERROR                                   = (-4); { should not get this one }
Const SSL_RWERR_WRONG_RECORD_TYPE                                = (-5); { used internally }

Const SSL_ERROR_NONE                                             = 0;
Const SSL_ERROR_SSL                                              = 1;
Const SSL_ERROR_WANT_READ                                        = 2;
Const SSL_ERROR_WANT_WRITE                                       = 3;
Const SSL_ERROR_WANT_X509_LOOKUP                                 = 4;
Const SSL_ERROR_SYSCALL                                          = 5; { look at errno }
Const SSL_ERROR_ZERO_RETURN                                      = 6;
Const SSL_ERROR_WANT_CONNECT                                     = 7;

Const SSL_CTRL_NEED_TMP_RSA                                      = 1;
Const SSL_CTRL_SET_TMP_RSA                                       = 2;
Const SSL_CTRL_SET_TMP_DH                                        = 3;
Const SSL_CTRL_SET_TMP_RSA_CB                                    = 4;
Const SSL_CTRL_SET_TMP_DH_CB                                     = 5;

{-- BEGIN ERROR CODES ---------------------------------------------------------}
{ Error codes for the SSL functions. }

{ Function codes. }
Const  SSL_F_CLIENT_CERTIFICATE                                  = 100;
Const  SSL_F_CLIENT_HELLO                                        = 101;
Const  SSL_F_CLIENT_MASTER_KEY                                   = 102;
Const  SSL_F_D2I_SSL_SESSION                                     = 103;
Const  SSL_F_DO_SSL3_WRITE                                       = 104;
Const  SSL_F_GET_CLIENT_FINISHED                                 = 105;
Const  SSL_F_GET_CLIENT_HELLO                                    = 106;
Const  SSL_F_GET_CLIENT_MASTER_KEY                               = 107;
Const  SSL_F_GET_SERVER_FINISHED                                 = 108;
Const  SSL_F_GET_SERVER_HELLO                                    = 109;
Const  SSL_F_GET_SERVER_VERIFY                                   = 110;
Const  SSL_F_I2D_SSL_SESSION                                     = 111;
Const  SSL_F_READ_N                                              = 112;
Const  SSL_F_REQUEST_CERTIFICATE                                 = 113;
Const  SSL_F_SERVER_HELLO                                        = 114;
Const  SSL_F_SSL23_ACCEPT                                        = 115;
Const  SSL_F_SSL23_CLIENT_HELLO                                  = 116;
Const  SSL_F_SSL23_CONNECT                                       = 117;
Const  SSL_F_SSL23_GET_CLIENT_HELLO                              = 118;
Const  SSL_F_SSL23_GET_SERVER_HELLO                              = 119;
Const  SSL_F_SSL23_READ                                          = 120;
Const  SSL_F_SSL23_WRITE                                         = 121;
Const  SSL_F_SSL2_ACCEPT                                         = 122;
Const  SSL_F_SSL2_CONNECT                                        = 123;
Const  SSL_F_SSL2_ENC_INIT                                       = 124;
Const  SSL_F_SSL2_READ                                           = 125;
Const  SSL_F_SSL2_SET_CERTIFICATE                                = 126;
Const  SSL_F_SSL2_WRITE                                          = 127;
Const  SSL_F_SSL3_ACCEPT                                         = 128;
Const  SSL_F_SSL3_CHANGE_CIPHER_STATE                            = 129;
Const  SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM                       = 130;
Const  SSL_F_SSL3_CLIENT_HELLO                                   = 131;
Const  SSL_F_SSL3_CONNECT                                        = 132;
Const  SSL_F_SSL3_CTX_CTRL                                       = 133;
Const  SSL_F_SSL3_ENC                                            = 134;
Const  SSL_F_SSL3_GET_CERTIFICATE_REQUEST                        = 135;
Const  SSL_F_SSL3_GET_CERT_VERIFY                                = 136;
Const  SSL_F_SSL3_GET_CLIENT_CERTIFICATE                         = 137;
Const  SSL_F_SSL3_GET_CLIENT_HELLO                               = 138;
Const  SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE                        = 139;
Const  SSL_F_SSL3_GET_FINISHED                                   = 140;
Const  SSL_F_SSL3_GET_KEY_EXCHANGE                               = 141;
Const  SSL_F_SSL3_GET_MESSAGE                                    = 142;
Const  SSL_F_SSL3_GET_RECORD                                     = 143;
Const  SSL_F_SSL3_GET_SERVER_CERTIFICATE                         = 144;
Const  SSL_F_SSL3_GET_SERVER_DONE                                = 145;
Const  SSL_F_SSL3_GET_SERVER_HELLO                               = 146;
Const  SSL_F_SSL3_OUTPUT_CERT_CHAIN                              = 147;
Const  SSL_F_SSL3_READ_BYTES                                     = 148;
Const  SSL_F_SSL3_READ_N                                         = 149;
Const  SSL_F_SSL3_SEND_CERTIFICATE_REQUEST                       = 150;
Const  SSL_F_SSL3_SEND_CLIENT_CERTIFICATE                        = 151;
Const  SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE                       = 152;
Const  SSL_F_SSL3_SEND_CLIENT_VERIFY                             = 153;
Const  SSL_F_SSL3_SEND_SERVER_CERTIFICATE                        = 154;
Const  SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE                       = 155;
Const  SSL_F_SSL3_SETUP_BUFFERS                                  = 156;
Const  SSL_F_SSL3_SETUP_KEY_BLOCK                                = 157;
Const  SSL_F_SSL3_WRITE_BYTES                                    = 158;
Const  SSL_F_SSL3_WRITE_PENDING                                  = 159;
Const  SSL_F_SSL_BAD_METHOD                                      = 160;
Const  SSL_F_SSL_BYTES_TO_CIPHER_LIST                            = 161;
Const  SSL_F_SSL_CERT_NEW                                        = 162;
Const  SSL_F_SSL_CHECK_PRIVATE_KEY                               = 163;
Const  SSL_F_SSL_CREATE_CIPHER_LIST                              = 164;
Const  SSL_F_SSL_CTX_CHECK_PRIVATE_KEY                           = 165;
Const  SSL_F_SSL_CTX_NEW                                         = 166;
Const  SSL_F_SSL_CTX_SET_SSL_VERSION                             = 167;
Const  SSL_F_SSL_CTX_USE_CERTIFICATE                             = 168;
Const  SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1                        = 169;
Const  SSL_F_SSL_CTX_USE_CERTIFICATE_FILE                        = 170;
Const  SSL_F_SSL_CTX_USE_PRIVATEKEY                              = 171;
Const  SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1                         = 172;
Const  SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE                         = 173;
Const  SSL_F_SSL_CTX_USE_RSAPRIVATEKEY                           = 174;
Const  SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1                      = 175;
Const  SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE                      = 176;
Const  SSL_F_SSL_DO_HANDSHAKE                                    = 177;
Const  SSL_F_SSL_GET_NEW_SESSION                                 = 178;
Const  SSL_F_SSL_GET_SERVER_SEND_CERT                            = 179;
Const  SSL_F_SSL_GET_SIGN_PKEY                                   = 180;
Const  SSL_F_SSL_LOAD_CLIENT_CA_FILE                             = 181;
Const  SSL_F_SSL_NEW                                             = 182;
Const  SSL_F_SSL_RSA_PRIVATE_DECRYPT                             = 183;
Const  SSL_F_SSL_RSA_PUBLIC_ENCRYPT                              = 184;
Const  SSL_F_SSL_SESSION_NEW                                     = 185;
Const  SSL_F_SSL_SESSION_PRINT_FP                                = 186;
Const  SSL_F_SSL_SET_FD                                          = 187;
Const  SSL_F_SSL_SET_PKEY                                        = 188;
Const  SSL_F_SSL_SET_RFD                                         = 189;
Const  SSL_F_SSL_SET_SESSION                                     = 190;
Const  SSL_F_SSL_SET_WFD                                         = 191;
Const  SSL_F_SSL_UNDEFINED_FUNCTION                              = 192;
Const  SSL_F_SSL_USE_CERTIFICATE                                 = 193;
Const  SSL_F_SSL_USE_CERTIFICATE_ASN1                            = 194;
Const  SSL_F_SSL_USE_CERTIFICATE_FILE                            = 195;
Const  SSL_F_SSL_USE_PRIVATEKEY                                  = 196;
Const  SSL_F_SSL_USE_PRIVATEKEY_ASN1                             = 197;
Const  SSL_F_SSL_USE_PRIVATEKEY_FILE                             = 198;
Const  SSL_F_SSL_USE_RSAPRIVATEKEY                               = 199;
Const  SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1                          = 200;
Const  SSL_F_SSL_USE_RSAPRIVATEKEY_FILE                          = 201;
Const  SSL_F_SSL_WRITE                                           = 202;
Const  SSL_F_WRITE_PENDING                                       = 203;

{ Reason codes. }
Const  SSL_R_APP_DATA_IN_HANDSHAKE                               = 100;
Const  SSL_R_BAD_ALERT_RECORD                                    = 101;
Const  SSL_R_BAD_AUTHENTICATION_TYPE                             = 102;
Const  SSL_R_BAD_CHANGE_CIPHER_SPEC                              = 103;
Const  SSL_R_BAD_CHECKSUM                                        = 104;
Const  SSL_R_BAD_CLIENT_REQUEST                                  = 105;
Const  SSL_R_BAD_DATA_RETURNED_BY_CALLBACK                       = 106;
Const  SSL_R_BAD_DECOMPRESSION                                   = 107;
Const  SSL_R_BAD_DH_G_LENGTH                                     = 108;
Const  SSL_R_BAD_DH_PUB_KEY_LENGTH                               = 109;
Const  SSL_R_BAD_DH_P_LENGTH                                     = 110;
Const  SSL_R_BAD_DIGEST_LENGTH                                   = 111;
Const  SSL_R_BAD_DSA_SIGNATURE                                   = 112;
Const  SSL_R_BAD_MAC_DECODE                                      = 113;
Const  SSL_R_BAD_MESSAGE_TYPE                                    = 114;
Const  SSL_R_BAD_PACKET_LENGTH                                   = 115;
Const  SSL_R_BAD_RESPONSE_ARGUMENT                               = 116;
Const  SSL_R_BAD_RSA_DECRYPT                                     = 117;
Const  SSL_R_BAD_RSA_ENCRYPT                                     = 118;
Const  SSL_R_BAD_RSA_E_LENGTH                                    = 119;
Const  SSL_R_BAD_RSA_MODULUS_LENGTH                              = 120;
Const  SSL_R_BAD_RSA_SIGNATURE                                   = 121;
Const  SSL_R_BAD_SIGNATURE                                       = 122;
Const  SSL_R_BAD_SSL_FILETYPE                                    = 123;
Const  SSL_R_BAD_SSL_SESSION_ID_LENGTH                           = 124;
Const  SSL_R_BAD_STATE                                           = 125;
Const  SSL_R_BAD_WRITE_RETRY                                     = 126;
Const  SSL_R_BIO_NOT_SET                                         = 127;
Const  SSL_R_BLOCK_CIPHER_PAD_IS_WRONG                           = 128;
Const  SSL_R_BN_LIB                                              = 129;
Const  SSL_R_CA_DN_LENGTH_MISMATCH                               = 130;
Const  SSL_R_CA_DN_TOO_LONG                                      = 131;
Const  SSL_R_CCS_RECEIVED_EARLY                                  = 132;
Const  SSL_R_CERTIFICATE_VERIFY_FAILED                           = 133;
Const  SSL_R_CERT_LENGTH_MISMATCH                                = 134;
Const  SSL_R_CHALLENGE_IS_DIFFERENT                              = 135;
Const  SSL_R_CIPHER_CODE_WRONG_LENGTH                            = 136;
Const  SSL_R_CIPHER_OR_HASH_UNAVAILABLE                          = 137;
Const  SSL_R_CIPHER_TABLE_SRC_ERROR                              = 138;
Const  SSL_R_COMPRESSED_LENGTH_TOO_LONG                          = 139;
Const  SSL_R_COMPRESSION_FAILURE                                 = 140;
Const  SSL_R_CONNECTION_ID_IS_DIFFERENT                          = 141;
Const  SSL_R_DATA_BETWEEN_CCS_AND_FINISHED                       = 142;
Const  SSL_R_DATA_LENGTH_TOO_LONG                                = 143;
Const  SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG                     = 144;
Const  SSL_R_DIGEST_CHECK_FAILED                                 = 145;
Const  SSL_R_ENCRYPTED_LENGTH_TOO_LONG                           = 146;
Const  SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST                       = 147;
Const  SSL_R_EXCESSIVE_MESSAGE_SIZE                              = 148;
Const  SSL_R_EXTRA_DATA_IN_MESSAGE                               = 149;
Const  SSL_R_GOT_A_FIN_BEFORE_A_CCS                              = 150;
Const  SSL_R_INTERNAL_ERROR                                      = 151;
Const  SSL_R_INVALID_CHALLENGE_LENGTH                            = 152;
Const  SSL_R_LENGTH_MISMATCH                                     = 153;
Const  SSL_R_LENGTH_TOO_SHORT                                    = 154;
Const  SSL_R_LIBRARY_HAS_NO_CIPHERS                              = 155;
Const  SSL_R_MISSING_DH_DSA_CERT                                 = 156;
Const  SSL_R_MISSING_DH_KEY                                      = 157;
Const  SSL_R_MISSING_DH_RSA_CERT                                 = 158;
Const  SSL_R_MISSING_DSA_SIGNING_CERT                            = 159;
Const  SSL_R_MISSING_EXPORT_TMP_DH_KEY                           = 160;
Const  SSL_R_MISSING_EXPORT_TMP_RSA_KEY                          = 161;
Const  SSL_R_MISSING_RSA_CERTIFICATE                             = 162;
Const  SSL_R_MISSING_RSA_ENCRYPTING_CERT                         = 163;
Const  SSL_R_MISSING_RSA_SIGNING_CERT                            = 164;
Const  SSL_R_MISSING_TMP_DH_KEY                                  = 165;
Const  SSL_R_MISSING_TMP_RSA_KEY                                 = 166;
Const  SSL_R_MISSING_TMP_RSA_PKEY                                = 167;
Const  SSL_R_MISSING_VERIFY_MESSAGE                              = 168;
Const  SSL_R_NON_SSLV2_INITIAL_PACKET                            = 169;
Const  SSL_R_NO_CERTIFICATES_PASSED                              = 170;
Const  SSL_R_NO_CERTIFICATE_ASSIGNED                             = 171;
Const  SSL_R_NO_CERTIFICATE_RETURNED                             = 172;
Const  SSL_R_NO_CERTIFICATE_SET                                  = 173;
Const  SSL_R_NO_CERTIFICATE_SPECIFIED                            = 174;
Const  SSL_R_NO_CIPHERS_AVAILABLE                                = 175;
Const  SSL_R_NO_CIPHERS_PASSED                                   = 176;
Const  SSL_R_NO_CIPHERS_SPECIFIED                                = 177;
Const  SSL_R_NO_CIPHER_LIST                                      = 178;
Const  SSL_R_NO_CIPHER_MATCH                                     = 179;
Const  SSL_R_NO_CLIENT_CERT_RECEIVED                             = 180;
Const  SSL_R_NO_COMPRESSION_SPECIFIED                            = 181;
Const  SSL_R_NO_PRIVATEKEY                                       = 182;
Const  SSL_R_NO_PRIVATE_KEY_ASSIGNED                             = 183;
Const  SSL_R_NO_PUBLICKEY                                        = 184;
Const  SSL_R_NO_SHARED_CIPHER                                    = 185;
Const  SSL_R_NULL_SSL_CTX                                        = 186;
Const  SSL_R_NULL_SSL_METHOD_PASSED                              = 187;
Const  SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED                     = 188;
Const  SSL_R_PACKET_LENGTH_TOO_LONG                              = 189;
Const  SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE                   = 190;
Const  SSL_R_PEER_ERROR                                          = 191;
Const  SSL_R_PEER_ERROR_CERTIFICATE                              = 192;
Const  SSL_R_PEER_ERROR_NO_CERTIFICATE                           = 193;
Const  SSL_R_PEER_ERROR_NO_CIPHER                                = 194;
Const  SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE             = 195;
Const  SSL_R_PRE_MAC_LENGTH_TOO_LONG                             = 196;
Const  SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS                   = 197;
Const  SSL_R_PROTOCOL_IS_SHUTDOWN                                = 198;
Const  SSL_R_PUBLIC_KEY_ENCRYPT_ERROR                            = 199;
Const  SSL_R_PUBLIC_KEY_IS_NOT_RSA                               = 200;
Const  SSL_R_PUBLIC_KEY_NOT_RSA                                  = 201;
Const  SSL_R_READ_BIO_NOT_SET                                    = 202;
Const  SSL_R_READ_WRONG_PACKET_TYPE                              = 203;
Const  SSL_R_RECORD_LENGTH_MISMATCH                              = 204;
Const  SSL_R_RECORD_TOO_LARGE                                    = 205;
Const  SSL_R_REQUIRED_CIPHER_MISSING                             = 206;
Const  SSL_R_REUSE_CERT_LENGTH_NOT_ZERO                          = 207;
Const  SSL_R_REUSE_CERT_TYPE_NOT_ZERO                            = 208;
Const  SSL_R_REUSE_CIPHER_LIST_NOT_ZERO                          = 209;
Const  SSL_R_SHORT_READ                                          = 210;
Const  SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE               = 211;
Const  SSL_R_SSL3_SESSION_ID_TOO_SHORT                           = 212;
Const  SSL_R_SSLV3_ALERT_BAD_CERTIFICATE                         = 1042;
Const  SSL_R_SSLV3_ALERT_BAD_RECORD_MAC                          = 1020;
Const  SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED                     = 1045;
Const  SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED                     = 1044;
Const  SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN                     = 1046;
Const  SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE                   = 1030;
Const  SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE                       = 1040;
Const  SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER                       = 1047;
Const  SSL_R_SSLV3_ALERT_NO_CERTIFICATE                          = 1041;
Const  SSL_R_SSLV3_ALERT_PEER_ERROR_CERTIFICATE                  = 213;
Const  SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CERTIFICATE               = 214;
Const  SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CIPHER                    = 215;
Const  SSL_R_SSLV3_ALERT_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE = 216;
Const  SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE                      = 1010;
Const  SSL_R_SSLV3_ALERT_UNKNOWN_REMOTE_ERROR_TYPE               = 217;
Const  SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE                 = 1043;
Const  SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION                  = 218;
Const  SSL_R_SSL_HANDSHAKE_FAILURE                               = 219;
Const  SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS                          = 220;
Const  SSL_R_SSL_SESSION_ID_IS_DIFFERENT                         = 221;
Const  SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER                     = 222;
Const  SSL_R_UNABLE_TO_DECODE_DH_CERTS                           = 223;
Const  SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY                        = 224;
Const  SSL_R_UNABLE_TO_FIND_DH_PARAMETERS                        = 225;
Const  SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS                = 226;
Const  SSL_R_UNABLE_TO_FIND_SSL_METHOD                           = 227;
Const  SSL_R_UNEXPECTED_MESSAGE                                  = 228;
Const  SSL_R_UNEXPECTED_RECORD                                   = 229;
Const  SSL_R_UNKNOWN_ALERT_TYPE                                  = 230;
Const  SSL_R_UNKNOWN_CERTIFICATE_TYPE                            = 231;
Const  SSL_R_UNKNOWN_CIPHER_RETURNED                             = 232;
Const  SSL_R_UNKNOWN_CIPHER_TYPE                                 = 233;
Const  SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE                           = 234;
Const  SSL_R_UNKNOWN_PKEY_TYPE                                   = 235;
Const  SSL_R_UNKNOWN_PROTOCOL                                    = 236;
Const  SSL_R_UNKNOWN_REMOTE_ERROR_TYPE                           = 237;
Const  SSL_R_UNKNOWN_SSL_VERSION                                 = 238;
Const  SSL_R_UNKNOWN_STATE                                       = 239;
Const  SSL_R_UNSUPPORTED_CIPHER                                  = 240;
Const  SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM                   = 241;
Const  SSL_R_UNSUPPORTED_SSL_VERSION                             = 242;
Const  SSL_R_WRITE_BIO_NOT_SET                                   = 243;
Const  SSL_R_WRONG_CIPHER_RETURNED                               = 244;
Const  SSL_R_WRONG_MESSAGE_TYPE                                  = 245;
Const  SSL_R_WRONG_NUMBER_OF_KEY_BITS                            = 246;
Const  SSL_R_WRONG_SIGNATURE_LENGTH                              = 247;
Const  SSL_R_WRONG_SIGNATURE_SIZE                                = 248;
Const  SSL_R_WRONG_SSL_VERSION                                   = 249;
Const  SSL_R_WRONG_VERSION_NUMBER                                = 250;
Const  SSL_R_X509_LIB                                            = 251;

