src/java.security.jgss/share/native/libj2gss/NativeFunc.h
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 55638 430a51e86f28
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
     2
 * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#ifndef NATIVE_FUNC_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#define NATIVE_FUNC_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#include "gssapi.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
49682
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    31
#ifdef WIN32
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    32
#include <windows.h>
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    33
#define GETLIB(libName) LoadLibrary(libName)
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    34
#define GETFUNC(lib,name) GetProcAddress(lib,name)
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    35
#define CLOSELIB(lib) CloseHandle(lib)
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    36
#else
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    37
#include <dlfcn.h>
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    38
#define GETLIB(libName) dlopen(libName, RTLD_NOW)
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    39
#define GETFUNC(lib,name) dlsym(lib,name)
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    40
#define CLOSELIB(lib) dlclose(lib)
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    41
#endif
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    42
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#ifndef TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#define TRUE    1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#ifndef FALSE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#define FALSE   0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
49682
2918e1146106 8200468: Port the native GSS-API bridge to Windows
weijun
parents: 47216
diff changeset
    51
int loadNative(const char *libName);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
/* function pointer definitions */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
typedef OM_uint32 (*RELEASE_NAME_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
                                gss_name_t *name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
typedef OM_uint32 (*IMPORT_NAME_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
                                (OM_uint32 *minor_status,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
    60
                                gss_const_buffer_t input_name_buffer,
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
    61
                                gss_const_OID input_name_type,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
                                gss_name_t *output_name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
typedef OM_uint32 (*COMPARE_NAME_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
    66
                                gss_const_name_t name1,
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
    67
                                gss_const_name_t name2,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
                                int *name_equal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
typedef OM_uint32 (*CANONICALIZE_NAME_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
    72
                                gss_const_name_t input_name,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
    73
                                gss_const_OID mech_type,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
                                gss_name_t *output_name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
typedef OM_uint32 (*EXPORT_NAME_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
    78
                                gss_const_name_t input_name,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
                                gss_buffer_t exported_name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
typedef OM_uint32 (*DISPLAY_NAME_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
    83
                                gss_const_name_t input_name,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                                gss_buffer_t output_name_buffer,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                                gss_OID *output_name_type);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
typedef OM_uint32 (*ACQUIRE_CRED_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
    89
                                gss_const_name_t desired_name,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                                OM_uint32 time_req,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
    91
                                gss_const_OID_set desired_mech,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
                                gss_cred_usage_t cred_usage,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                                gss_cred_id_t *output_cred_handle,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
                                gss_OID_set *actual_mechs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                                OM_uint32 *time_rec);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
typedef OM_uint32 (*RELEASE_CRED_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                                gss_cred_id_t *cred_handle);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
typedef OM_uint32 (*INQUIRE_CRED_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   103
                                gss_const_cred_id_t cred_handle,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                                gss_name_t *name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
                                OM_uint32 *lifetime,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                                gss_cred_usage_t *cred_usage,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                                gss_OID_set *mechanisms);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
typedef OM_uint32 (*IMPORT_SEC_CONTEXT_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                                (OM_uint32 *minor_status,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   111
                                gss_const_buffer_t interprocess_token,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                                gss_ctx_id_t *context_handle);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
typedef OM_uint32 (*INIT_SEC_CONTEXT_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   116
                                gss_const_cred_id_t initiator_cred_handle,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                                gss_ctx_id_t *context_handle,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   118
                                gss_const_name_t target_name,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   119
                                gss_const_OID mech_type,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                                OM_uint32 req_flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                                OM_uint32 time_req,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   122
                                gss_const_channel_bindings_t input_chan_bindings,
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   123
                                gss_const_buffer_t input_token,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
                                gss_OID *actual_mech_type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                                gss_buffer_t output_token,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                                OM_uint32 *ret_flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                                OM_uint32 *time_rec);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
typedef OM_uint32 (*ACCEPT_SEC_CONTEXT_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                                gss_ctx_id_t *context_handle,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   132
                                gss_const_cred_id_t acceptor_cred_handle,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   133
                                gss_const_buffer_t input_token,
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   134
                                gss_const_channel_bindings_t input_chan_bindings,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                                gss_name_t *src_name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                                gss_OID *mech_type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
                                gss_buffer_t output_token,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                                OM_uint32 *ret_flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                                OM_uint32 *time_rec,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                                gss_cred_id_t *delegated_cred_handle);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
typedef OM_uint32 (*INQUIRE_CONTEXT_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   144
                                gss_const_ctx_id_t context_handle,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
                                gss_name_t *src_name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
                                gss_name_t *targ_name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
                                OM_uint32 *lifetime_rec,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                                gss_OID *mech_type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
                                OM_uint32 *ctx_flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                                int *locally_initiated,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                                int *open);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
typedef OM_uint32 (*DELETE_SEC_CONTEXT_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
                                gss_ctx_id_t *context_handle,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                                gss_buffer_t output_token);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
typedef OM_uint32 (*CONTEXT_TIME_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   160
                                gss_const_ctx_id_t context_handle,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
                                OM_uint32 *time_rec);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
typedef OM_uint32 (*WRAP_SIZE_LIMIT_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   165
                                gss_const_ctx_id_t context_handle,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
                                int conf_req_flag,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                                gss_qop_t qop_req,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
                                OM_uint32 req_output_size,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
                                OM_uint32 *max_input_size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
typedef OM_uint32 (*EXPORT_SEC_CONTEXT_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                                gss_ctx_id_t *context_handle,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                                gss_buffer_t interprocess_token);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
typedef OM_uint32 (*GET_MIC_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   178
                                gss_const_ctx_id_t context_handle,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
                                gss_qop_t qop_req,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   180
                                gss_const_buffer_t message_buffer,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                                gss_buffer_t msg_token);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
typedef OM_uint32 (*VERIFY_MIC_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   185
                                gss_const_ctx_id_t context_handle,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   186
                                gss_const_buffer_t message_buffer,
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   187
                                gss_const_buffer_t token_buffer,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
                                gss_qop_t *qop_state);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
typedef OM_uint32 (*WRAP_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   192
                                gss_const_ctx_id_t context_handle,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                                int conf_req_flag,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                                gss_qop_t qop_req,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   195
                                gss_const_buffer_t input_message_buffer,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                                int *conf_state,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                                gss_buffer_t output_message_buffer);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
typedef OM_uint32 (*UNWRAP_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
                                (OM_uint32 *minor_status,
55354
74f0622db875 6722928: Support SSPI as a native GSS-API provider
weijun
parents: 49682
diff changeset
   201
                                gss_const_ctx_id_t context_handle,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   202
                                gss_const_buffer_t input_message_buffer,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                                gss_buffer_t output_message_buffer,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                                int *conf_state,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                                gss_qop_t *qop_state);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
typedef OM_uint32 (*INDICATE_MECHS_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
                                gss_OID_set *mech_set);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
typedef OM_uint32 (*INQUIRE_NAMES_FOR_MECH_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
                                (OM_uint32 *minor_status,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   213
                                gss_const_OID mechanism,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                                gss_OID_set *name_types);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
typedef OM_uint32 (*ADD_OID_SET_MEMBER_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                                (OM_uint32 *minor_status,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   218
                                gss_const_OID member_oid,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
                                gss_OID_set *oid_set);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
typedef OM_uint32 (*DISPLAY_STATUS_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
                                OM_uint32 status_value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
                                int status_type,
55638
430a51e86f28 8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
weijun
parents: 55354
diff changeset
   225
                                gss_const_OID mech_type,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
                                OM_uint32 *message_context,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
                                gss_buffer_t status_string);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
typedef OM_uint32 (*CREATE_EMPTY_OID_SET_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
                                gss_OID_set *oid_set);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
typedef OM_uint32 (*RELEASE_OID_SET_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
                                gss_OID_set *set);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
typedef OM_uint32 (*RELEASE_BUFFER_FN_PTR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
                                (OM_uint32 *minor_status,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
                                gss_buffer_t buffer);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
/* dynamically resolved functions from gss library */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
typedef struct GSS_FUNCTION_TABLE {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    gss_OID_set                         mechs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    RELEASE_NAME_FN_PTR                 releaseName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    IMPORT_NAME_FN_PTR                  importName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
    COMPARE_NAME_FN_PTR                 compareName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
    CANONICALIZE_NAME_FN_PTR            canonicalizeName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    EXPORT_NAME_FN_PTR                  exportName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    DISPLAY_NAME_FN_PTR                 displayName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
    ACQUIRE_CRED_FN_PTR                 acquireCred;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
    RELEASE_CRED_FN_PTR                 releaseCred;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
    INQUIRE_CRED_FN_PTR                 inquireCred;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    IMPORT_SEC_CONTEXT_FN_PTR           importSecContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
    INIT_SEC_CONTEXT_FN_PTR             initSecContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
    ACCEPT_SEC_CONTEXT_FN_PTR           acceptSecContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
    INQUIRE_CONTEXT_FN_PTR              inquireContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    DELETE_SEC_CONTEXT_FN_PTR           deleteSecContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    CONTEXT_TIME_FN_PTR                 contextTime;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
    WRAP_SIZE_LIMIT_FN_PTR              wrapSizeLimit;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
    EXPORT_SEC_CONTEXT_FN_PTR           exportSecContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
    GET_MIC_FN_PTR                      getMic;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
    VERIFY_MIC_FN_PTR                   verifyMic;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    WRAP_FN_PTR                         wrap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    UNWRAP_FN_PTR                       unwrap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
    INDICATE_MECHS_FN_PTR               indicateMechs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    INQUIRE_NAMES_FOR_MECH_FN_PTR       inquireNamesForMech;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
    ADD_OID_SET_MEMBER_FN_PTR           addOidSetMember;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    DISPLAY_STATUS_FN_PTR               displayStatus;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
    CREATE_EMPTY_OID_SET_FN_PTR         createEmptyOidSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
    RELEASE_OID_SET_FN_PTR              releaseOidSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
    RELEASE_BUFFER_FN_PTR               releaseBuffer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
} GSS_FUNCTION_TABLE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
/* global GSS function table */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
GSS_FUNCTION_TABLE_PTR ftab;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
#endif