summaryrefslogtreecommitdiffstats
path: root/base/native-tools/src/sslget/sslget.c
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-12-20 17:38:13 -0500
committerAde Lee <alee@redhat.com>2013-01-15 09:28:38 -0500
commit1cceecafb8050ec362a9c9568d36d52d3fe4117e (patch)
treecc4019509f5befe6159b00e95a2fbbb9415df921 /base/native-tools/src/sslget/sslget.c
parentd93a522df48a294018468c1db60f651e501ec458 (diff)
downloadpki-1cceecafb8050ec362a9c9568d36d52d3fe4117e.tar.gz
pki-1cceecafb8050ec362a9c9568d36d52d3fe4117e.tar.xz
pki-1cceecafb8050ec362a9c9568d36d52d3fe4117e.zip
Resolved Trac Ticket 367 - pkidestroy does not remove connector
* Added RESTful servlet to add/remove a KRA connector from the CA. * Modified ACL to allow KRA subsystem user to remove connector. * Modified connector code to allow the connector to be replaced without a server restart. * Added functionality to pki CLI to add/remove connector * Added code to pkidestroy to remove the connector (using both pki CLI and sslget) When the issues with pki connection are resolved, we will use that method instead. * Modified sslget to accept HTTP return codes != 200. In this case, we were returning 204 - which is perfectly legitimate.
Diffstat (limited to 'base/native-tools/src/sslget/sslget.c')
-rw-r--r--base/native-tools/src/sslget/sslget.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/native-tools/src/sslget/sslget.c b/base/native-tools/src/sslget/sslget.c
index 7288a1c58..a7c6a3f09 100644
--- a/base/native-tools/src/sslget/sslget.c
+++ b/base/native-tools/src/sslget/sslget.c
@@ -426,7 +426,11 @@ do_io( PRFileDesc *ssl_sock, int connection)
buf2 = 0;
}
- if ( ! PL_strnstr(buf,"200",13)) {
+ char *status_string = PL_strndup(buf+9, 3);
+ int status = atoi(status_string);
+ PL_strfree(status_string);
+
+ if (status >= 300) {
PR_Free(buf);
buf = 0;
exit(3);