gnupg

How to sign public PGP key with Bouncy Castle in Java

泄露秘密 提交于 2020-01-02 09:37:28
问题 I'm writing PGP server to generate keys for users. I want to sign any generated PGP public key with my private key in Java with Bouncy Castle, to make it trusted for my users. I have no problems with generating key pair - it works perfect. I tried to sign by gpg --sign-key command line and it works good. But I can't get the same in Java. I tried many solutions like this: java sign public pgp key with bouncycastle and DirectKeySignature class from BC examples package, but nothing works for my.

search for a public key on a keyserver with GPGME

邮差的信 提交于 2020-01-01 12:25:11
问题 Today I started a new thread on gnupg mailing list, Search keys on a keyserver with GPGME. Basically I use GPGME as an interface to use GnuPG in my app, but I don't know how I can use GPGME functions to search for a key on a keyserver. Any idea? 回答1: Ok, I found the answer for this problem. Using gpgme_op_conf_load , gpgme_conf_arg_new , gpgme_conf_opt_change and gpgme_op_conf_save it is possible to set a new preference, in this case the keyserver url. -- Cheer, José 来源: https://stackoverflow

gpg: keyblock resource pubring.kbx not found because the repo path is prefixed to the gnupg home

南楼画角 提交于 2020-01-01 12:15:29
问题 I used to have my commits signed by gpg which worked all fine, but I suddenly got this message instead: gpg: keyblock resource '/c/Users/username/path/to/project/C:\Users\username\.gnupg/pubring.kbx': No such file or directory gpg: skipped "my_key": No secret key gpg: signing failed: No secret key error: gpg failed to sign the data fatal: failed to write commit object Note the path of the keyblock resource, it consists of two paths and is indeed not valid. Information about my setup I had my

How do I encrypt plaintext with GnuPG?

蓝咒 提交于 2019-12-31 08:08:44
问题 I've been working a great deal with GnuPG lately and have come to depend on its ability to encrypt files, etc. However, I am currently working on a couple of projects that involve communication (i.e. chat,email, etc) where I'd like to use existing keys to encrypt/decrypt text itself as opposed to a "container" such as a file or disk image. I suppose I could encrypt the container, convert the stream to base64 (or something appropriate) then mark the text as such, but I would guess there is a

Python - GPG decrypt works but GNUPG doesn't

喜夏-厌秋 提交于 2019-12-31 04:56:07
问题 I'm using pythons gnupg to decrypt a file I've downloaded with python: gpg = gnupg.GPG(gnupghome="/home/myname/.gnupg") with open('updates/'+filelist[i],'r') as f: print "Decrypting "+fn status=gpg.decrypt_file(f, passphrase="passphrase",output='updates/'+fn) print 'ok: ', status.ok print 'stderr: ',status.stderr This fails saying 'secret key not available'. However when I run gpg -d filename from terminal the file decrypts without any errors. I've used gpg -K and checked that the secret

How to select the GnuPG key that the maven-gpg-plugin uses to sign artifacts?

随声附和 提交于 2019-12-30 09:46:26
问题 I am using the maven-gpg-plugin to sign the maven artifacts. This works fine, but I have several keys in my GnuPG keyring and want to use a different one than the one GnuPG selects. How does GnuPG select the "default" key if there are several ones? Is there a possibility to specify the key to be used in the maven-gpg-plugin configuration? It seems that keyname doesn't work (I assume it selects the keyring, but not a specific key). 回答1: How does GPG select the "default" key if there are

OpenSSL vs GPG for encrypting off-site backups?

梦想的初衷 提交于 2019-12-29 10:13:13
问题 Given the option between using GPG and OpenSSL for local encryption before pushing archives to an off-site backup location, what are the benefits and drawbacks of each solution? Background: I currently manage a server infrastructure based on Ubuntu 14.04.1 with all current patches applied as they become available. All of these systems are headless, automatically built using vetted preseeds and automation tools, and run in virtual machines via KVM on uniform Intel-based hardware. We have a

Shell command fails from java but works when run manually

拟墨画扇 提交于 2019-12-25 09:19:15
问题 I'm trying to run some bash commands that works fine from my console but fails when trying to make the same command call from within Java. The command returns no errors and fails to produce the desired output file. The command is suppose to use a PGP tool (GPG) to decrypt a a file and create another file. This works when run manually but not from within a java app making the same shell call and with no errors. Just to be sure I even tried chmod 777 on the container folder so I don't think its

gpg --with-colon returns ????-??-?? as the expiration date. Linux Y2K issue?

允我心安 提交于 2019-12-24 11:50:57
问题 The gpg --with-colon reports bad expiration date (although the key is usable for encryption) See "[expires: ????-??-??]" gpg --with-colon key.ascii pub:-:1024:17:77A54749D56561D6:2016-06-10:????-??-??::-:AAA AAA <AAA@somewhere.com>: sub:-:2048:16:44479A86F9DB1538:2016-06-10:????-??-??::: [expires: ????-??-??] When I run --list-packets I can see that the expiration is set to 27 years in future: gpg --list-packets key.ascii ... hashed subpkt 2 len 4 (sig created 2016-06-10) hashed subpkt 9 len

GnuPG on Wampserver

流过昼夜 提交于 2019-12-24 09:51:17
问题 Can you please tell me how do I install and use GnuPG on wampserver ? I seriously want that. I hope this question comes under stackoverflow. If not please close this but please dont downvote me :( 回答1: You can get GnuPG as a PECL package here: http://pecl.php.net/package/gnupg It looks like you'll need to compile it yourself though. It comes with a config.m4 file, so you'll probably want to use autotools (cygwin?). Instructions on how to install it are here: http://www.php.net/manual/en