|
Lines 313-320
Link Here
|
| 313 |
index2 = error.find("using", index+15); |
313 |
index2 = error.find("using", index+15); |
| 314 |
block.setSignatureDate( error.mid(index+15, index2-(index+15)-1) ); |
314 |
block.setSignatureDate( error.mid(index+15, index2-(index+15)-1) ); |
| 315 |
kdDebug(5100) << "Message was signed on '" << block.signatureDate() << "'\n"; |
315 |
kdDebug(5100) << "Message was signed on '" << block.signatureDate() << "'\n"; |
|
|
316 |
// To handle gnupg > 2.1 |
| 317 |
// gpg: Signature made Thu 05 Apr 2018 10:02:50 PM CEST |
| 318 |
// gpg: using DSA key A0CF1DC09533E5E87F54DB40F1EEB8CD9FB16A50 |
| 319 |
// gpg: Good signature from "deloptes <deloptes@gmail.com>" [ultimate] |
| 320 |
// so we need extra check |
| 321 |
if (error.contains("key ID") > 0) { |
| 316 |
index2 = error.find("key ID ", index2) + 7; |
322 |
index2 = error.find("key ID ", index2) + 7; |
| 317 |
block.setSignatureKeyId( error.mid(index2,8) ); |
323 |
block.setSignatureKeyId( error.mid(index2,8) ); |
|
|
324 |
} |
| 325 |
else { |
| 326 |
index2 = error.find("key ", index2) + 4; |
| 327 |
// handle variable key size |
| 328 |
// gpg: Signature made Mon 02 Apr 2018 03:15:08 PM CEST |
| 329 |
// gpg: using DSA key 05C82CF57AD1DA46 |
| 330 |
// gpg: Can't check signature: No public key |
| 331 |
int end = error.find("\n", index2); |
| 332 |
block.setSignatureKeyId( error.mid(index2,end-index2) ); |
| 333 |
} |
| 318 |
kdDebug(5100) << "Message was signed with key '" << block.signatureKeyId() << "'\n"; |
334 |
kdDebug(5100) << "Message was signed with key '" << block.signatureKeyId() << "'\n"; |
| 319 |
// move index to start of next line |
335 |
// move index to start of next line |
| 320 |
index = error.find('\n', index2)+1; |
336 |
index = error.find('\n', index2)+1; |