jdk/src/share/native/sun/security/jgss/wrapper/NativeUtil.h
author michaelm
Thu, 06 Feb 2014 22:12:09 +0000
changeset 22940 56b3ab8ec81c
parent 5506 202f599c92aa
child 23585 e4412d1b53d3
permissions -rw-r--r--
8031588: warnings from b03 for jdk/src/share/native/sun/security/jgss/wrapper: JNI exception pending Reviewed-by: chegar, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2005, 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
#include <jni.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#include <stdlib.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#include <string.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#include "gssapi.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#ifndef _Included_NATIVE_Util
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#define _Included_NATIVE_Util
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#ifdef __cplusplus
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
extern "C" {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
  extern jint getJavaTime(OM_uint32);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
  extern OM_uint32 getGSSTime(jint);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  extern void checkStatus(JNIEnv *, jobject, OM_uint32, OM_uint32, char*);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
  extern jint checkTime(OM_uint32);
22940
56b3ab8ec81c 8031588: warnings from b03 for jdk/src/share/native/sun/security/jgss/wrapper: JNI exception pending
michaelm
parents: 5506
diff changeset
    40
  extern jint initGSSBuffer(JNIEnv *, jbyteArray, gss_buffer_t);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
  extern void resetGSSBuffer(JNIEnv *, jbyteArray, gss_buffer_t);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  extern gss_OID newGSSOID(JNIEnv *, jobject);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  extern void deleteGSSOID(gss_OID);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  extern gss_OID_set newGSSOIDSet(JNIEnv *, gss_OID);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
  extern void deleteGSSOIDSet(gss_OID_set);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
  extern jbyteArray getJavaBuffer(JNIEnv *, gss_buffer_t);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
  extern jstring getJavaString(JNIEnv *, gss_buffer_t);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  extern jobject getJavaOID(JNIEnv *, gss_OID);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  extern jobjectArray getJavaOIDArray(JNIEnv *, gss_OID_set);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
  extern jstring getMinorMessage(JNIEnv *, jobject, OM_uint32);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
  extern void debug(JNIEnv *, char *);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
  extern int sameMech(JNIEnv *, gss_OID, gss_OID);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
  JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *, void *);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *, void *);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  extern char debugBuf[];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
  extern jclass CLS_Object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
  extern jclass CLS_GSSNameElement;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
  extern jclass CLS_GSSCredElement;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
  extern jclass CLS_NativeGSSContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
  extern jmethodID MID_MessageProp_getPrivacy;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
  extern jmethodID MID_MessageProp_getQOP;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
  extern jmethodID MID_MessageProp_setPrivacy;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
  extern jmethodID MID_MessageProp_setQOP;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
  extern jmethodID MID_MessageProp_setSupplementaryStates;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
  extern jmethodID MID_ChannelBinding_getInitiatorAddr;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
  extern jmethodID MID_ChannelBinding_getAcceptorAddr;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
  extern jmethodID MID_ChannelBinding_getAppData;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  extern jmethodID MID_InetAddress_getAddr;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
  extern jmethodID MID_GSSNameElement_ctor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
  extern jmethodID MID_GSSCredElement_ctor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
  extern jmethodID MID_NativeGSSContext_ctor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
  extern jfieldID FID_GSSLibStub_pMech;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
  extern jfieldID FID_NativeGSSContext_pContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  extern jfieldID FID_NativeGSSContext_srcName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
  extern jfieldID FID_NativeGSSContext_targetName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
  extern jfieldID FID_NativeGSSContext_isInitiator;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
  extern jfieldID FID_NativeGSSContext_isEstablished;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
  extern jfieldID FID_NativeGSSContext_delegatedCred;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  extern jfieldID FID_NativeGSSContext_flags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
  extern jfieldID FID_NativeGSSContext_lifetime;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
  extern jfieldID FID_NativeGSSContext_actualMech;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
#ifdef __cplusplus
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
#endif