Treat blank strings as null identity keys

This commit is contained in:
Jon Chambers
2023-06-09 09:53:48 -04:00
committed by Jon Chambers
parent 7fc6b1e802
commit b27334b0ff
2 changed files with 59 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ public class IdentityKeyAdapter {
throw new JsonParseException(parser, "Could not parse identity key as a base64-encoded value", e);
}
if (identityKeyBytes.length == 0) {
return null;
}
try {
return new IdentityKey(identityKeyBytes);
} catch (final InvalidKeyException e) {