summaryrefslogtreecommitdiff
path: root/email-api/email-api-smime.c
diff options
context:
space:
mode:
Diffstat (limited to 'email-api/email-api-smime.c')
-rwxr-xr-xemail-api/email-api-smime.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/email-api/email-api-smime.c b/email-api/email-api-smime.c
index 40b9fcf..07c8d18 100755
--- a/email-api/email-api-smime.c
+++ b/email-api/email-api-smime.c
@@ -137,13 +137,10 @@ EXPORT_API int email_get_decrypt_message(int mail_id, email_mail_data_t **output
}
if (p_output_mail_data->smime_type == EMAIL_SMIME_ENCRYPTED || p_output_mail_data->smime_type == EMAIL_SMIME_SIGNED_AND_ENCRYPTED) {
- emcore_init_openssl_library();
if (!emcore_smime_get_decrypt_message(p_output_attachment_data[i].attachment_path, p_account_tbl->certificate_path, &decrypt_filepath, &err)) {
EM_DEBUG_EXCEPTION("emcore_smime_get_decrypt_message failed");
- emcore_clean_openssl_library();
goto FINISH_OFF;
}
- emcore_clean_openssl_library();
} else if (p_output_mail_data->smime_type == EMAIL_PGP_ENCRYPTED) {
if ((err = emcore_pgp_get_decrypted_message(p_output_attachment_data[i].attachment_path, p_output_mail_data->pgp_password, false, &decrypt_filepath, verify)) != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("emcore_pgp_get_decrypted_message failed : [%d]", err);
@@ -250,13 +247,10 @@ EXPORT_API int email_get_decrypt_message_ex(email_mail_data_t *input_mail_data,
}
if (input_mail_data->smime_type == EMAIL_SMIME_ENCRYPTED || input_mail_data->smime_type == EMAIL_SMIME_SIGNED_AND_ENCRYPTED) {
- emcore_init_openssl_library();
if (!emcore_smime_get_decrypt_message(input_attachment_data[i].attachment_path, p_account_tbl->certificate_path, &decrypt_filepath, &err)) {
EM_DEBUG_EXCEPTION("emcore_smime_get_decrypt_message failed");
- emcore_clean_openssl_library();
goto FINISH_OFF;
}
- emcore_clean_openssl_library();
} else if (input_mail_data->smime_type == EMAIL_PGP_ENCRYPTED) {
if ((err = emcore_pgp_get_decrypted_message(input_attachment_data[i].attachment_path, input_mail_data->pgp_password, false, &decrypt_filepath, verify)) != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("emcore_pgp_get_decrypted_message failed : [%d]", err);
@@ -380,11 +374,9 @@ EXPORT_API int email_verify_signature_ex(email_mail_data_t *input_mail_data, ema
}
if (input_mail_data->smime_type == EMAIL_SMIME_SIGNED) {
- emcore_init_openssl_library();
if (!emcore_verify_signature(input_attachment_data[count].attachment_path, input_mail_data->file_path_mime_entity, verify, &err))
EM_DEBUG_EXCEPTION("emcore_verify_signature failed : [%d]", err);
- emcore_clean_openssl_library();
} else if (input_mail_data->smime_type == EMAIL_PGP_SIGNED) {
if ((err = emcore_pgp_get_verify_signature(input_attachment_data[count].attachment_path, input_mail_data->file_path_mime_entity, input_mail_data->digest_type, verify)) != EMAIL_ERROR_NONE)
EM_DEBUG_EXCEPTION("emcore_pgp_get_verify_siganture failed : [%d]", err);