Comment.
[openssl.git] / ssl / ssl.h
index c0f95473c1976defb73a581c2ad552489516080b..1df253cd28dc8e7e82d08d1c2f5592d59589e8c6 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -148,6 +148,7 @@ extern "C" {
 #include <openssl/lhash.h>
 #include <openssl/buffer.h>
 #include <openssl/bio.h>
+#include <openssl/pem.h>
 #include <openssl/x509.h>
 
 #define SSL_FILETYPE_ASN1      X509_FILETYPE_ASN1
@@ -241,11 +242,10 @@ typedef struct ssl_session_st
        int not_resumable;
 
        /* The cert is the certificate used to establish this connection */
-       struct cert_st /* CERT */ *sess_cert;
-       /* XXX should be struct sess_cert_st *sess_cert */
+       struct sess_cert_st /* SESS_CERT */ *sess_cert;
 
        /* This is the cert for the other end.
-        * On clients, it will be the same as sess_cert->key->x509
+        * On clients, it will be the same as sess_cert->peer_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;
@@ -403,7 +403,7 @@ struct ssl_ctx_st
 /**/   int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx);
 
        /* Default password callback. */
-/**/   int (*default_passwd_callback)();
+/**/   pem_password_cb *default_passwd_callback;
 
        /* get client cert callback */
 /**/   int (*client_cert_cb)(/* SSL *ssl, X509 **x509, EVP_PKEY **pkey */);
@@ -955,7 +955,7 @@ int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx,
 int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
 int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d);
 
-void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx,int (*cb)());
+void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *);
 
 int SSL_CTX_check_private_key(SSL_CTX *ctx);
 int SSL_check_private_key(SSL *ctx);
@@ -1215,6 +1215,7 @@ int SSL_COMP_add_compression_method(int id,char *cm);
 #define SSL_F_SSL_RSA_PUBLIC_ENCRYPT                    188
 #define SSL_F_SSL_SESSION_NEW                           189
 #define SSL_F_SSL_SESSION_PRINT_FP                      190
+#define SSL_F_SSL_SESS_CERT_NEW                                 225
 #define SSL_F_SSL_SET_CERT                              191
 #define SSL_F_SSL_SET_FD                                192
 #define SSL_F_SSL_SET_PKEY                              193