gnupg

Gpg encryption over web browser

给你一囗甜甜゛ 提交于 2019-12-13 18:23:23
问题 I have search all over the web, but unable to find an answer, so I hope I can find one here. I have a web application run on Windows and IIS written in Perl. One of the scripts perfroms multiple tasks. One of them executes a command to encrypt a file. Here is the command: my $cmd = "c:\\gnupg\\pub\\gpg -ase --always-trust --batch --passphrase mypassphrase --output $filename.pgp -r stuff $filename"; qx/$cmd/; Unfortunately, this does not work. The error I get is: gpg: no default secret key: No

make a password protected bash script resist/refuse “bash -x” when the password is given

旧时模样 提交于 2019-12-13 01:25:26
问题 I want to give my long scripts to customer. The customer must not be able to read the scripts even if he has the password. The following command locks and unlocks the script but the set +x is simply ignored. The code: read -p 'Script: ' S && C=$S.crypt \ H='eval "$((dd if=$0 bs=1 skip=//|gpg -d) 2>/dev/null)"; exit;' && gpg -c<$S | cat >$C <(echo $H | sed s://:$(echo "$H" | wc -c):) - \ <(chmod +x $C) 回答1: Given that it is an interpreted script that at some point must be loaded into memory

PHP GnuPG segfaults in a webserver

点点圈 提交于 2019-12-12 19:16:55
问题 Inspired by http://devzone.zend.com/1278/using-gnupg-with-php/ and with help @ PHP ASCII Armored PGP encrypted string I was able to GnuPG-encrypt a string with a 3rd party public key when running in CLI. set GNUPGHOME to world-readable location chmod keyring files to 666 cli php encrypts the string just fine PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies but... I get "exit signal Segmentation

gnupg get_key failed in php

社会主义新天地 提交于 2019-12-12 17:06:51
问题 I am using gnupg for digital sign file in php . It was working fine before. Suddenly I am getting this error: PHP Fatal error: Uncaught exception 'Exception' with message 'get_key failed' putenv("GNUPGHOME=/tmp"); $publicKey = file_get_contents("./media/public.key"); $gpg = new gnupg(); $gpg->seterrormode(gnupg::ERROR_EXCEPTION); $info = $gpg->import($publicKey); $gpg->addsignkey($info['fingerprint'], DIGITAL_FILE_PASS); $signed = $gpg->sign($data_to_sign); What could be the reason?

Problem decrypting PGP in python with pyme without user interaction

倖福魔咒の 提交于 2019-12-12 09:27:21
问题 I am trying to decrypt messages using pyme (a python wrapper from gpgme). It works fine if I type in the password when it prompts but I cannot get the passphrase callback to work. Here is the code import pyme.core def Callback( x, y, z ): print 'in passphrase callback' return 'passphrase' plain = pyme.core.Data() cipher = pyme.core.Data(sys.stdin.read()) c = pyme.core.Context() c.set_armor(1) c.set_passphrase_cb(Callback) c.op_decrypt( cipher, plain ) plain.seek(0,0) print plain.read() When I

Is Maven artifact signing a legitimate use of GnuPG comment in user ID?

末鹿安然 提交于 2019-12-12 05:03:04
问题 I'm new to GPG signing and the intricacies are dizzying, as my other, overly-broad question indicates. So let me try to distill my current doubts into a simple question. Let's say that a company Acme wants to sign some artifacts for publishing on Maven Central. From much research from various sources I glean the following best practices: Acme should have one single primary key, e.g. for id@acme.example.com . Acme should generate subkeys for general day-to-day use, such as signing Maven

vb.net runs gpg.exe step of job runs ok from PC but not from SQL Server Agent schedule

最后都变了- 提交于 2019-12-11 17:01:31
问题 Everything worked great from my Visual Studio on my PC running this from the Start button. When I build the executable and copied the executable to the production box and scheduled the job via SQL Server Agent on the production machine – everything worked fine to create the file, but the encryption bit does not work. The gpg.exe is here on the production server: \sql2014\c$\Program Files (x86)\GnuPG\bin The gpg is here on my PC: C:\Program Files (x86)\GnuPG\bin The filename.csv gets created

GPG: xxxxxxxx: skipped: public key not found

╄→尐↘猪︶ㄣ 提交于 2019-12-11 15:53:41
问题 i`ve got a problem with encrypting some stuff on a Debian 8.10 server. I have a few keys imported into my keyring and am able to check if all that need to be there are actually there with gpg --list-keys Whenever my script runs which contains the following command gpg --trust-model always -r XXXXXXXX -r XXXXXXXX -r XXXXXXXX -r XXXXXXXX -r XXXXXXXX -e i get this error gpg: XXXXXXXX: skipped: public key not found gpg: [stdin]: encryption failed: public key not found None of the keys that aren't

In-memory GPG signing (or possibly using a temporary keyring)

淺唱寂寞╮ 提交于 2019-12-11 07:33:44
问题 I'm working on a web app that needs to create GPG signatures for files as they're uploaded by someone on staff. However, for security, I don't want to keep the signing key on the webserver, even though it's protected by a passphrase. One solution I was looking into was to prompt for the private key on startup of the webapp, and store it in memory. Then, pass in the text of the key when signing, instead of using a key from the keyring. However, I've done a lot of looking around and can't find

RSA python publickey using pyCrypto

可紊 提交于 2019-12-11 07:18:56
问题 How to load a RSA public key file into a pyCrypto publickey object in python? 回答1: The RSA Class has an importKey method for this: importKey(externKey) Import an RSA key (public or private half). externKey: the RSA key to import, encoded as a string. The key can be in DER (PKCS#1) or in unencrypted PEM format (RFC1421). 来源: https://stackoverflow.com/questions/6011666/rsa-python-publickey-using-pycrypto