Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions library/common/jni/jni_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,8 @@ static jobject call_jvm_verify_x509_cert_chain(JNIEnv* env,
return result;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function"
// `auth_type` and `host` are expected to be UTF-8 encoded.
static void jvm_verify_x509_cert_chain(const std::vector<std::string>& cert_chain,
std::string auth_type, std::string host,
Expand All @@ -1202,6 +1204,7 @@ static void jvm_verify_x509_cert_chain(const std::vector<std::string>& cert_chai
ExtractCertVerifyResult(get_env(), result, status, is_issued_by_known_root, verified_chain);
env->DeleteLocalRef(result);
}
#pragma clang diagnostic pop

static void jvm_add_test_root_certificate(const uint8_t* cert, size_t len) {
jni_log("[Envoy]", "jvm_add_test_root_certificate");
Expand Down
4 changes: 2 additions & 2 deletions library/common/jni/jni_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ JNIEnv* get_env() {
jint result = static_jvm->GetEnv(reinterpret_cast<void**>(&local_env), JNI_VERSION);
if (result == JNI_EDETACHED) {
// Note: the only thread that should need to be attached is Envoy's engine std::thread.
static char* thread_name = "EnvoyMain";
JavaVMAttachArgs args = {JNI_VERSION, thread_name, nullptr};
static const char* thread_name = "EnvoyMain";
JavaVMAttachArgs args = {JNI_VERSION, const_cast<char*>(thread_name), nullptr};
result = attach_jvm(static_jvm, &local_env, &args);
}
RELEASE_ASSERT(result == JNI_OK, "Unable to get a JVM env for the current thread");
Expand Down