MCPcopy Create free account
hub / github.com/cconlon/kerberos-java-gssapi / display_status

Method display_status

examples/Util.java:73–101  ·  view source on GitHub ↗
(long[] min_stat, long maj_stat)

Source from the content-addressed store, hash-verified

71 * Display status using minor and major status codes
72 */
73 public static void display_status(long[] min_stat, long maj_stat)
74 {
75 long[] msg_ctx = {0};
76 long ret = 0;
77 gss_buffer_desc storage_buffer = new gss_buffer_desc();
78
79 // Print GSS major status code error
80 ret = gsswrapper.gss_display_status_wrap(min_stat[0], maj_stat,
81 GSS_C_GSS_CODE,
82 GSS_C_NO_OID,
83 msg_ctx, storage_buffer);
84 if (ret != GSS_S_COMPLETE) {
85 System.out.println("gss_display_status failed");
86 System.exit(1);
87 }
88 System.out.println("Error message (major): "
89 + storage_buffer.getValue());
90
91 // Print mechanism minor status code error
92 ret = gsswrapper.gss_display_status_wrap(maj_stat, min_stat[0],
93 GSS_C_MECH_CODE,
94 GSS_C_NO_OID, msg_ctx, storage_buffer);
95 if (ret != GSS_S_COMPLETE) {
96 System.out.println("gss_display_status failed");
97 System.exit(1);
98 }
99 System.out.println("Error message (minor): "
100 + storage_buffer.getValue());
101 }
102
103 /*
104 * Write a token byte[] to OutputStream.

Callers 2

errorExitMethod · 0.95
displayErrorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected