2021-01-02 02:35:44 +00:00
|
|
|
# Contributor: Alex Denes <caskd@redxen.eu>
|
|
|
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
2021-06-01 23:17:41 +00:00
|
|
|
|
|
|
|
. ../APKBUILD-secret.template
|
|
|
|
|
|
|
|
pkgver=2021.06.01.03
|
2021-04-30 10:46:47 +00:00
|
|
|
pkgrel=0
|
2021-01-05 02:02:36 +00:00
|
|
|
subpackages="$pkgname-private $pkgname-public $pkgname-full $pkgname-ca $pkgname-chain"
|
2021-06-01 23:17:41 +00:00
|
|
|
checkdepends="openssl"
|
2021-01-02 02:35:44 +00:00
|
|
|
source="
|
|
|
|
private.key
|
|
|
|
public.pem
|
|
|
|
ca.pem
|
|
|
|
"
|
|
|
|
|
|
|
|
build() {
|
2021-01-05 02:02:36 +00:00
|
|
|
cat public.pem ca.pem > chain.crt
|
|
|
|
cat chain.crt private.key > full.crt
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2021-06-01 23:17:41 +00:00
|
|
|
mkdir -p "$pkgdir"
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
2021-06-01 23:17:41 +00:00
|
|
|
rx_install private.key
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
2021-01-05 02:02:36 +00:00
|
|
|
full() {
|
|
|
|
pkgdesc="Complete certificate chain"
|
2021-06-01 23:17:41 +00:00
|
|
|
rx_install full.crt
|
2021-01-05 02:02:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
chain() {
|
|
|
|
pkgdesc="Complete public certificate chain"
|
2021-06-01 23:17:41 +00:00
|
|
|
rx_install chain.crt
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public() {
|
|
|
|
pkgdesc="Public key"
|
2021-06-01 23:17:41 +00:00
|
|
|
rx_install public.pem
|
2021-01-05 02:02:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ca() {
|
|
|
|
pkgdesc="Certificate authority"
|
2021-06-01 23:17:41 +00:00
|
|
|
rx_install ca.pem
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
2021-06-01 23:17:41 +00:00
|
|
|
sha512sums="
|
|
|
|
11d85953a19bbc4ccea99370d0c7bc1fea78398173602b2b0b4b393704887d9686705456c2b1c8857242c1ced6efe0dd3aca1b202ba5d72549185bd4d1a5feaf private.key
|
2021-04-30 10:46:47 +00:00
|
|
|
d3bb011441ba98d76943b4735ac948fdea520fb11ba7d3911509a0e56f0ecb194cacfb91e7f27a5f5f5a2df4aa48c9a4b05e8d661657c176f02e70fa780e12ed public.pem
|
2021-06-01 23:17:41 +00:00
|
|
|
aca83fbc7ecf8c225c1145aec21cf70fb1ecd5b37c983e81e313436f0d7f4d1dcb7b89edd2293cb4a648f13b3042438be28d712145f7cc5896c0ff6e0ffc8db9 ca.pem
|
|
|
|
"
|