i18n(mail): improve generic error message for signed/encrypted messages

Fixes #5204
pull/290/head
Francis Lachapelle 2020-11-26 16:37:13 -05:00
parent 0d81195ab3
commit e2e5e6fed9
3 changed files with 7 additions and 7 deletions

View File

@ -175,15 +175,15 @@
ERR_load_crypto_strings(); ERR_load_crypto_strings();
SSL_load_error_strings(); SSL_load_error_strings();
sslError = ERR_reason_error_string(err); sslError = ERR_reason_error_string(err);
validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"No error information available"]] retain]; validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"Digital signature is not valid"]] retain];
#elif OPENSSL_VERSION_NUMBER < 0x10100000L #elif OPENSSL_VERSION_NUMBER < 0x10100000L
const char* sslError; const char* sslError;
ERR_load_crypto_strings(); ERR_load_crypto_strings();
SSL_load_error_strings(); SSL_load_error_strings();
sslError = ERR_reason_error_string(err); sslError = ERR_reason_error_string(err);
validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"No error information available"]] retain]; validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"Digital signature is not valid"]] retain];
#else #else
validationMessage = [[self labelForKey: @"No error information available"] retain]; validationMessage = [[self labelForKey: @"Digital signature is not valid"] retain];
#endif /* HAVE_GNUTLS */ #endif /* HAVE_GNUTLS */
BUF_MEM *bptr; //DEL BUF_MEM *bptr; //DEL

View File

@ -173,15 +173,15 @@
ERR_load_crypto_strings(); ERR_load_crypto_strings();
SSL_load_error_strings(); SSL_load_error_strings();
sslError = ERR_reason_error_string(err); sslError = ERR_reason_error_string(err);
validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"No error information available"]] retain]; validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"Digital signature is not valid"]] retain];
#elif OPENSSL_VERSION_NUMBER < 0x10100000L #elif OPENSSL_VERSION_NUMBER < 0x10100000L
const char* sslError; const char* sslError;
ERR_load_crypto_strings(); ERR_load_crypto_strings();
SSL_load_error_strings(); SSL_load_error_strings();
sslError = ERR_reason_error_string(err); sslError = ERR_reason_error_string(err);
validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"No error information available"]] retain]; validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : @"Digital signature is not valid"]] retain];
#else #else
validationMessage = [[self labelForKey: @"No error information available"] retain]; validationMessage = [[self labelForKey: @"Digital signature is not valid"] retain];
#endif /* HAVE_GNUTLS */ #endif /* HAVE_GNUTLS */
} }
} }

View File

@ -276,7 +276,7 @@
"Message is signed" = "Message is signed"; "Message is signed" = "Message is signed";
/* Unknown error while validating message signature */ /* Unknown error while validating message signature */
"No error information available" = "No error information available"; "Digital signature is not valid" = "Digital signature is not valid";
"This Folder" = "This Folder"; "This Folder" = "This Folder";