I was investigating issues that are being fixed in https://github.com/keybase/kbpgp/pull/207 and found another bug, unrelated to circular import but also in subkey_algo function in another class.
subkey_algo is only called during key generation, where subkey algorithms are not specified by the caller.
Before the fix, the new test crashed with:
:: Caught sync exception: ReferenceError: ECDH is not defined
at Function.Pair.subkey_algo (/home/zapu/Projects/KB/kbpgp/lib/ecc/eddsa.js:221:9)
or at /home/zapu/Projects/KB/kbpgp/test/files/ecc2.iced:156:20
In ecc2.iced/generate_default_subkeys: ReferenceError: ECDH is not defined
Full error object:
[ReferenceError: ECDH is not defined
at Function.Pair.subkey_algo (/home/zapu/Projects/KB/kbpgp/lib/ecc/eddsa.js:221:9)
at Function.KeyManager.generate (/home/zapu/Projects/KB/kbpgp/lib/openpgp/keymanager.js:907:52)
at /home/zapu/Projects/KB/kbpgp/test/files/ecc2.iced:156:20
I was investigating issues that are being fixed in https://github.com/keybase/kbpgp/pull/207 and found another bug, unrelated to circular import but also in
subkey_algo
function in another class.subkey_algo
is only called during key generation, where subkey algorithms are not specified by the caller.Before the fix, the new test crashed with: