Refactor Chrome entrypoint to funnel through the FF entrypoint
authorMark Donnelly <mark@painless-security.com>
Wed, 26 Nov 2014 17:21:05 +0000 (12:21 -0500)
committerMark Donnelly <mark@painless-security.com>
Wed, 26 Nov 2014 17:21:05 +0000 (12:21 -0500)
json_gssapi/main.cpp

index 6070aa1..6db2850 100644 (file)
@@ -12,6 +12,7 @@
 #include <share.h>
 #else
 #include <unistd.h>
+#include <string.h>
 #endif
 #include <util_json.h>
 #include <GSSRequest.h>
@@ -93,13 +94,12 @@ int main(int argc, char **argv) {
 #endif
     input[len] = '\0';
     
-    GSSRequest *req = new GSSRequest(string(input));
-    req->execute();
-    output = req->getResponse();
-    len = output.length();
+    char *out = gss_request(input);
+    len = strlen(out);
     
     cout.write((char *)&len, 4);
-    cout << output;
+    cout << out;
+    deallocate_reply(out);
     cout.flush();
 #ifndef WIN32
   } while(1);