Skip to content

Commit

Permalink
TKSS-966: kona_jni.h is not included
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshajiang committed Dec 5, 2024
1 parent 50dbf16 commit b62fa17
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions kona-crypto/src/main/jni/kona_sm2_cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <openssl/ec.h>
#include <openssl/evp.h>

#include "kona/kona_jni.h"
#include "kona/kona_common.h"
#include "kona/kona_sm2.h"

Expand Down
1 change: 1 addition & 0 deletions kona-crypto/src/main/jni/kona_sm2_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <openssl/evp.h>

#include "kona/kona_common.h"
#include "kona/kona_sm2.h"

EVP_PKEY* load_pub_key(const uint8_t* pub_key, size_t pub_key_len) {
EVP_PKEY_CTX* key_ctx = EVP_PKEY_CTX_new_from_name(NULL, "SM2", NULL);
Expand Down
1 change: 1 addition & 0 deletions kona-crypto/src/main/jni/kona_sm2_keypair.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <openssl/ec.h>
#include <openssl/evp.h>

#include "kona/kona_jni.h"
#include "kona/kona_common.h"
#include "kona/kona_sm2.h"

Expand Down
1 change: 1 addition & 0 deletions kona-crypto/src/main/jni/kona_sm2_signature.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <openssl/ec.h>
#include <openssl/evp.h>

#include "kona/kona_jni.h"
#include "kona/kona_common.h"
#include "kona/kona_sm2.h"

Expand Down
5 changes: 1 addition & 4 deletions kona-crypto/src/main/jni/kona_sm3.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <openssl/evp.h>

#include "kona/kona_jni.h"
#include "kona/kona_common.h"

/* ***** SM3 start ***** */
int sm3_reset(EVP_MD_CTX* ctx) {
if (ctx == NULL) {
return OPENSSL_FAILURE;
Expand Down Expand Up @@ -178,9 +178,7 @@ JNIEXPORT jlong JNICALL Java_com_tencent_kona_crypto_provider_nativeImpl_NativeC

return (jlong)new_ctx;
}
/* ***** SM3 end ***** */

/* ***** SM3HMAC start ***** */
int sm3hmac_reset(EVP_MAC_CTX* ctx) {
if (!EVP_MAC_init(ctx, NULL, 0, NULL)) {
OPENSSL_print_err();
Expand Down Expand Up @@ -341,4 +339,3 @@ JNIEXPORT jlong JNICALL Java_com_tencent_kona_crypto_provider_nativeImpl_NativeC

return (jlong)new_ctx;
}
/* ***** SM3HMAC end ***** */
3 changes: 1 addition & 2 deletions kona-crypto/src/main/jni/kona_sm4.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <openssl/evp.h>

#include "kona/kona_jni.h"
#include "kona/kona_common.h"

/* ***** SM4 start ***** */
JNIEXPORT jlong JNICALL Java_com_tencent_kona_crypto_provider_nativeImpl_NativeCrypto_sm4CreateCtx
(JNIEnv* env, jobject thisObj, jboolean encrypt, jstring mode, jboolean padding, jbyteArray key, jbyteArray iv) {
if (key == NULL) {
Expand Down Expand Up @@ -230,4 +230,3 @@ JNIEXPORT jint JNICALL Java_com_tencent_kona_crypto_provider_nativeImpl_NativeCr

return result;
}
/* ***** SM4 end ***** */
Binary file modified kona-crypto/src/main/resources/libKonaCrypto-linux-aarch64.so
Binary file not shown.
Binary file modified kona-crypto/src/main/resources/libKonaCrypto-linux-x86_64.so
Binary file not shown.

0 comments on commit b62fa17

Please sign in to comment.