Open kriskwiatkowski opened 6 years ago
@flowher sorry for the late reply. By "PGP data processing", do you mean that repgp
should handle the reading and writing of OpenPGP packets?
If repgp
can do all that, what's left of the use of rnp
? rnp
provides the data to write OpenPGP packets through repgp
?
Yes, that would be my suggestion. The rnp
would be just a light wrapper around librepgp
- basically implementation of the main()
function, attribute parsing, error handling, calling librepgp
and everything else which is needed for rnp
but not actual parsing/writing. The other rnp
folder would contain common functionality used by all the other components (as it does today partially).
The idea comes from the fact I don't see why we would need to differentiate between parsing and serializing. Actual implementation (location of files) for stream writing is already in librepgp
anyway.
I'm interested in opinions.
The other part of rnp other than the OpenPGP packet format is the keystore stuff. I do agree that reading and writing of the packet format should be done in the same library.
What are your views, @dewyatt @ni4 @randombit?
Description
I propose we extend
repgp
API so that it supports all PGP data processing (currently it's parsing only). To be done here is:repgp
should be using stream data processingrepgp
should implement read and write (currently API offers only parsing API - so read)rnp(2).c
should be small wrapper around API fromrepgp
(to improve testing, re-usability and avoid code duplication).repgp
there are few functions which should be prefixed withrepgp_
(for handle creation). That's a bug which must be fixed before this ticket is closedThis may be related partially to #490 (this should move all
rnp_***
functions torepgp
). Is it OK by everybody?