# Contributor: Alex Denes # Maintainer: Alex Denes . ../APKBUILD-secret.template pkgver=2021.06.01.03 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=" 11d85953a19bbc4ccea99370d0c7bc1fea78398173602b2b0b4b393704887d9686705456c2b1c8857242c1ced6efe0dd3aca1b202ba5d72549185bd4d1a5feaf private.key d3bb011441ba98d76943b4735ac948fdea520fb11ba7d3911509a0e56f0ecb194cacfb91e7f27a5f5f5a2df4aa48c9a4b05e8d661657c176f02e70fa780e12ed public.pem aca83fbc7ecf8c225c1145aec21cf70fb1ecd5b37c983e81e313436f0d7f4d1dcb7b89edd2293cb4a648f13b3042438be28d712145f7cc5896c0ff6e0ffc8db9 ca.pem "