jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp
changeset 33653 c1ee09fe3274
parent 26878 57077013aeb6
child 45883 89df6f9465a3
child 45993 076a6b39a5a9
equal deleted inserted replaced
32995:a62c89adce3d 33653:c1ee09fe3274
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 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
    22  * or visit www.oracle.com if you need additional information or have any
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 #include <jni.h>
    26 #include <jni.h>
       
    27 #include "jni_util.h"
    27 #include "impl/ecc_impl.h"
    28 #include "impl/ecc_impl.h"
    28 
    29 
    29 #define ILLEGAL_STATE_EXCEPTION "java/lang/IllegalStateException"
    30 #define ILLEGAL_STATE_EXCEPTION "java/lang/IllegalStateException"
    30 #define INVALID_ALGORITHM_PARAMETER_EXCEPTION \
    31 #define INVALID_ALGORITHM_PARAMETER_EXCEPTION \
    31         "java/security/InvalidAlgorithmParameterException"
    32         "java/security/InvalidAlgorithmParameterException"
    32 #define INVALID_PARAMETER_EXCEPTION \
    33 #define INVALID_PARAMETER_EXCEPTION \
    33         "java/security/InvalidParameterException"
    34         "java/security/InvalidParameterException"
    34 #define KEY_EXCEPTION   "java/security/KeyException"
    35 #define KEY_EXCEPTION   "java/security/KeyException"
    35 
    36 
    36 extern "C" {
    37 extern "C" {
       
    38 
       
    39 /*
       
    40  * Declare library specific JNI_Onload entry if static build
       
    41  */
       
    42 DEF_STATIC_JNI_OnLoad
    37 
    43 
    38 /*
    44 /*
    39  * Throws an arbitrary Java exception.
    45  * Throws an arbitrary Java exception.
    40  */
    46  */
    41 void ThrowException(JNIEnv *env, const char *exceptionName)
    47 void ThrowException(JNIEnv *env, const char *exceptionName)