gnupg

python gnupg.encrypt : no errors but not encrypting data or files

柔情痞子 提交于 2019-12-01 18:03:46
using python-gnupg v0.3.5 on windows 7 w/Python 2.7 and GPG4Win v2.2.0 test_gnupg.py results in 2 failures: Test that searching for keys works ... FAIL Doctest: gnupg.GPG.recv_keys ... FAIL 2 keyrings exist in each of these locations(secring & pubring in each): under the GPGHome directory (C:\Program Files (x86)\GNU\GnuPG) under the user profile(C:\Users\\AppData\Roaming\gnupg) If I create GPG instance and set the keyring file path to the user profile pubring.pgp I get a result from GPG.list_keys(). If I let it use the gpghome directory pubring.pgp I get no results from list_keys() because

Where to keep a GPG secret key for a Maven project in CI environment?

本小妞迷上赌 提交于 2019-12-01 16:14:15
问题 I'm trying to use maven-gpg-plugin:sign in order to sign project artifacts before deployment to Sonatype OSS repository. The question is where shall I keep my secret key secring.gpg : In continuous integration ~/.gnupg directory In project source code, e.g. src/test/resources/gpg/secring.gpg And why? 回答1: If key is sensitive put it in ~/.gnupg directory on CI server and protect that directory with proper access modifiers. 2nd approach will allow every developer with access to project to see

Erlang - Importing GPG Public Key

我与影子孤独终老i 提交于 2019-12-01 10:55:23
I'm trying to do some public-key-related things in Erlang, and they require me to track public keys. According to this page , I should be able to import PEM format keys by using file:read_file/1 and public_key:decode_pem/1 . The thing is, when I try to import a GPG public key, I don't get a result. I've got a file called inaimathi.pubkey with the following content: -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.11 (GNU/Linux) mQINBE9NBIQBEADMSzN6b0FaPP0rGiLDWKfH4ehN66Z0SAIynXm6lBHjmO69pNsm iIe4p1X9aXhr7EgEZKdbqevfXW7NuA/oL7Rbt+tzBT5nS2cYSHoZhUC/onVhJxUb drCR9NsBDZc1wZs

GPG - decrypt with multiple recipients

岁酱吖の 提交于 2019-12-01 09:38:00
I am trying to decrypt a file that has been encrypted using 2 recipients (--recipient recipientA@example.com --recipient recipientB@example.com). However when I try to decrypt the file, it always requests the passphrase of the 1st recipient. When the 1st recipient secret-key isn't part of the key-ring, it will give an error 'secret key not found'. How can I encrypt a file with multiple recipients so that both can decrypt them without knowing eachother keys & passphrases? (To me, the question seems simple and a basic feature - but obviously I cannot get it to work) Thank you in advance! I ran

git verify trusted tags

爷,独闯天下 提交于 2019-12-01 07:41:45
I would like to include git tag -v command into the deployment process to catch unsigned tags or tags signed by a non-trusted GPG key. The command returns with an exit code of 0 if the tag has a valid signature, but does not care wether the signed key is trusted or not. I don't want to resort to grepping the resulting GPG message manually I haven't tried it yet, and the documentation doesn't mention exit codes, but you could try git-verify-tag plumbing command Update Having no easy way to test this, I've reviewed the source code: https://github.com/git/git/blob

Erlang - Importing GPG Public Key

最后都变了- 提交于 2019-12-01 07:34:38
问题 I'm trying to do some public-key-related things in Erlang, and they require me to track public keys. According to this page, I should be able to import PEM format keys by using file:read_file/1 and public_key:decode_pem/1 . The thing is, when I try to import a GPG public key, I don't get a result. I've got a file called inaimathi.pubkey with the following content: -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.11 (GNU/Linux)

Retroactively sign git commits

吃可爱长大的小学妹 提交于 2019-12-01 03:05:45
问题 Recent versions of git (>= 1.7.9) support signing individual commits with GPG. Is it possible to retroactively sign all commits within a tree? 回答1: retroactively sign all commits within a tree? Yes: add a tag, that you would sign. That is actually the preferred option when it comes to sign commits: sign a all set of them through a tag, rather than signing each one individually. See "How to get pusher's Information in post-receive hooks?". Note (update may 2017) that only Git 2.13.x/2.14 (Q3

Using passphrase callback in ruby gpgme

空扰寡人 提交于 2019-11-30 23:31:31
I am using ruby gpgme gem (1.0.8). My passphrase callback isn't called: def passfunc(*args) fd = args.last io = IO.for_fd(fd, 'w') io.puts "mypassphrase" io.flush end opts = { :passphrase_callback => method(:passfunc) } GPGME.decrypt(input,output, opts) Does someone have working example of passphrase callback? Sample of callback you can find in the following working example. It signs a file in detached mode, i.e., the signature file is separated from the original file. It uses the default keyring at ~/.gnupg or something like that. To use a different directory for your keyring, set the

Using passphrase callback in ruby gpgme

自古美人都是妖i 提交于 2019-11-30 18:13:13
问题 I am using ruby gpgme gem (1.0.8). My passphrase callback isn't called: def passfunc(*args) fd = args.last io = IO.for_fd(fd, 'w') io.puts "mypassphrase" io.flush end opts = { :passphrase_callback => method(:passfunc) } GPGME.decrypt(input,output, opts) Does someone have working example of passphrase callback? 回答1: Sample of callback you can find in the following working example. It signs a file in detached mode, i.e., the signature file is separated from the original file. It uses the

Calculate multiple checksums from the same InputStream using DigestInputStream

三世轮回 提交于 2019-11-30 16:04:06
I am trying to figure out how to read multiple digests (md5, sha1, gpg) based on the same InputStream using DigestInputStream . From what I've checked in the documentation, it seems to be possible by cloning the digest. Could somebody please illustrate this? I don't want to be re-reading the stream in order to calculate the checksums. Louis Wasserman You could wrap a DigestInputStream around a DigestInputStream and so on recursively: DigestInputStream shaStream = new DigestInputStream( inStream, MessageDigest.getInstance("SHA-1")); DigestInputStream md5Stream = new DigestInputStream( shaStream