From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- third_party/rust/cose/tools/certs/certs.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 third_party/rust/cose/tools/certs/certs.sh (limited to 'third_party/rust/cose/tools/certs/certs.sh') diff --git a/third_party/rust/cose/tools/certs/certs.sh b/third_party/rust/cose/tools/certs/certs.sh new file mode 100755 index 0000000000..b6f4db679c --- /dev/null +++ b/third_party/rust/cose/tools/certs/certs.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +cwd=$(cd $(dirname $0); pwd -P) +MOZILLA_CENTRAL=${MOZILLA_CENTRAL:-"$cwd/../../../mc"} +script_path="$MOZILLA_CENTRAL/security/manager/ssl/tests/unit" + +python_path="$MOZILLA_CENTRAL/third_party/python/pyasn1/" +python_path="$python_path:$MOZILLA_CENTRAL/third_party/python/pyasn1-modules/" +python_path="$python_path:$MOZILLA_CENTRAL/third_party/python/PyECC/" +python_path="$python_path:$MOZILLA_CENTRAL/third_party/python/mock-1.0.0/" +python_path="$python_path:$MOZILLA_CENTRAL/third_party/python/rsa/" + +gen_cert() { + PYTHONPATH=$python_path "$script_path"/pycert.py "$@" > /tmp/cert.pem + openssl x509 -in /tmp/cert.pem -out /tmp/cert.der -outform DER + xxd -ps /tmp/cert.der | sed 's/\([0-9A-Fa-f]\{2\}\)/0x\1, /g' \ + | tr -d '\n' + echo "" +} + +gen_cert "${@:1}" -- cgit v1.2.3