Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ndn/platform/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def client_conf_paths(self):
'/etc/ndn/client.conf']

def default_transport(self):
return 'unix:///run/nfd.sock'
if not os.path.exists('/run/nfd/nfd.sock') and os.path.exists('/run/nfd.sock'):
# Try to be compatible to old NFD
return 'unix:///run/nfd.sock'
return 'unix:///run/nfd/nfd.sock'

def default_pib_scheme(self):
return 'pib-sqlite3'
Expand Down
5 changes: 4 additions & 1 deletion src/ndn/platform/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ def client_conf_paths(self):
'/etc/ndn/client.conf']

def default_transport(self):
return 'unix:///var/run/nfd.sock'
if not os.path.exists('/var/run/nfd/nfd.sock') and os.path.exists('/var/run/nfd.sock'):
# Try to be compatible to old NFD
return 'unix:///var/run/nfd.sock'
return 'unix:///var/run/nfd/nfd.sock'

def default_pib_scheme(self):
return 'pib-sqlite3'
Expand Down
13 changes: 10 additions & 3 deletions src/ndn/platform/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ class Cng:
NCRYPT_ECDSA_P521_ALGORITHM = BCRYPT_ECDSA_P521_ALGORITHM
BCRYPT_OBJECT_LENGTH = c.c_wchar_p('ObjectLength')
BCRYPT_HASH_LENGTH = c.c_wchar_p('HashDigestLength')
MS_PLATFORM_KEY_STORAGE_PROVIDER = c.c_wchar_p('Microsoft Platform Crypto Provider')
MS_KEY_STORAGE_PROVIDER = c.c_wchar_p('Microsoft Software Key Storage Provider')
MS_PLATFORM_KEY_STORAGE_PROVIDER = c.c_wchar_p(
'Microsoft Platform Crypto Provider')
MS_KEY_STORAGE_PROVIDER = c.c_wchar_p(
'Microsoft Software Key Storage Provider')
BCRYPT_ECCPUBLIC_BLOB = c.c_wchar_p('ECCPUBLICBLOB')
BCRYPT_ECCPRIVATE_BLOB = c.c_wchar_p('ECCPRIVATEBLOB')

Expand Down Expand Up @@ -79,7 +81,12 @@ def client_conf_paths(self):

def default_transport(self):
# Note: %TEMP% won't be redirected even when the executable is a MSIX/MicrosoftStore app
return 'unix://' + os.path.expandvars(r'%TEMP%\nfd.sock')
oldPath = os.path.expandvars(r'%TEMP%\nfd.sock')
newPath = os.path.expandvars(r'%TEMP%\nfd\nfd.sock')
if not os.path.exists(newPath) and os.path.exists(oldPath):
# Try to be compatible to old NFD
return 'unix://' + oldPath
return 'unix://' + newPath

def default_pib_scheme(self):
return 'pib-sqlite3'
Expand Down