-
Notifications
You must be signed in to change notification settings - Fork 77
Verify Binaries
steveclay edited this page Apr 6, 2023
·
3 revisions
- The following command can verify a binary:
spctl -a -t open --context context:primary-signature -v <path_to_binary_to_check>
- Assume you've installed under
/usr/local/ibmcloud
(default location), then you can run the following commands to verify:- To verify
ibmcloud
:spctl -a -t open --context context:primary-signature -v /usr/local/ibmcloud/bin/ibmcloud
- To verify
- You should see the following output:
/usr/local/bin/ibmcloud: accepted
source=Notarized Developer ID
-
Download the public key from the IBM web site depending on your CLI release:
-
Make sure you have
openssl
installed -
Signature files should be under
bin
sub-folder of installation location, e.g/usr/local/ibmcloud/bin
(default location).- Signature file of
ibmcloud
:ibmcloud.sig
- Signature file of
-
run
openssl dgst -sha256 -verify <path_to_public_key> -signature <path_to_signature_file> <path_to_binary_to_check>
.- For example, you can run the following commands to verify, if you install into the default location.
cd /usr/local/ibmcloud/bin
openssl dgst -sha256 -verify <path_to_public_key> -signature ibmcloud.sig ibmcloud
- You should see output like
Verified OK
- For example, you can run the following commands to verify, if you install into the default location.
Windows binaries are signed and it will be automatically checked the first time you run ibmcloud
. No further action is required to verify them.