diff --git a/src/codegen/gen_cpp_Engine.ysl2 b/src/codegen/gen_cpp_Engine.ysl2 index d316923..c1da7d6 100644 --- a/src/codegen/gen_cpp_Engine.ysl2 +++ b/src/codegen/gen_cpp_Engine.ysl2 @@ -13,7 +13,7 @@ tstylesheet { template "interface" document("../cxx/foundation_pEp_jniadapter_{@name}.cc", "text") || #include - #include + #include #include #include #include diff --git a/src/codegen/pEp.yml2 b/src/codegen/pEp.yml2 index 7ec2584..9ba1474 100644 --- a/src/codegen/pEp.yml2 +++ b/src/codegen/pEp.yml2 @@ -149,10 +149,6 @@ namespace pEp { returns Rating rating ); - method cached=true blacklist_retrieve( - returns stringlist blacklist - ); - // TODO: WTF is... method cached=true own_message_private_key_details( in message msg, @@ -264,9 +260,6 @@ namespace pEp { basic void trustPersonalKey(identity ident); basic void trustOwnKey(identity ident); basic identitylist importKey(bytearray key); - basic void blacklist_add(string fpr); - basic void blacklist_delete(string fpr); - basic bool blacklist_is_listed(string fpr); basic void config_passive_mode(bool enable); basic void config_unencrypted_subject(bool enable); basic string getCrashdumpLog(int maxlines); diff --git a/src/cxx/basic_api.cc b/src/cxx/basic_api.cc index 4f9960c..543cc0a 100644 --- a/src/cxx/basic_api.cc +++ b/src/cxx/basic_api.cc @@ -1,5 +1,4 @@ #include -#include #include #include @@ -340,88 +339,7 @@ JNIEXPORT void JNICALL Java_foundation_pEp_jniadapter_Engine__1config_1unencrypt ::config_unencrypted_subject(session(), static_cast(enable)); } -JNIEXPORT void JNICALL Java_foundation_pEp_jniadapter_Engine__1blacklist_1add(JNIEnv *env, - jobject obj, - jbyteArray fpr - ) -{ - std::mutex *mutex_local = nullptr; - { - std::lock_guard l(global_mutex); - pEpLog("called with lock_guard"); - mutex_local = get_engine_java_object_mutex(env, obj); - } - std::lock_guard l(*mutex_local); - - const char *_fpr = to_string(env, fpr); - - if(_fpr == NULL){ - throw_pEp_Exception(env, PEP_OUT_OF_MEMORY); - return; - } - - PEP_STATUS status = passphraseWrap(::blacklist_add, session(), _fpr); - if (status != PEP_STATUS_OK) { - throw_pEp_Exception(env, status); - return; - } -} - -JNIEXPORT void JNICALL Java_foundation_pEp_jniadapter_Engine__1blacklist_1delete(JNIEnv *env, - jobject obj, - jbyteArray fpr) -{ - std::mutex *mutex_local = nullptr; - { - std::lock_guard l(global_mutex); - pEpLog("called with lock_guard"); - mutex_local = get_engine_java_object_mutex(env, obj); - } - std::lock_guard l(*mutex_local); - - const char *_fpr = to_string(env, fpr); - - if(_fpr == NULL){ - throw_pEp_Exception(env, PEP_OUT_OF_MEMORY); - return; - } - PEP_STATUS status = passphraseWrap(::blacklist_delete, session(), _fpr); - if (status != PEP_STATUS_OK) { - throw_pEp_Exception(env, status); - return; - } - -} - -JNIEXPORT jboolean JNICALL Java_foundation_pEp_jniadapter_Engine__1blacklist_1is_1listed(JNIEnv *env, - jobject obj, - jbyteArray fpr) -{ - std::mutex *mutex_local = nullptr; - { - std::lock_guard l(global_mutex); - pEpLog("called with lock_guard"); - mutex_local = get_engine_java_object_mutex(env, obj); - } - std::lock_guard l(*mutex_local); - - const char *_fpr = to_string(env, fpr); - bool _listed = 0; - - if(_fpr == NULL){ - throw_pEp_Exception(env, PEP_OUT_OF_MEMORY); - return 0; - } - - PEP_STATUS status = passphraseWrap(::blacklist_is_listed, session(), _fpr, &_listed); - if (status != PEP_STATUS_OK) { - throw_pEp_Exception(env, status); - return 0; - } - - return (jboolean)_listed; -} JNIEXPORT jbyteArray JNICALL Java_foundation_pEp_jniadapter_Engine__1getCrashdumpLog(JNIEnv *env, jobject obj,