js: properly reject pgp message without signature
-- * A verify at gpgme-json does not fail if there is a valid pgp message that does not include a signature. Instead, the answer will be devoid of signatures. In javascript, the SIG_NO_SIG error should be reported here, but wasn't.
This commit is contained in:
parent
1919fa41b6
commit
10f2106404
@ -254,7 +254,7 @@ export class GpgME {
|
||||
}
|
||||
return new Promise(function(resolve, reject){
|
||||
msg.post().then(function (message){
|
||||
if (!message.info.signatures){
|
||||
if (!message.info || !message.info.signatures){
|
||||
reject(gpgme_error('SIG_NO_SIGS'));
|
||||
} else {
|
||||
let _result = collectSignatures(message.info.signatures);
|
||||
|
Loading…
Reference in New Issue
Block a user