letsencrypt-sh 1st try.

This commit is contained in:
Micha Glave 2016-06-10 22:41:18 +02:00
parent fd2477cda7
commit cbe5c03226
4 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,3 @@
AUX config 3462 SHA256 136b58603704228d958ffaf62029d7fc9b2eba2cf86c7eb01dc9f5e88191c523 SHA512 75b635b3b32169888474eb6d2dbe845bf8d1380229f2fb2ae34e5b83ee2aac4b48ee853b4d0bc4636d7a8c0b0f8f7da171aa93a315114afd455106f804b2b530 WHIRLPOOL 8bc1389915fd2ec17e253d5af16fbd933de757c21bcf409d6df737464db3da682a6514b56254bd002f8c943c0c00e1df96803d6f6bd1d29a41d53e02c5b2cefa
AUX nginx.conf 74 SHA256 253a91301d18b47aa0934c3700da94b4c5f3a6125f2e713a2768d92cc3f00c84 SHA512 66149bb5e854af4dfada0d3446481071081fe4387771935c6bcf2be204d6d054209b0397e08093e767cb921de61b225c21be2f0ebe8b8eb0b7ce332fc63f08d2 WHIRLPOOL 8e32692a36c1a2bbdb86e8c087b9f9244ac84e9527f4659317bc2d3095a570d362b7a8dfc553facb423b7821bb569f0c2932ed5a2307def824c2b7598498761e
EBUILD letsencrypt-sh-9999.ebuild 936 SHA256 7ba628d6ee2c47ac61b3a0d8876ac800c28d140643dfcacc42a3444c166d9146 SHA512 16329e9991fb9151bce97b6b7778ca8e354f91fd812c18cdda7dc223efd6b81fb3bc046c08990bd7686396356dc962d1aaeb7c41d883dd248628d77fc7eb6c9b WHIRLPOOL 29e5f2ac856dec03e5d0cc3ffcaa65e96e63aa13b9dc5030bf0b0723081577261d64a2645fc8c305c8a74e7ade9ac0d21a837f4f7f60b0c8bd948a90c2fa5b3a

View File

@ -0,0 +1,85 @@
########################################################
# This is the main config file for letsencrypt.sh #
# #
# This file is looked for in the following locations: #
# $SCRIPTDIR/config (next to this script) #
# /usr/local/etc/letsencrypt.sh/config #
# /etc/letsencrypt.sh/config #
# ${PWD}/config (in current working-directory) #
# #
# Default values of this config are in comments #
########################################################
# Path to certificate authority (default: https://acme-v01.api.letsencrypt.org/directory)
#CA="https://acme-v01.api.letsencrypt.org/directory"
#CA="https://acme-staging.api.letsencrypt.org/directory"
# Path to license agreement (default: https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf)
#LICENSE="https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf"
# Which challenge should be used? Currently http-01 and dns-01 are supported
#CHALLENGETYPE="http-01"
# Path to a directory containing additional config files, allowing to override
# the defaults found in the main configuration file. Additional config files
# in this directory needs to be named with a '.sh' ending.
# default: <unset>
#CONFIG_D=
# Base directory for account key, generated certificates and list of domains (default: $SCRIPTDIR -- uses config directory if undefined)
#BASEDIR=$SCRIPTDIR
# File containing the list of domains to request certificates for (default: $BASEDIR/domains.txt)
#DOMAINS_TXT="${BASEDIR}/domains.txt"
# Output directory for generated certificates
#CERTDIR="${BASEDIR}/certs"
CERTDIR="/etc/ssl/letsencrypt"
# Directory for account keys and registration information
#ACCOUNTDIR="${BASEDIR}/accounts"
# Output directory for challenge-tokens to be served by webserver or deployed in HOOK (default: $BASEDIR/.acme-challenges)
#WELLKNOWN="${BASEDIR}/.acme-challenges"
WELLKNOWN=/var/www/letsencrypt
# Default keysize for private keys (default: 4096)
#KEYSIZE="4096"
# Path to openssl config file (default: <unset> - tries to figure out system default)
#OPENSSL_CNF=
# Program or function called in certain situations
#
# After generating the challenge-response, or after failed challenge (in this case altname is empty)
# Given arguments: clean_challenge|deploy_challenge altname token-filename token-content
#
# After successfully signing certificate
# Given arguments: deploy_cert domain path/to/privkey.pem path/to/cert.pem path/to/fullchain.pem
#
# BASEDIR and WELLKNOWN variables are exported and can be used in an external program
# default: <unset>
#HOOK=
# Chain clean_challenge|deploy_challenge arguments together into one hook call per certificate (default: no)
#HOOK_CHAIN="no"
# Minimum days before expiration to automatically renew certificate (default: 30)
#RENEW_DAYS="30"
# Regenerate private keys instead of just signing new certificates on renewal (default: yes)
#PRIVATE_KEY_RENEW="yes"
# Which public key algorithm should be used? Supported: rsa, prime256v1 and secp384r1
#KEY_ALGO=rsa
# E-mail to use during the registration (default: <unset>)
#CONTACT_EMAIL=
CONTACT_EMAIL=""
# Lockfile location, to prevent concurrent access (default: $BASEDIR/lock)
#LOCKFILE="${BASEDIR}/lock"
# Option to add CSR-flag indicating OCSP stapling to be mandatory (default: no)
#OCSP_MUST_STAPLE="no"

View File

@ -0,0 +1,4 @@
location /.well-known/acme-challenge {
alias /var/www/letsencrypt;
}

View File

@ -0,0 +1,46 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit git-r3
DESCRIPTION="Client for signing certificates with an ACME-server implemented as a relatively simple bash-script"
HOMEPAGE="https://github.com/lukas2511/letsencrypt.sh"
EGIT_REPO_URI="https://github.com/lukas2511/letsencrypt.sh.git"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="nginx"
DEPEND=""
RDEPEND="
sys-apps/coreutils
net-misc/curl
dev-libs/openssl
"
DOCS=( README.md docs/. )
src_install() {
dobin letsencrypt.sh
docompress -x /usr/share/doc/${PF}/examples
default
ETCDIR=/etc/letsencrypt.sh
insinto ${ETCDIR}
doins ${FILESDIR}/config
touch ${D}${ETCDIR}/domains.txt
keepdir /etc/ssl/letsencrypt
keepdir /var/www/letsencrypt
if use nginx ; then
mkdir -p ${D}/etc/nginx
cp ${FILESDIR}/nginx.conf ${D}/etc/nginx/letsencrypt.conf
fi
}
src_test() {
./test.sh
}