update confirm-built-with-fips to work for Go 1.24

This commit is contained in:
Ryan Richard
2025-02-18 11:15:37 -08:00
parent 1ed53cf630
commit 2504a3cc8a
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
# Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# check whether the pinniped-server binary has particular symbols that only exists when it's compiled with boringcrypto.
@@ -20,7 +20,7 @@ then
exit 1
fi
# check whether the pinniped-server binary has particular symbols that only exist when it's compiled with non-boring crypto
pinniped_server_has_regular_crypto="$(go tool nm './image/rootfs/usr/local/bin/pinniped-server' | grep sha256 | grep di)"
pinniped_server_has_regular_crypto="$(go tool nm './image/rootfs/usr/local/bin/pinniped-server' | grep sha256 | grep di | grep -v fips)"
# if any of these symbols exist, that means it was compiled wrong and it should fail.
if [ -n "$pinniped_server_has_regular_crypto" ]
then
@@ -52,4 +52,4 @@ if [[ "$kube_cert_agent_ldd" != *"not a dynamic executable"* ]]
then
echo "kube cert agent binary is a dynamic executable."
exit 1
fi
fi