Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
When --out is not used with tinkey create-public-keyset a NullPointerException is raised.
To Reproduce
Generate a private key (of an asymmetric format) then try to create the public keyset without specifying --out.
/bazel-bin/tinkey/tinkey create-public-keyset --in ../../foo.json ✘ 1
Exception in thread "main" java.lang.NullPointerException
at com.google.crypto.tink.JsonKeysetWriter.write(JsonKeysetWriter.java:86)
at com.google.crypto.tink.CleartextKeysetHandle.write(CleartextKeysetHandle.java:79)
at com.google.crypto.tink.tinkey.CreatePublicKeysetCommand.create(CreatePublicKeysetCommand.java:47)
at com.google.crypto.tink.tinkey.CreatePublicKeysetCommand.run(CreatePublicKeysetCommand.java:31)
at com.google.crypto.tink.tinkey.Tinkey.main(Tinkey.java:55)
Expected behavior
Like other commands, it should print to stdout.
Error messages, stack traces, etc.
/bazel-bin/tinkey/tinkey create-public-keyset --in ../../foo.json ✘ 1
Exception in thread "main" java.lang.NullPointerException
at com.google.crypto.tink.JsonKeysetWriter.write(JsonKeysetWriter.java:86)
at com.google.crypto.tink.CleartextKeysetHandle.write(CleartextKeysetHandle.java:79)
at com.google.crypto.tink.tinkey.CreatePublicKeysetCommand.create(CreatePublicKeysetCommand.java:47)
at com.google.crypto.tink.tinkey.CreatePublicKeysetCommand.run(CreatePublicKeysetCommand.java:31)
at com.google.crypto.tink.tinkey.Tinkey.main(Tinkey.java:55)
Describe the bug
When
--out
is not used withtinkey create-public-keyset
a NullPointerException is raised.To Reproduce
Generate a private key (of an asymmetric format) then try to create the public keyset without specifying
--out
.Expected behavior
Like other commands, it should print to stdout.
Error messages, stack traces, etc.
Version information
Additional context
PR is on the way with a fix.