Project

General

Profile

Actions

Bug #4905

closed

Default KeyChain() on Ubuntu doesn't load a TPM key

Added by Anonymous about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
04/02/2019
Due date:
% Done:

0%

Estimated time:

Description

(Reported by Ashlesh Gawande.)

In jNDN on Ubuntu, the default KeyChain() constructor is supposed to use the file-based TPM in ~/.ndn . But it does not use this to load keys from this directory. The problem is that the constructor TpmBackEndFile(String locationPath) does not check if locationPath is empty, as it is done in the other libraries.
https://github.com/named-data/jndn/blob/e656e455517253a97b0173e4c2882d73596f31eb/src/net/named_data/jndn/security/tpm/TpmBackEndFile.java#L77

(This was due to testing on Android which doesn't have a home directory.) The solution is to check if locationPath is empty and if so they behave like the constructor TpmBackEndFile().

Actions

Also available in: Atom PDF