2021-04-13 18:57:26 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://curl.se/docs/caextract.html
|
2015-08-12 05:52:41 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Common CA certificates"
|
2019-01-20 22:39:59 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-03-02 15:05:43 +01:00
|
|
|
_DATE=2022-02-01
|
|
|
|
TERMUX_PKG_VERSION=1:${_DATE//-/.}
|
|
|
|
TERMUX_PKG_SRCURL=https://curl.se/ca/cacert-${_DATE}.pem
|
2022-03-01 21:32:32 +01:00
|
|
|
TERMUX_PKG_SHA256=1d9195b76d2ea25c2b5ae9bee52d05075244d78fcd9c58ee0b6fac47d395a5eb
|
2019-08-14 13:27:16 +02:00
|
|
|
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
2015-08-12 05:52:41 +02:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_make_install() {
|
2016-08-24 12:34:43 +02:00
|
|
|
local CERTDIR=$TERMUX_PREFIX/etc/tls
|
|
|
|
local CERTFILE=$CERTDIR/cert.pem
|
|
|
|
|
|
|
|
mkdir -p $CERTDIR
|
|
|
|
|
2018-06-22 01:12:41 +02:00
|
|
|
termux_download $TERMUX_PKG_SRCURL \
|
2016-08-24 12:34:43 +02:00
|
|
|
$CERTFILE \
|
2018-06-22 01:12:41 +02:00
|
|
|
$TERMUX_PKG_SHA256
|
2017-04-03 01:14:47 +02:00
|
|
|
touch $CERTFILE
|
|
|
|
|
|
|
|
# Build java keystore which is split out into a ca-certificates-java subpackage:
|
|
|
|
local KEYUTIL_JAR=$TERMUX_PKG_CACHEDIR/keyutil-0.4.0.jar
|
|
|
|
termux_download \
|
|
|
|
https://github.com/use-sparingly/keyutil/releases/download/0.4.0/keyutil-0.4.0.jar \
|
|
|
|
$KEYUTIL_JAR \
|
|
|
|
18f1d2c82839d84949b1ad015343c509e81ef678c24db6112acc6c0761314610
|
|
|
|
|
2021-10-13 11:45:27 +02:00
|
|
|
local JAVA_KEYSTORE_DIR=$TERMUX_PREFIX/opt/openjdk-17/lib/security
|
2017-04-03 01:14:47 +02:00
|
|
|
mkdir -p $JAVA_KEYSTORE_DIR
|
|
|
|
|
|
|
|
java -jar $KEYUTIL_JAR \
|
|
|
|
--import \
|
|
|
|
--new-keystore $JAVA_KEYSTORE_DIR/jssecacerts \
|
|
|
|
--password changeit \
|
|
|
|
--force-new-overwrite \
|
|
|
|
--import-pem-file $CERTFILE
|
2015-08-12 05:52:41 +02:00
|
|
|
}
|