Closed ni4 closed 4 years ago
@msdev428 would you like to take this issue? Need your comment here to be able to assign it :) Thanks!
@ni4 sure, I will check and let you know. Thanks!
@msdev428 great! Feel free to ask any questions here.
@ni4 do I need to create PR from master
branch?
@msdev428 no, please create a separate branch and then create PR from it. PR process in more details is described here: https://github.com/rnpgp/rnp/blob/master/docs/develop.adoc
@ni4 sorry for delay. Can you advise me to solve this issue? To simulate key packet length, then do I need to replace key length field in pgp binary key file, right?
@msdev428 Yeah. Our implementation picks smallest possible packet header length. So you should cut existing header (see output of rnp --list-packets keyfile
, prepend constructed header with different length field, and make sure key is loaded successfully.
@ni4 Can you give access to make PR?
$ git push --set-upstream origin invalid_pkt_length_check
ERROR: Permission to rnpgp/rnp.git denied to msdev428.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
@msdev428 you should be able to create a PR from your own fork, please see https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork for the details.
@msdev428 also see this: https://github.com/rnpgp/rnp/issues/944#issuecomment-549292090
@ni4 I created PR #950
@msdev428 Thanks, I'll review it and add comments to the PR.
Fixed in #1011
Description
Make sure key packet can be correctly read with 1-byte, 2-byte and 4-byte packet lengths. Also test negative cases - when key packet length is very large (say, 3Gb), zero, 2 bytes, etc. Add separate test for these cases to rnp_tests suite, using the modified existing key file. Key loading should be done via the FFI interface (see
rnp_import_keys()
function).