Further comment changes for reformat (master)
[openssl.git] / ssl / kssl.h
index 50480f6a3109d445035cb255cb548433e1feeb11..c61dba7432ffc2d3e7aeb9b0b7b6e5abc80c90ba 100644 (file)
 #ifndef        KSSL_H
 #define        KSSL_H
 
+#include <openssl/opensslconf.h>
+
 #ifndef OPENSSL_NO_KRB5
 
 #include <stdio.h>
 #include <ctype.h>
 #include <krb5.h>
+#ifdef OPENSSL_SYS_WIN32
+/* These can sometimes get redefined indirectly by krb5 header files
+ * after they get undefed in ossl_typ.h
+ */
+#undef X509_NAME
+#undef X509_EXTENSIONS
+#undef OCSP_REQUEST
+#undef OCSP_RESPONSE
+#endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 /*
-**     Depending on which KRB5 implementation used, some types from
-**     the other may be missing.  Resolve that here and now
-*/
+ *     Depending on which KRB5 implementation used, some types from
+ *     the other may be missing.  Resolve that here and now
+ */
 #ifdef KRB5_HEIMDAL
 typedef unsigned char krb5_octet;
 #define FAR
+#else
+
+#ifndef FAR
+#define FAR
 #endif
 
-/*     Uncomment this to debug kssl problems or
-**     to trace usage of the Kerberos session key
-**
-**     #define         KSSL_DEBUG
-*/
+#endif
+
+/*-
+ *     Uncomment this to debug kssl problems or
+ *     to trace usage of the Kerberos session key
+ *
+ *     #define         KSSL_DEBUG
+ */
 
 #ifndef        KRB5SVC
 #define KRB5SVC        "host"
@@ -115,10 +133,10 @@ typedef struct kssl_err_st  {
        } KSSL_ERR;
 
 
-/*     Context for passing
-**             (1) Kerberos session key to SSL, and
-**             (2)     Config data between application and SSL lib
-*/
+/*-    Context for passing
+ *             (1) Kerberos session key to SSL, and
+ *             (2)     Config data between application and SSL lib
+ */
 typedef struct kssl_ctx_st
         {
                                 /*     used by:    disposition:            */
@@ -147,7 +165,7 @@ KSSL_CTX *kssl_ctx_new(void);
 KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx);
 void kssl_ctx_show(KSSL_CTX *kssl_ctx);
 krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
-        krb5_data *realm, krb5_data *entity);
+        krb5_data *realm, krb5_data *entity, int nentities);
 krb5_error_code        kssl_cget_tkt(KSSL_CTX *kssl_ctx,  krb5_data **enc_tktp,
         krb5_data *authenp, KSSL_ERR *kssl_err);
 krb5_error_code        kssl_sget_tkt(KSSL_CTX *kssl_ctx,  krb5_data *indata,
@@ -164,6 +182,10 @@ krb5_error_code  kssl_check_authent(KSSL_CTX *kssl_ctx, krb5_data *authentp,
                                    krb5_timestamp *atimep, KSSL_ERR *kssl_err);
 unsigned char  *kssl_skip_confound(krb5_enctype enctype, unsigned char *authn);
 
+void SSL_set0_kssl_ctx(SSL *s, KSSL_CTX *kctx);
+KSSL_CTX * SSL_get0_kssl_ctx(SSL *s);
+char *kssl_ctx_get0_client_princ(KSSL_CTX *kctx);
+
 #ifdef  __cplusplus
 }
 #endif