Create gpg keys for server and make available by link.
This commit is contained in:
parent
15539985b6
commit
c9fafb0f97
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
echo '<center>';
|
||||
$pubkeyfile = '../tmp/server_pubkey.key';
|
||||
$pubkeyfile = '../tmp/server_pubkey.txt';
|
||||
if(is_file($pubkeyfile)) {
|
||||
echo '<font size="1.5em">';
|
||||
echo '<a href="../tmp/server_pubkey.key" target=_blank>server_pubkey.key</a>';
|
||||
echo '<a href="../tmp/server_pubkey.txt" target=_blank>server_pubkey.txt</a>';
|
||||
echo '<br />';
|
||||
echo '</font>';
|
||||
}
|
||||
|
|
|
@ -1,16 +1,27 @@
|
|||
<?php
|
||||
|
||||
/* Set 'enable' to '1' to verify you have configured
|
||||
* this file, and are ready to enable gpg key creation
|
||||
*/
|
||||
$rslight_gpg['enable'] = '0';
|
||||
|
||||
/* YOU MUST CONFIGURE 'domain_name' to your site
|
||||
* domain name
|
||||
*/
|
||||
$rslight_gpg['domain_name'] = "www.example.com";
|
||||
|
||||
/* Below settings need not be changed if you are
|
||||
* ok with defaults
|
||||
*/
|
||||
$rslight_gpg['gnupghome'] = "$config_dir/.gnupg";
|
||||
<?php
|
||||
|
||||
/* Set 'enable' to '1' to verify you have configured
|
||||
* this file, and are ready to enable gpg key creation
|
||||
*/
|
||||
$rslight_gpg['enable'] = '0';
|
||||
|
||||
/* YOU MUST CONFIGURE 'domain_name' to your site
|
||||
* domain name
|
||||
*/
|
||||
$rslight_gpg['domain_name'] = "www.example.com";
|
||||
|
||||
// What nntp group to use to share mail data
|
||||
$rslight_gpg['nntp_group'] = "rocksolid.shared.encryption";
|
||||
|
||||
// What email address for sending notices
|
||||
$rslight_gpg['from_email'] = "rslight@example.com";
|
||||
|
||||
// A real contact email address
|
||||
$rslight_gpg['contact'] = "admin@example.com";
|
||||
|
||||
/* Below settings need not be changed if you are
|
||||
* ok with defaults
|
||||
*/
|
||||
// Where your .gpg data is kept
|
||||
$rslight_gpg['gnupghome'] = $config_dir."/.gnupg";
|
||||
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
|
||||
gnupghome="$1"
|
||||
server_pub_key="$2"
|
||||
domain="$3"
|
||||
fingerprint="$3"
|
||||
domain="$4"
|
||||
|
||||
export GNUPGHOME=$gnupghome
|
||||
gpg --batch --passphrase '' --quick-generate-key "$domain" rsa4096 cert 0
|
||||
gpg --export -a $domain > $server_pub_key
|
||||
|
||||
gpg --batch --passphrase '' --quick-gen-key $domain rsa4096 default 0
|
||||
gpg --export -a $domain > $server_pub_key
|
||||
gpg --fingerprint $domain | sed '2!d' > $fingerprint
|
Loading…
Reference in New Issue