-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexport_keys
More file actions
executable file
·30 lines (24 loc) · 1.05 KB
/
Copy pathexport_keys
File metadata and controls
executable file
·30 lines (24 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# SPDX-FileCopyrightText: 2017 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
script_dir=$(dirname $0)
if ! check_file "$script_dir/setup_env"; then
decho "setup_env must be present in $script_dir!"
exit_timestamp 1
fi
source $script_dir/setup_env
if ! check_dir "$1" || ! cd "$1"; then
echo "USAGE: $0 PATH"
exit_timestamp 1
fi
for x in bluetooth media networkstack platform sdk_sandbox shared; do
echo ${x}_key_release=\"$(openssl x509 -pubkey -noout -in $x.x509.pem | grep -v '-' | tr -d '\n')\"
echo ${x}_cert_release=\"$(openssl x509 -outform der -in $x.x509.pem | xxd -p | tr -d '\n')\"
done
border
echo release_key=\"$(openssl x509 -pubkey -noout -in releasekey.x509.pem | grep -v '-' | tr -d '\n')\"
echo release_cert=\"$(openssl x509 -outform der -in releasekey.x509.pem | xxd -p | tr -d '\n')\"
border
echo test_key=\"$(openssl x509 -pubkey -noout -in testkey.x509.pem | grep -v '-' | tr -d '\n')\"
echo test_cert=\"$(openssl x509 -outform der -in testkey.x509.pem | xxd -p | tr -d '\n')\"
exit_timestamp 0