Skip to content

Commit

Permalink
Fix handling of --without-osx-keychain
Browse files Browse the repository at this point in the history
Refs: #3338
Change-Id: Ib9f7ff94d7436d618c5e9055f59b71f1e41893d5
  • Loading branch information
Pesa committed Jul 31, 2022
1 parent 134ed48 commit dc3575f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/manpages/ndn-client.conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ tpm

Possible values for ``[scheme]`` are:

* ``tpm-osx-keychain`` (default on macOS): secure storage of private keys in the macOS
* ``tpm-osxkeychain`` (default on macOS): secure storage of private keys in the macOS
Keychain with OS-provided access restrictions.

The ``[location]`` parameter is ignored.
Expand Down
4 changes: 2 additions & 2 deletions ndn-cxx/security/key-chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ NDN_CXX_KEYCHAIN_REGISTER_PIB_BACKEND(PibMemory);
} // namespace pib

namespace tpm {
#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS) && defined(NDN_CXX_WITH_OSX_KEYCHAIN)
#ifdef NDN_CXX_HAVE_OSX_FRAMEWORKS
NDN_CXX_KEYCHAIN_REGISTER_TPM_BACKEND(BackEndOsx);
#endif // defined(NDN_CXX_HAVE_OSX_FRAMEWORKS) && defined(NDN_CXX_WITH_OSX_KEYCHAIN)
#endif // NDN_CXX_HAVE_OSX_FRAMEWORKS
NDN_CXX_KEYCHAIN_REGISTER_TPM_BACKEND(BackEndFile);
NDN_CXX_KEYCHAIN_REGISTER_TPM_BACKEND(BackEndMem);
} // namespace tpm
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/security/key-chain.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ BOOST_FIXTURE_TEST_CASE(ConstructorEmptyConfig, TestHomeAndPibFixture<PibPathCon
KeyChain keyChain;
BOOST_CHECK_EQUAL(keyChain.getPib().getPibLocator(), "pib-memory:");

#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS) && defined(NDN_CXX_WITH_OSX_KEYCHAIN)
BOOST_CHECK_EQUAL(keyChain.getPib().getTpmLocator(), "tpm-osxkeychain:");
BOOST_CHECK_EQUAL(keyChain.getTpm().getTpmLocator(), "tpm-osxkeychain:");
#else
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/security/tpm/back-end.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ BOOST_AUTO_TEST_SUITE(TestBackEnd)
using tpm::Tpm;

using TestBackEnds = boost::mpl::vector<
#ifdef NDN_CXX_HAVE_OSX_FRAMEWORKS
#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS) && defined(NDN_CXX_WITH_OSX_KEYCHAIN)
BackEndWrapperOsx,
#endif // NDN_CXX_HAVE_OSX_FRAMEWORKS
#endif
BackEndWrapperMem,
BackEndWrapperFile>;

Expand Down

0 comments on commit dc3575f

Please sign in to comment.