X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fkssl.h;h=c61dba7432ffc2d3e7aeb9b0b7b6e5abc80c90ba;hp=0cfd219bf4f9c013e9fe35c42da8406ecbcbe668;hb=c80fd6b215449f2ba7228af58979ac8709f74b82;hpb=54a656ef081f72a740c550ebd8099b40b8b5cde0 diff --git a/ssl/kssl.h b/ssl/kssl.h index 0cfd219bf4..c61dba7432 100644 --- a/ssl/kssl.h +++ b/ssl/kssl.h @@ -70,25 +70,41 @@ #include #include #include +#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" @@ -110,18 +126,17 @@ typedef unsigned char krb5_octet; #define KSSL_CLOCKSKEW 300; #endif -/* Unused #define KSSL_ERR_MAX 255 typedef struct kssl_err_st { int reason; char text[KSSL_ERR_MAX+1]; } 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: */ @@ -150,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, @@ -167,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