4 ms·
I think it's mainly GnuPG's fault. There is no API, so developers can't integrate it into their applications. The only way is to pass arguments to gpg binary an
by JoelJacobson 12y ago
I think it's mainly GnuPG's fault. There is no API, so developers can't integrate it into their applications. The only way is to pass arguments to gpg binary and interpret the output on STDOUT using regexes. The "libraries" that exist for Python and other languages all work like this. That is why they require you to specify the "The path to the gpg executable."
If GnuPG provided a real API, then there would be hope, because the actual OpenPGP specification isn't that bad if you only implement and use the bare-minimum features.
This is one of the reasons my company developed support to deal with PGP signatures directly in PostgreSQL, without using GnuPG: https://github.com/trustly/bankapi/tree/master/debian/postgresql-pgcrypto-openpgp https://github.com/trustly/bankapi/tree/master/debian/postgr...
It's a bit funny it's now actually safer/better/easier to use PostgreSQL instead of GnuPG if you are developing an application which uses PGP, as your only option is to pass input to the gpg executable and regex it's output, which is hackish and not suitable for production purposes.