diff options
author | Endi S. Dewata <edewata@redhat.com> | 2014-06-19 17:48:03 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2014-06-20 15:55:07 -0400 |
commit | 6bb64604f3422e1c4f72a14707bfb6ffbeb23458 (patch) | |
tree | c17129614611c4ca95bed8c936cf86c033453816 /base/common/src/com/netscape/certsrv | |
parent | ae94ccc0164c6e8bdf30a0946c3003438254d85d (diff) | |
download | pki-6bb64604f3422e1c4f72a14707bfb6ffbeb23458.tar.gz pki-6bb64604f3422e1c4f72a14707bfb6ffbeb23458.tar.xz pki-6bb64604f3422e1c4f72a14707bfb6ffbeb23458.zip |
Fixed NumberFormatException in key-request-find.
Previously if a key archival failed, the REST service would return
an invalid key URL, which would cause an exception when the CLI tried
to parse it. The service has been fixed to return a null URL which
can be detected to avoid parsing invalid value.
The Python library has been modified to handle missing key URL.
Ticket #1043
Diffstat (limited to 'base/common/src/com/netscape/certsrv')
-rw-r--r-- | base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java b/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java index d9e5fbf1c..45f8b1335 100644 --- a/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java +++ b/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java @@ -55,6 +55,7 @@ public class KeyRequestInfo extends CMSRequestInfo { * @return the key ID in the keyURL */ public KeyId getKeyId() { + if (keyURL == null) return null; String id = keyURL.substring(keyURL.lastIndexOf("/") + 1); return new KeyId(id); } |