代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.11)
project(gmssljni)
add_library(gmssljni-native SHARED gmssljni.c)
target_include_directories(gmssljni-native PUBLIC ${CMAKE_SOURCE_DIR}/src/include)
target_link_libraries(gmssljni-native -L/usr/local/lib)
target_link_libraries(gmssljni-native gmssl)
set_target_properties(gmssljni-native PROPERTIES OUTPUT_NAME gmssljni)
find_package(Java REQUIRED)
include(UseJava)
include_directories(jni)
include_directories(/usr/local/include)
# javac src/main/java/org/gmssl/GmSSLJNI.java -d .
# jar cf GmSSLJNI.jar GmSSLJNI.class
add_jar(GmSSLJNI
VERSION 2.1.0-dev
ENTRY_POINT org.gmssl.GmSSLJNI
GENERATE_NATIVE_HEADERS
OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}
SOURCES src/main/java/org/gmssl/GmSSLJNI.java
src/main/java/org/gmssl/GmSSLException.java
src/main/java/org/gmssl/Random.java
src/main/java/org/gmssl/Sm3.java
src/main/java/org/gmssl/Sm3Hmac.java
src/main/java/org/gmssl/Sm3Pbkdf2.java
src/main/java/org/gmssl/Sm4.java
src/main/java/org/gmssl/Sm4Cbc.java
src/main/java/org/gmssl/Sm4Ctr.java
src/main/java/org/gmssl/Sm4Gcm.java
src/main/java/org/gmssl/Zuc.java
src/main/java/org/gmssl/Sm2Key.java
src/main/java/org/gmssl/Sm2Signature.java
src/main/java/org/gmssl/Sm2Certificate.java
src/main/java/org/gmssl/Sm9EncMasterKey.java
src/main/java/org/gmssl/Sm9EncKey.java
src/main/java/org/gmssl/Sm9SignMasterKey.java
src/main/java/org/gmssl/Sm9SignKey.java
src/main/java/org/gmssl/Sm9Signature.java
src/main/java/org/gmssl/NativeLoader.java
)
enable_testing()
set(certfile
"-----BEGIN CERTIFICATE-----\n"
"MIIBszCCAVegAwIBAgIIaeL+wBcKxnswDAYIKoEcz1UBg3UFADAuMQswCQYDVQQG\n"
"EwJDTjEOMAwGA1UECgwFTlJDQUMxDzANBgNVBAMMBlJPT1RDQTAeFw0xMjA3MTQw\n"
"MzExNTlaFw00MjA3MDcwMzExNTlaMC4xCzAJBgNVBAYTAkNOMQ4wDAYDVQQKDAVO\n"
"UkNBQzEPMA0GA1UEAwwGUk9PVENBMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAE\n"
"MPCca6pmgcchsTf2UnBeL9rtp4nw+itk1Kzrmbnqo05lUwkwlWK+4OIrtFdAqnRT\n"
"V7Q9v1htkv42TsIutzd126NdMFswHwYDVR0jBBgwFoAUTDKxl9kzG8SmBcHG5Yti\n"
"W/CXdlgwDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFEwysZfZ\n"
"MxvEpgXBxuWLYlvwl3ZYMAwGCCqBHM9VAYN1BQADSAAwRQIgG1bSLeOXp3oB8H7b\n"
"53W+CKOPl2PknmWEq/lMhtn25HkCIQDaHDgWxWFtnCrBjH16/W3Ezn7/U/Vjo5xI\n"
"pDoiVhsLwg==\n"
"-----END CERTIFICATE-----\n")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ROOTCA.pem ${certfile})
# java -cp GmSSLJNI.jar org.gmssl.GmSSLJNI
add_test(NAME main COMMAND java -cp GmSSLJNI.jar -Djava.library.path=./ org.gmssl.GmSSLJNI)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。