aports/secret/letsencrypt/APKBUILD

60 lines
1.3 KiB
Plaintext

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-secret.template
pkgrel=0
subpackages="$pkgname-private $pkgname-public $pkgname-full $pkgname-ca $pkgname-chain"
checkdepends="openssl"
source="
private.key
public.pem
ca.pem
"
build() {
cat public.pem ca.pem > chain.crt
cat chain.crt private.key > full.crt
}
package() {
mkdir -p "$pkgdir"
}
check() {
openssl x509 -in public.pem -noout -checkend 0 >/dev/null && return
error "You have provided a expired certificate!"
return 1
}
private() {
pkgdesc="Private key"
rx_install private.key
}
full() {
pkgdesc="Complete certificate chain"
rx_install full.crt
}
chain() {
pkgdesc="Complete public certificate chain"
rx_install chain.crt
}
public() {
pkgdesc="Public key"
rx_install public.pem
}
ca() {
pkgdesc="Certificate authority"
rx_install ca.pem
}
sha512sums="
394eabb864e83c98d5986ccaee3098db0d4fcb3e7e8dc1bb3e940e8de1108deb8a88081bd0b4b84dbdf60d79978a0c40ece8a2e5db0e6af2f8f0336c2d527a2e private.key
b51ce06611d2637dabf5e2bab639c6f028021b2d599c7a132cd4226305570ff69440a822d68b19fb237cc3261b1f72357f281e3703decf221a06b8fcbda80069 public.pem
ce712d55962ce0e419d86cfacc84c532b50142d8c878b746268f14a8f667292e81fc99ceef0546e347f9880fb75ba12acedb474a9945e82c8ec2f0b85047cdde ca.pem
"