Skip to content

Commit

Permalink
Skip keychain domains
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoesters committed Sep 6, 2024
1 parent 3f65457 commit 5fc9d33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions scripts/create_self_signed_certificates_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ INSTALLER_SIGNING_ID=${INSTALLER_SIGNING_ID:-${INSTALLER_ROOT}}
# which is why it is unsed on the CI.
if [[ -n "${ON_CI}" ]]; then
KEYCHAIN_PATH="/Library/Keychains/System.keychain"
KEYCHAIN_DOMAIN="system"
else
KEYCHAIN_PATH="${ROOT_DIR}/constructor.keychain-db"
KEYCHAIN_DOMAIN="user"
fi

security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN_PATH}"
Expand Down Expand Up @@ -88,4 +86,4 @@ done
# Add keychain at the beginning of the keychain list
# Must be removed at a later clean-up step
# shellcheck disable=SC2046
security list-keychains -d ${KEYCHAIN_DOMAIN} -s "${KEYCHAIN_PATH}" $(security list-keychains | xargs)
security list-keychains -s "${KEYCHAIN_PATH}" $(security list-keychains | xargs)
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@pytest.fixture
def self_signed_certificate_macos(tmp_path):
p = subprocess.run(
["security", "list-keychains", "-d", "user"],
["security", "list-keychains"],
capture_output=True,
text=True,
)
Expand Down Expand Up @@ -65,4 +65,4 @@ def self_signed_certificate_macos(tmp_path):
capture_output=True,
text=True,
)
subprocess.run(["security", "list-keychains", "-d", "user", "-s", *current_keychains])
subprocess.run(["security", "list-keychains", "-s", *current_keychains])

0 comments on commit 5fc9d33

Please sign in to comment.