Skip to content

Commit 599bb77

Browse files
author
Alexey Bakhtin
committed
8225687: Newly added sspi.cpp in JDK-6722928 still contains some small errors
Reviewed-by: andrew Backport-of: e03c2a270b291e7b1edcf4df491d6d386a882a87
1 parent 3232400 commit 599bb77

File tree

3 files changed

+126
-85
lines changed

3 files changed

+126
-85
lines changed

jdk/src/share/native/sun/security/jgss/wrapper/NativeFunc.h

+18-18
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ typedef OM_uint32 (*RELEASE_NAME_FN_PTR)
5757

5858
typedef OM_uint32 (*IMPORT_NAME_FN_PTR)
5959
(OM_uint32 *minor_status,
60-
const gss_buffer_t input_name_buffer,
61-
const gss_OID input_name_type,
60+
gss_const_buffer_t input_name_buffer,
61+
gss_const_OID input_name_type,
6262
gss_name_t *output_name);
6363

6464
typedef OM_uint32 (*COMPARE_NAME_FN_PTR)
@@ -70,7 +70,7 @@ typedef OM_uint32 (*COMPARE_NAME_FN_PTR)
7070
typedef OM_uint32 (*CANONICALIZE_NAME_FN_PTR)
7171
(OM_uint32 *minor_status,
7272
gss_const_name_t input_name,
73-
const gss_OID mech_type,
73+
gss_const_OID mech_type,
7474
gss_name_t *output_name);
7575

7676
typedef OM_uint32 (*EXPORT_NAME_FN_PTR)
@@ -88,7 +88,7 @@ typedef OM_uint32 (*ACQUIRE_CRED_FN_PTR)
8888
(OM_uint32 *minor_status,
8989
gss_const_name_t desired_name,
9090
OM_uint32 time_req,
91-
const gss_OID_set desired_mech,
91+
gss_const_OID_set desired_mech,
9292
gss_cred_usage_t cred_usage,
9393
gss_cred_id_t *output_cred_handle,
9494
gss_OID_set *actual_mechs,
@@ -108,19 +108,19 @@ typedef OM_uint32 (*INQUIRE_CRED_FN_PTR)
108108

109109
typedef OM_uint32 (*IMPORT_SEC_CONTEXT_FN_PTR)
110110
(OM_uint32 *minor_status,
111-
const gss_buffer_t interprocess_token,
111+
gss_const_buffer_t interprocess_token,
112112
gss_ctx_id_t *context_handle);
113113

114114
typedef OM_uint32 (*INIT_SEC_CONTEXT_FN_PTR)
115115
(OM_uint32 *minor_status,
116116
gss_const_cred_id_t initiator_cred_handle,
117117
gss_ctx_id_t *context_handle,
118118
gss_const_name_t target_name,
119-
const gss_OID mech_type,
119+
gss_const_OID mech_type,
120120
OM_uint32 req_flags,
121121
OM_uint32 time_req,
122-
const gss_channel_bindings_t input_chan_bindings,
123-
const gss_buffer_t input_token,
122+
gss_const_channel_bindings_t input_chan_bindings,
123+
gss_const_buffer_t input_token,
124124
gss_OID *actual_mech_type,
125125
gss_buffer_t output_token,
126126
OM_uint32 *ret_flags,
@@ -130,8 +130,8 @@ typedef OM_uint32 (*ACCEPT_SEC_CONTEXT_FN_PTR)
130130
(OM_uint32 *minor_status,
131131
gss_ctx_id_t *context_handle,
132132
gss_const_cred_id_t acceptor_cred_handle,
133-
const gss_buffer_t input_token,
134-
const gss_channel_bindings_t input_chan_bindings,
133+
gss_const_buffer_t input_token,
134+
gss_const_channel_bindings_t input_chan_bindings,
135135
gss_name_t *src_name,
136136
gss_OID *mech_type,
137137
gss_buffer_t output_token,
@@ -177,29 +177,29 @@ typedef OM_uint32 (*GET_MIC_FN_PTR)
177177
(OM_uint32 *minor_status,
178178
gss_const_ctx_id_t context_handle,
179179
gss_qop_t qop_req,
180-
const gss_buffer_t message_buffer,
180+
gss_const_buffer_t message_buffer,
181181
gss_buffer_t msg_token);
182182

183183
typedef OM_uint32 (*VERIFY_MIC_FN_PTR)
184184
(OM_uint32 *minor_status,
185185
gss_const_ctx_id_t context_handle,
186-
const gss_buffer_t message_buffer,
187-
const gss_buffer_t token_buffer,
186+
gss_const_buffer_t message_buffer,
187+
gss_const_buffer_t token_buffer,
188188
gss_qop_t *qop_state);
189189

190190
typedef OM_uint32 (*WRAP_FN_PTR)
191191
(OM_uint32 *minor_status,
192192
gss_const_ctx_id_t context_handle,
193193
int conf_req_flag,
194194
gss_qop_t qop_req,
195-
const gss_buffer_t input_message_buffer,
195+
gss_const_buffer_t input_message_buffer,
196196
int *conf_state,
197197
gss_buffer_t output_message_buffer);
198198

199199
typedef OM_uint32 (*UNWRAP_FN_PTR)
200200
(OM_uint32 *minor_status,
201201
gss_const_ctx_id_t context_handle,
202-
const gss_buffer_t input_message_buffer,
202+
gss_const_buffer_t input_message_buffer,
203203
gss_buffer_t output_message_buffer,
204204
int *conf_state,
205205
gss_qop_t *qop_state);
@@ -210,19 +210,19 @@ typedef OM_uint32 (*INDICATE_MECHS_FN_PTR)
210210

211211
typedef OM_uint32 (*INQUIRE_NAMES_FOR_MECH_FN_PTR)
212212
(OM_uint32 *minor_status,
213-
const gss_OID mechanism,
213+
gss_const_OID mechanism,
214214
gss_OID_set *name_types);
215215

216216
typedef OM_uint32 (*ADD_OID_SET_MEMBER_FN_PTR)
217217
(OM_uint32 *minor_status,
218-
const gss_OID member_oid,
218+
gss_const_OID member_oid,
219219
gss_OID_set *oid_set);
220220

221221
typedef OM_uint32 (*DISPLAY_STATUS_FN_PTR)
222222
(OM_uint32 *minor_status,
223223
OM_uint32 status_value,
224224
int status_type,
225-
const gss_OID mech_type,
225+
gss_const_OID mech_type,
226226
OM_uint32 *message_context,
227227
gss_buffer_t status_string);
228228

jdk/src/share/native/sun/security/jgss/wrapper/gssapi.h

+24-24
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ GSS_DLLIMP OM_uint32 gss_acquire_cred(
404404
OM_uint32 *, /* minor_status */
405405
gss_const_name_t, /* desired_name */
406406
OM_uint32, /* time_req */
407-
const gss_OID_set, /* desired_mechs */
407+
gss_const_OID_set, /* desired_mechs */
408408
gss_cred_usage_t, /* cred_usage */
409409
gss_cred_id_t *, /* output_cred_handle */
410410
gss_OID_set *, /* actual_mechs */
@@ -421,11 +421,11 @@ GSS_DLLIMP OM_uint32 gss_init_sec_context(
421421
gss_const_cred_id_t, /* claimant_cred_handle */
422422
gss_ctx_id_t *, /* context_handle */
423423
gss_const_name_t, /* target_name */
424-
const gss_OID, /* mech_type */
424+
gss_const_OID, /* mech_type */
425425
OM_uint32, /* req_flags */
426426
OM_uint32, /* time_req */
427-
const gss_channel_bindings_t, /* input_chan_bindings */
428-
const gss_buffer_t, /* input_token */
427+
gss_const_channel_bindings_t, /* input_chan_bindings */
428+
gss_const_buffer_t, /* input_token */
429429
gss_OID *, /* actual_mech_type */
430430
gss_buffer_t, /* output_token */
431431
OM_uint32 *, /* ret_flags */
@@ -436,8 +436,8 @@ GSS_DLLIMP OM_uint32 gss_accept_sec_context(
436436
OM_uint32 *, /* minor_status */
437437
gss_ctx_id_t *, /* context_handle */
438438
gss_const_cred_id_t, /* acceptor_cred_handle */
439-
const gss_buffer_t, /* input_token_buffer */
440-
const gss_channel_bindings_t, /* input_chan_bindings */
439+
gss_const_buffer_t, /* input_token_buffer */
440+
gss_const_channel_bindings_t, /* input_chan_bindings */
441441
gss_name_t *, /* src_name */
442442
gss_OID *, /* mech_type */
443443
gss_buffer_t, /* output_token */
@@ -449,7 +449,7 @@ GSS_DLLIMP OM_uint32 gss_accept_sec_context(
449449
GSS_DLLIMP OM_uint32 gss_process_context_token(
450450
OM_uint32 *, /* minor_status */
451451
gss_const_ctx_id_t, /* context_handle */
452-
const gss_buffer_t /* token_buffer */
452+
gss_const_buffer_t /* token_buffer */
453453
);
454454

455455
GSS_DLLIMP OM_uint32 gss_delete_sec_context(
@@ -469,16 +469,16 @@ GSS_DLLIMP OM_uint32 gss_get_mic(
469469
OM_uint32 *, /* minor_status */
470470
gss_const_ctx_id_t, /* context_handle */
471471
gss_qop_t, /* qop_req */
472-
const gss_buffer_t, /* message_buffer */
472+
gss_const_buffer_t, /* message_buffer */
473473
gss_buffer_t /* message_token */
474474
);
475475

476476
/* New for V2 */
477477
GSS_DLLIMP OM_uint32 gss_verify_mic(
478478
OM_uint32 *, /* minor_status */
479479
gss_const_ctx_id_t, /* context_handle */
480-
const gss_buffer_t, /* message_buffer */
481-
const gss_buffer_t, /* message_token */
480+
gss_const_buffer_t, /* message_buffer */
481+
gss_const_buffer_t, /* message_token */
482482
gss_qop_t * /* qop_state */
483483
);
484484

@@ -488,7 +488,7 @@ GSS_DLLIMP OM_uint32 gss_wrap(
488488
gss_const_ctx_id_t, /* context_handle */
489489
int, /* conf_req_flag */
490490
gss_qop_t, /* qop_req */
491-
const gss_buffer_t, /* input_message_buffer */
491+
gss_const_buffer_t, /* input_message_buffer */
492492
int *, /* conf_state */
493493
gss_buffer_t /* output_message_buffer */
494494
);
@@ -497,7 +497,7 @@ GSS_DLLIMP OM_uint32 gss_wrap(
497497
GSS_DLLIMP OM_uint32 gss_unwrap(
498498
OM_uint32 *, /* minor_status */
499499
gss_const_ctx_id_t, /* context_handle */
500-
const gss_buffer_t, /* input_message_buffer */
500+
gss_const_buffer_t, /* input_message_buffer */
501501
gss_buffer_t, /* output_message_buffer */
502502
int *, /* conf_state */
503503
gss_qop_t * /* qop_state */
@@ -507,7 +507,7 @@ GSS_DLLIMP OM_uint32 gss_display_status(
507507
OM_uint32 *, /* minor_status */
508508
OM_uint32, /* status_value */
509509
int, /* status_type */
510-
const gss_OID, /* mech_type (used to be const) */
510+
gss_const_OID, /* mech_type (used to be const) */
511511
OM_uint32 *, /* message_context */
512512
gss_buffer_t /* status_string */
513513
);
@@ -533,8 +533,8 @@ GSS_DLLIMP OM_uint32 gss_display_name(
533533

534534
GSS_DLLIMP OM_uint32 gss_import_name(
535535
OM_uint32 *, /* minor_status */
536-
const gss_buffer_t, /* input_name_buffer */
537-
const gss_OID, /* input_name_type(used to be const) */
536+
gss_const_buffer_t, /* input_name_buffer */
537+
gss_const_OID, /* input_name_type(used to be const) */
538538
gss_name_t * /* output_name */
539539
);
540540

@@ -590,7 +590,7 @@ GSS_DLLIMP OM_uint32 gss_add_cred(
590590
OM_uint32 *, /* minor_status */
591591
gss_const_cred_id_t, /* input_cred_handle */
592592
gss_const_name_t, /* desired_name */
593-
const gss_OID, /* desired_mech */
593+
gss_const_OID, /* desired_mech */
594594
gss_cred_usage_t, /* cred_usage */
595595
OM_uint32, /* initiator_time_req */
596596
OM_uint32, /* acceptor_time_req */
@@ -604,7 +604,7 @@ GSS_DLLIMP OM_uint32 gss_add_cred(
604604
GSS_DLLIMP OM_uint32 gss_inquire_cred_by_mech(
605605
OM_uint32 *, /* minor_status */
606606
gss_const_cred_id_t, /* cred_handle */
607-
const gss_OID, /* mech_type */
607+
gss_const_OID, /* mech_type */
608608
gss_name_t *, /* name */
609609
OM_uint32 *, /* initiator_lifetime */
610610
OM_uint32 *, /* acceptor_lifetime */
@@ -621,7 +621,7 @@ GSS_DLLIMP OM_uint32 gss_export_sec_context(
621621
/* New for V2 */
622622
GSS_DLLIMP OM_uint32 gss_import_sec_context(
623623
OM_uint32 *, /* minor_status */
624-
const gss_buffer_t, /* interprocess_token */
624+
gss_const_buffer_t, /* interprocess_token */
625625
gss_ctx_id_t * /* context_handle */
626626
);
627627

@@ -640,22 +640,22 @@ GSS_DLLIMP OM_uint32 gss_create_empty_oid_set(
640640
/* New for V2 */
641641
GSS_DLLIMP OM_uint32 gss_add_oid_set_member(
642642
OM_uint32 *, /* minor_status */
643-
const gss_OID, /* member_oid */
643+
gss_const_OID, /* member_oid */
644644
gss_OID_set * /* oid_set */
645645
);
646646

647647
/* New for V2 */
648648
GSS_DLLIMP OM_uint32 gss_test_oid_set_member(
649649
OM_uint32 *, /* minor_status */
650-
const gss_OID, /* member */
651-
const gss_OID_set, /* set */
650+
gss_const_OID, /* member */
651+
gss_const_OID_set, /* set */
652652
int * /* present */
653653
);
654654

655655
/* New for V2 */
656656
GSS_DLLIMP OM_uint32 gss_str_to_oid(
657657
OM_uint32 *, /* minor_status */
658-
const gss_buffer_t, /* oid_str */
658+
gss_const_buffer_t, /* oid_str */
659659
gss_OID * /* oid */
660660
);
661661

@@ -669,7 +669,7 @@ GSS_DLLIMP OM_uint32 gss_oid_to_str(
669669
/* New for V2 */
670670
GSS_DLLIMP OM_uint32 gss_inquire_names_for_mech(
671671
OM_uint32 *, /* minor_status */
672-
const gss_OID, /* mechanism */
672+
gss_const_OID, /* mechanism */
673673
gss_OID_set * /* name_types */
674674
);
675675

@@ -691,7 +691,7 @@ GSS_DLLIMP OM_uint32 gss_duplicate_name(
691691
GSS_DLLIMP OM_uint32 gss_canonicalize_name(
692692
OM_uint32 *, /* minor_status */
693693
gss_const_name_t, /* input_name */
694-
const gss_OID, /* mech_type */
694+
gss_const_OID, /* mech_type */
695695
gss_name_t * /* output_name */
696696
);
697697

0 commit comments

Comments
 (0)