File size: 581 Bytes
8c49a86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
#!/bin/sh
#

set -e

if [ ! -x "/opt/bin/minio" ]; then
	echo "minio executable binary not found refusing to proceed"
	exit 1
fi

verify_sha256sum() {
	echo "verifying binary checksum"
	echo "$(awk '{print $1}' /opt/bin/minio.sha256sum)  /opt/bin/minio" | sha256sum -c
}

verify_signature() {
	if [ "${TARGETARCH}" = "arm" ]; then
		echo "ignoring verification of binary signature"
		return
	fi
	echo "verifying binary signature"
	minisign -VQm /opt/bin/minio -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav
}

main() {
	verify_sha256sum

	verify_signature
}

main "$@"