equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
26 #import "sun_security_krb5_Credentials.h" |
26 #import "sun_security_krb5_Credentials.h" |
27 #import <Kerberos/Kerberos.h> |
27 #import <Kerberos/Kerberos.h> |
28 #import <string.h> |
28 #import <string.h> |
29 #import <time.h> |
29 #import <time.h> |
30 |
30 |
|
31 #include "jni_util.h" |
|
32 |
31 /* |
33 /* |
32 * Based largely on klist.c, |
34 * Based largely on klist.c, |
33 * |
35 * |
34 * Created by Scott Kovatch on 8/12/04. |
36 * Created by Scott Kovatch on 8/12/04. |
35 * |
37 * |
90 } |
92 } |
91 /* |
93 /* |
92 * Class: sun_security_krb5_KrbCreds |
94 * Class: sun_security_krb5_KrbCreds |
93 * Method: JNI_OnLoad |
95 * Method: JNI_OnLoad |
94 */ |
96 */ |
95 JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) |
97 JNIEXPORT jint JNICALL DEF_JNI_OnLoad(JavaVM *jvm, void *reserved) |
96 { |
98 { |
97 JNIEnv *env; |
99 JNIEnv *env; |
98 |
100 |
99 if ((*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_4)) { |
101 if ((*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_4)) { |
100 return JNI_EVERSION; /* JNI version not supported */ |
102 return JNI_EVERSION; /* JNI version not supported */ |
189 |
191 |
190 /* |
192 /* |
191 * Class: sun_security_jgss_KrbCreds |
193 * Class: sun_security_jgss_KrbCreds |
192 * Method: JNI_OnUnload |
194 * Method: JNI_OnUnload |
193 */ |
195 */ |
194 JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *jvm, void *reserved) |
196 JNIEXPORT void JNICALL DEF_JNI_OnUnload(JavaVM *jvm, void *reserved) |
195 { |
197 { |
196 JNIEnv *env; |
198 JNIEnv *env; |
197 |
199 |
198 if ((*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2)) { |
200 if ((*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2)) { |
199 return; /* Nothing else we can do */ |
201 return; /* Nothing else we can do */ |