Shopify / ejson

EJSON is a small library to manage encrypted secrets using asymmetric encryption.
MIT License
1.33k stars 64 forks source link

Encryption failed: public key has invalid format #119

Closed rehmanz closed 1 year ago

rehmanz commented 1 year ago

Failure

~/t/ejson_tutorial ❯❯❯ uname -a
Darwin xxxxxxxx.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
~/t/ejson_tutorial ❯❯❯ ejson --version
ejson version 1.3.1
~/t/ejson_tutorial ❯❯❯ cat test.ejson
{
  "_public_key": "<key>",
  "_database_username": "1234username",
  "database_password": "1234password"
}
~/t/ejson_tutorial ❯❯❯ ejson encrypt test.ejson
Encryption failed: public key has invalid format
~/t/ejson_tutorial ❯❯❯ echo $EJSON_KEYDIR                                  ✘ 1 
/opt/ejson/keys
~/t/ejson_tutorial ❯❯❯ ejson keygen -w
18c17aae0d07962805723d30330f9b61d7d6274e8e7ce9fdf2d9dd8ed8664f19
~/t/ejson_tutorial ❯❯❯ ejson encrypt test.ejson
Encryption failed: public key has invalid format