-
Notifications
You must be signed in to change notification settings - Fork 62
gnupg-fpr-java #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tkrajesh
wants to merge
90
commits into
smartrevolution:master
Choose a base branch
from
guardianproject:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
bb9feca
update C build system to simplify the process of building on Debian-d…
eighthave 0ea8efa
rename everything to gnupg-for-java to keep the name consistent throu…
eighthave 4830b16
convert to very plain JNI loading using System.loadLibrary() and JNI_…
eighthave 0f5f21d
use the libgnupg-for-java.so in place when running the tests
eighthave f7ddc34
ignore dist/ and hs_err_pid*.log
eighthave c76f44b
use a standard ant dir structure for JNI stuff: jni/ for source, buil…
eighthave 1fca8e5
move .java files straight into src/
eighthave 56d2ea0
moved test class into src/ to be built like a regular Java class
eighthave 830244f
clean up libgnupg-for-java.so build to reflect new layouts and have w…
eighthave 8169041
make sure the $HOME dir for the tests exists and is empty before runn…
eighthave e4a94d8
call gpgme_check_version() in JNI_OnLoad() since it seems to set up r…
eighthave c5d82ac
fix Java warnings in com/freiheit/gnupg
eighthave eed4bae
jni: LC_MESSAGES might not be defined on WIN32 or other platforms
eighthave 8a1bacb
gpgme needs LD_LIBRARY_PATH set since it launches cmd line progs like…
eighthave 33d480f
only use LD_LIBRARY_PATH code on Android
eighthave 91aed13
fix the listkeys feature of the gpgme library
eighthave 694cb36
gnupg-for-java: expose all booleans in gpgme_key_t as Java methods
eighthave 2148509
remove unneeded autogenerated JNI headers
eighthave f90f6cf
gnupg-for-java: add GnuPGKey.hasSecretKey() to report if any subkey i…
eighthave 0c208a3
gnupg-for-java: fix compiler warnings
eighthave 4afc03e
gnupg-for-java: also allow fetching secret keys using GnuPGKey contru…
eighthave cbfe16a
allow fetching secret keys using GnuPGContext.getKeyByFingerprint()
eighthave 05e35c7
add listSecretKeys() and searchSecretKeys() to GnuPGContext
eighthave eb3d094
simplify and complete get/set for Armor and TextMode
eighthave 1c912a1
add GnuPGData.size() to improve ByteArrayOutputStream performance
eighthave a163416
add javaish encryption methods
eighthave 07d843f
sync up trivial changes from gnupg-for-android
eighthave 0d51265
include signature notations in key lists
eighthave f17ef6e
put gnupg libs first in LD_LIBRARY_PATH to make sure we get the right…
eighthave 1f88566
standardize layout of public method declarations for clarity
eighthave 8b7c761
fix gpgmeOpEncryptSign method signature in Java
eighthave 351d29d
implement getSigner() and getSignersLength()
eighthave 473e0c6
add encryptAndSign method to force signing with encryption
eighthave f0478e2
make encrypt() do signing if GnuPGContext has signers added
eighthave 987e168
add simple method for generating a new PGP key
eighthave 69b4153
implement key importing from a file in gnupg-for-java
abeluck 1fe5bf8
disable gpgme passphraseListener, use pinentry on gpg 2.x
eighthave 7f84208
use POSIX FILE streams when creating GnuPGData for files
eighthave 8419673
expose gpgmeOpDecryptVerify as a proper Java method
eighthave 52f19f7
reduce the keylist return to the bare minimum for speed
eighthave 4d85b13
purge emacs code format comment, use the emacs 'java' mode
eighthave 29ac346
ran Eclipse code formatter in Android mode on *.java
eighthave 57a073a
add simple, java-ish decrypt methods
eighthave eed6e15
fix crash when get sigs on a key when none are returned
eighthave 5a11f75
format JNI C code with astyle. styled included in documentation
abeluck 174f611
POSIX setenv() to change app's env vars, which GnuPG requires
eighthave 59d4f53
add changePassphrase() and purge old non-functional code
eighthave f8bd42f
replace crazy loops with linked list when building keylists
eighthave 2a60215
purge dead passphrase code
eighthave 3d4d40f
ignore generated JNI headers
eighthave b24e3b5
add Eclipse project to make it easier to get started
eighthave 35140b0
purge Android-specific logging code
eighthave 09bc751
add jar path to runTests.sh
eighthave dd23cc1
purge unused variables
eighthave 0cb77d5
include gpgme source for context.h
eighthave 2af3b04
remove variable that is never accessed/read and enable that warning
eighthave dcf4e83
purge last remnant of old GnuPG 1.4 passphrase handling
eighthave 7e0a74c
run Eclipse Android-mode code formatter GnuPGTestSuite.java
eighthave 7a00a5c
updated README
eighthave b0b1177
run gpgme_check_version() in JNI_OnLoad to init thread support
eighthave a4d5518
fix javadoc build to make plain javadoc style
eighthave 34aec60
add Guardian Project logo and name to javadoc
eighthave c4a488a
fix all javadoc warnings and some related improvements
eighthave 727ef48
generate etags with 'make TAGS'
eighthave a74d932
replace hack using private header with public gpgme_signers_count()
eighthave 1aa5368
include data.h from gpgme 1.4.3
eighthave 7524483
update build version to 0.2-pre
eighthave 9a9ae7a
make JNI headers are optional
eighthave c70a921
quick documentation of build process
eighthave 524512a
cleaner way include gpgme's data.h locally
eighthave 6082563
ignore .class files
eighthave 06522d5
add run script to examples/
eighthave b1a18bb
purge unneeded C test code
eighthave f15d15c
include a bunch of relevant files to test with
eighthave 434369d
move format-code.sh to jni/ since it is only used there
eighthave 7ac81bb
fix tests in Eclipse: set path to libgnupg-for-java.so
eighthave 9e54a17
update format-code.sh to get closest to current style
eighthave cf92f88
reformat all .c and .h files with updated format-code.sh
eighthave d4b23c3
including emacs formatting commands at end of every code file
eighthave de1fb1a
update JNI build for GNU/Linux, Windows, and a partial Mac OS X
eighthave d69a6bb
generate and build against JNI headers so definitions match
eighthave 5cce7a1
clean up naming in build system
eighthave a0913cf
clean up build system to use variables and run the test suite
eighthave 763134f
include JUnit from Eclipse and set the location of the native libs
eighthave 2e6e0e5
print error if calling make directly, make should be called by ant
eighthave 05f74c7
remove unused headers
eighthave ac0cb87
set required gpgme version to 1.5.0
eighthave 90fb745
Simple Maven script
daniele-athome 79ed829
Implement GnuPGKey.getTimestamp
daniele-athome f5b4d5b
Remove debugging log
daniele-athome File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="src" path="examples"/> | ||
| <classpathentry kind="src" path="src"/> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="gnupg-for-java/build"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> | ||
| <classpathentry kind="output" path="build/classes"/> | ||
| </classpath> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| *.class | ||
| build/ | ||
| dist/ | ||
| hs_err_pid*.log | ||
| jni/*.o | ||
| jni/*.orig | ||
| jni/TAGS | ||
| # generated JNI headers | ||
| jni/com_freiheit_gnupg_GnuPG*.h | ||
| lib/libgnupg-for-java.so | ||
| target/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <projectDescription> | ||
| <name>gnupg-for-java</name> | ||
| <comment></comment> | ||
| <projects> | ||
| </projects> | ||
| <buildSpec> | ||
| <buildCommand> | ||
| <name>org.eclipse.jdt.core.javabuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| </buildSpec> | ||
| <natures> | ||
| <nature>org.eclipse.jdt.core.javanature</nature> | ||
| </natures> | ||
| </projectDescription> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,71 @@ | ||
| About GnuPG for Java | ||
| ======================= | ||
| GnuPG for Java | ||
| ============== | ||
|
|
||
| This is a lib I wrote a couple of years ago. It is a native binding to the | ||
| gpgme library from Werner Koch. It uses JNI. | ||
| GnuPG for Java is a Java wrapper for the gpgme (GnuPG Made Easy) library for | ||
| working with the GnuPG encryption suite. It is a native binding to the gpgme | ||
| using JNI. It requires gpgme 1.4.3 or newer, and expects to work with GnuPG | ||
| 2.x as the "engine" in gpgme. With GnuPG 2.x, gpg-agent will handle prompting | ||
| the user for the passphrase, as well as passphrase caching. | ||
|
|
||
| gpgpme is the standard library for developing third-party apps on top of GnuPG. | ||
|
|
||
| I wrote it for 32-Bit Intel GNU/Linux platforms. Some of my colleagues added | ||
| 64-Bit Intel GNU/Linux support. It should run on other Unix-platforms, too. But | ||
| this is not tested. Also I am not aware if it runs with the current version | ||
| of gpgme. It should be easy to add Windows support by compiling a DLL, adding | ||
| this to the jar and extend the loading mechanism to load a DLL on a Windows platform | ||
| Stefan Richter originally wrote it for 32-Bit Intel GNU/Linux platforms. Some | ||
| of his colleagues added 64-Bit Intel GNU/Linux support. It should build and | ||
| run on other UNIX platforms too, but that has not been tested. The Guardian | ||
| Project then ported it to GnuPG 2.x and Android as the basis of Gnu Privacy | ||
| Guard for Android, and added lots of features and fixed lots of bugs in the | ||
| process. | ||
|
|
||
| It should be easy to add Windows support by compiling a DLL, adding this to | ||
| the jar and extend the loading mechanism to load a DLL on a Windows platform | ||
| instead of loading a .so lib. | ||
|
|
||
|
|
||
| ## Setup for Building | ||
|
|
||
| You will need a JUnit jar to run the tests. If your system does not provide | ||
| one already, you can download the jar and put it into the build/ directory of | ||
| this project. | ||
|
|
||
| ### Debian/Ubuntu/Mint/etc | ||
|
|
||
| sudo apt-get install default-jdk make ant build-essential \ | ||
| libgpgme11-dev libgpg-error-dev | ||
|
|
||
|
|
||
| ### Windows | ||
|
|
||
| * Install MinGW (for 32-bit): http://mingw.org/ | ||
| * Install Gpg4win: http://gpg4win.org/download.html | ||
| ** Signing Key Fingerprint: `61AC 3F5E E4BE 593C 13D6 8B1E 7CBD 620B EC70 B1B8` | ||
|
|
||
|
|
||
| ### Mac OS X | ||
|
|
||
| You need to install GnuPG2 from one of a couple sources. You can get | ||
| it from Homebrew, MacPorts, or Fink. Or you can install | ||
| "GPGTools":https://gpgtools.org and then build gpgme from source. | ||
|
|
||
|
|
||
| ## Building | ||
|
|
||
| To build the `gnupg-for-java.jar` and `libgnupg-for-java.so` in build/, run | ||
| this: | ||
|
|
||
| ant clean release | ||
|
|
||
| You can run the test suite using `ant` also: | ||
|
|
||
| ant test | ||
|
|
||
| If you want the optional javadoc in build/docs/, run: | ||
|
|
||
| ant javadoc | ||
|
|
||
|
|
||
| ## Hacking Notes | ||
|
|
||
| Please conform to our code format standard. For C files use | ||
| ./format-code.sh. For Java files, use Eclipse with the Android mode from the | ||
| Android project. The default Eclipse formatting is usually close enough. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,15 @@ | ||
| # default build.properties | ||
|
|
||
| app.name=javagnupg | ||
| app.type=@APP-TYPE@ | ||
| app.version=0.1.5-ascii-armor-linux-i386-ia64 | ||
| app.name=gnupg-for-java | ||
| app.version=0.2-pre | ||
| app.customer=LGPL | ||
| app.vendor=freiheit.com technologies gmbh | ||
| app.year=2008 | ||
|
|
||
| lib=./lib | ||
| app.year=2014 | ||
|
|
||
| build.compiler=modern | ||
| compile.debug=true | ||
| compile.deprecation=false | ||
| compile.optimize=true | ||
|
|
||
| #where to put the source code | ||
| src=src | ||
|
|
||
| #where to put the generated class files | ||
| build=build | ||
|
|
||
| #where to put the generated class files | ||
| dist=dist | ||
|
|
||
| #where to put etc stuff :-) | ||
| etc=etc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice