And I thought I could spell ... but in caps really everything looks the same.
[openssl.git] / ssl / ssl.h
index 9964b666aaa327558d0ca00b0d0703b949d99adc..e8d74413446fa195119e47aa7dcc47b016eb7b5f 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -241,11 +241,13 @@ typedef struct ssl_session_st
        int not_resumable;
 
        /* The cert is the certificate used to establish this connection */
-       struct cert_st /* CERT */ *cert;
+       struct cert_st /* CERT */ *sess_cert;
        /* XXX should be struct sess_cert_st *sess_cert */
 
-       /* This is the cert for the other end.  On servers, it will be
-        * the same as cert->x509 */
+       /* This is the cert for the other end.
+        * On clients, it will be the same as sess_cert->key->x509
+        * (the latter is not enough as sess_cert is not retained
+        * in the external representation of sessions, see ssl_asn1.c). */
        X509 *peer;
 
        int references;
@@ -392,7 +394,7 @@ struct ssl_ctx_st
 /**/   char *app_verify_arg;
 
        /* default values to use in SSL structures */
-/**/   struct cert_st /* CERT */ *default_cert;
+/**/   struct cert_st /* CERT */ *cert;
 /**/   int read_ahead;
 /**/   int verify_mode;
 /**/   int verify_depth;
@@ -512,6 +514,12 @@ struct ssl_st
        int in_handshake;
        int (*handshake_func)();
 
+       /* Imagine that here's a boolean member "init"
+        * that is switched as soon as handshake_func becomes
+        * != 0 for the first time (which is why we don't actually
+        * need it).
+        */
+
        int server;     /* are we the server side? - mostly used by SSL_clear*/
 
        int new_session;/* 1 if we are to use a new session */
@@ -1159,6 +1167,8 @@ int SSL_COMP_add_compression_method(int id,char *cm);
 #define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK       216
 #define SSL_F_SSL_BAD_METHOD                            160
 #define SSL_F_SSL_BYTES_TO_CIPHER_LIST                  161
+#define SSL_F_SSL_CERT_DUP                              221
+#define SSL_F_SSL_CERT_INST                             222
 #define SSL_F_SSL_CERT_INSTANTIATE                      214
 #define SSL_F_SSL_CERT_NEW                              162
 #define SSL_F_SSL_CHECK_PRIVATE_KEY                     163
@@ -1187,6 +1197,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
 #define SSL_F_SSL_INIT_WBIO_BUFFER                      184
 #define SSL_F_SSL_LOAD_CLIENT_CA_FILE                   185
 #define SSL_F_SSL_NEW                                   186
+#define SSL_F_SSL_READ                                  223
 #define SSL_F_SSL_RSA_PRIVATE_DECRYPT                   187
 #define SSL_F_SSL_RSA_PUBLIC_ENCRYPT                    188
 #define SSL_F_SSL_SESSION_NEW                           189
@@ -1198,6 +1209,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
 #define SSL_F_SSL_SET_SESSION                           195
 #define SSL_F_SSL_SET_SESSION_ID_CONTEXT                218
 #define SSL_F_SSL_SET_WFD                               196
+#define SSL_F_SSL_SHUTDOWN                              224
 #define SSL_F_SSL_UNDEFINED_FUNCTION                    197
 #define SSL_F_SSL_USE_CERTIFICATE                       198
 #define SSL_F_SSL_USE_CERTIFICATE_ASN1                  199
@@ -1279,6 +1291,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
 #define SSL_R_INVALID_CHALLENGE_LENGTH                  158
 #define SSL_R_LENGTH_MISMATCH                           159
 #define SSL_R_LENGTH_TOO_SHORT                          160
+#define SSL_R_LIBRARY_BUG                               274
 #define SSL_R_LIBRARY_HAS_NO_CIPHERS                    161
 #define SSL_R_MISSING_DH_DSA_CERT                       162
 #define SSL_R_MISSING_DH_KEY                            163
@@ -1389,6 +1402,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
 #define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES                 243
 #define SSL_R_UNEXPECTED_MESSAGE                        244
 #define SSL_R_UNEXPECTED_RECORD                                 245
+#define SSL_R_UNINITIALIZED                             276
 #define SSL_R_UNKNOWN_ALERT_TYPE                        246
 #define SSL_R_UNKNOWN_CERTIFICATE_TYPE                  247
 #define SSL_R_UNKNOWN_CIPHER_RETURNED                   248