From 18b3fd722ddf80ef217148b132fb26806f505aca Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 5 Feb 2019 20:01:20 +0100 Subject: [pkg] add sign script --- win/sign.py | 15 +++++++++++++++ win/tools/README-cert.txt | 1 + 2 files changed, 16 insertions(+) create mode 100644 win/sign.py create mode 100644 win/tools/README-cert.txt (limited to 'win') diff --git a/win/sign.py b/win/sign.py new file mode 100644 index 0000000..0ca2cdf --- /dev/null +++ b/win/sign.py @@ -0,0 +1,15 @@ +import subprocess +import os +import sys + +WIN_CERT_PATH = sys.argv[1] +WIN_CERT_PASS = sys.argv[2] +SIGNTOOL = "signtool" + +GOPATH = os.environ.get('GOPATH') +VERSION=subprocess.run('git -C ' + GOPATH + '\\src\\0xacab.org\\leap\\bitmask-vpn describe --tags', stdout=subprocess.PIPE).stdout.strip() + +installer = "RiseupVPN-" + str(VERSION, 'utf-8') + '.exe' +target = str(os.path.join(os.path.abspath('.'), 'dist', installer)) +cmd = [SIGNTOOL, "sign", "/f", WIN_CERT_PATH, "/p", WIN_CERT_PASS, target] +subprocess.run(cmd) diff --git a/win/tools/README-cert.txt b/win/tools/README-cert.txt new file mode 100644 index 0000000..e532997 --- /dev/null +++ b/win/tools/README-cert.txt @@ -0,0 +1 @@ +openssl pkcs12 -inkey privatekey.pem -in signing_cert.pem -export -out LEAP.pfx -- cgit v1.2.3