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
|
|
|
|
|
2024-07-23 17:40:28 +00:00
|
|
|
pkgver=2024.06.23.01
|
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="
|
2021-07-17 16:45:11 +00:00
|
|
|
394eabb864e83c98d5986ccaee3098db0d4fcb3e7e8dc1bb3e940e8de1108deb8a88081bd0b4b84dbdf60d79978a0c40ece8a2e5db0e6af2f8f0336c2d527a2e private.key
|
2024-07-23 17:40:28 +00:00
|
|
|
59a0d0772dcff26b029e6cee7457e1b95ca4d64615b1ccd7c61e5acb8ec2e2eaaf7bbf9ba43e2a523c8cef8c1ca7125ba376e9840b89458186e3089cdbb7bc4c public.pem
|
|
|
|
a1d56c0a0627d8f231374550dbd64b9a6e02b6d51ba194819e983b78612184d586428476c88c0496c7a9f098c4277b02bcd7048817895653f55e1dd3f99898fd ca.pem
|
2021-06-01 23:17:41 +00:00
|
|
|
"
|