Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

[REVIEW] Some modifications #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

[REVIEW] Some modifications #1

wants to merge 8 commits into from

Conversation

daniele-athome
Copy link

I created this PR to let you review my modifications and eventually create one or more selective PRs to do the actual merges (or, if you like all of them, you might merge this PR as well).

@eighthave
Copy link
Member

Overall looks good. In general, all of the commit messages should describe why you made the changes, because its not obvious. For the most part, the existing commit messages are describing what has changed, but that is visible from reading the code.

@daniele-athome
Copy link
Author

You're right. I will re-apply the changes on your master with improved commit messages.

This is just a first draft of the capabilities of the import function provided
by GPGME. For now it just returns the fingerprint of the first successfully
imported key.

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Adding this flag will fill in signatures-related structures when retrieving key
information.

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Replace some missing features in GPGME < 1.4 with dummy values or by throwing
exceptions.

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Call gpgme_check_version with the minimal compatible version and redefine some
types missing in GPGME < 1.4.

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
@daniele-athome
Copy link
Author

I've reapplied the commits with some explanations. If you think they can suffice, let's comment them here. Merry Christmas by the way :-)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
@eighthave
Copy link
Member

@daniele-athome are you planning on doing a new pull request, or shall I cherry-pick these commits?

@daniele-athome
Copy link
Author

Hey, sorry I've been busy. I was planning to rework these things in the short term (2-4 weeks):

  • expose gpgme_set_keylist_mode
  • handle FILE handler (faulty fclose) in some other ways
  • throw UnsupportedOperationException for backwards compatibility

The rest you can pick (at your choice):

  • Maven script (requires manual copy of the .so file though, and it's not very portable - e.g. might not work on Windows, but it's a start)
  • implement GnuPGKey.getTimestamp
  • remove debugging log (some unpolite printf :P)

The only doubt is "return first fingerprint from import". How do you think we should proceed on that?

@eighthave
Copy link
Member

No apologies necessary! Just checking in :-) Your future work stuff sounds very useful. I'll pick the commits you mentioned for now, to get things working on older versions of gpgme.

As for "return first fingerprint from import", why not always return a String[] of 0-inf fingerprints? Doing a String[] in JNI will probably more painful than it should be, as usual, but that seems to me to be the correct API.

@daniele-athome
Copy link
Author

Actually the import method should return an array (or a list) of classes describing the imported result in detail (much like the import struct used in gpgme). But let's start with a fingerprint array of successfully imported keys.

@eighthave
Copy link
Member

returning an array of the imported keys makes sense. But that might now fit
in with the rest of the API here. It seems to work in its own odd way, so it
might be more confusing if the import doesn't follow that.

@lakshminarayanar
Copy link

Hello Committers,
I tried to build using ant in my windows 8 machine, But facing issue with ant build. I posted a question in Stackoverflow also. Please help me to use GnuPG Java API to work with encryption and decryption.
It would be much helpful if you put some examples with encrypt,decrypt,sign and etc.
Stackoverflow question here http://stackoverflow.com/questions/30299143/gnupg-for-java-library-ant-build-issue-bug

Sorry for posting comment here.. There is no issue creation option to create issue in this project..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants