1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #ifndef AWS_JNI_CRT_AWS_SIGNING_H 7 #define AWS_JNI_CRT_AWS_SIGNING_H 8 9 #include <aws/common/byte_buf.h> 10 #include <jni.h> 11 12 struct aws_signing_config_aws; 13 14 struct aws_signing_config_data { 15 JavaVM *jvm; 16 struct aws_string *region; 17 struct aws_string *service; 18 struct aws_string *signed_body_value; 19 20 jobject java_sign_header_predicate; 21 struct aws_credentials *credentials; 22 jobject java_credentials_provider; 23 }; 24 25 /* Initialize the native `config` from Java Object and Keep the required data around with `config_data`. You need to 26 * clean up the `config_data` after the signing config is not used anymore */ 27 int aws_build_signing_config( 28 JNIEnv *env, 29 jobject java_config, 30 struct aws_signing_config_data *config_data, 31 struct aws_signing_config_aws *config); 32 33 void aws_signing_config_data_clean_up(struct aws_signing_config_data *data, JNIEnv *env); 34 35 #endif /* AWS_JNI_CRT_AWS_SIGNING_H */ 36