/* * Simple reenroll - RSA 2048 * * This test case uses libcurl to test simple * reenroll of a 2048 bit RSA CSR. HTTP Basic * authentication is used. However, PoP is now * enabled on the proxy, which should cause a * failure since libcurl doesn't include the PoP. */ static void us893_test12 (void) { long rv; LOG_FUNC_NM; st_proxy_enable_pop(); rv = curl_http_post(US893_REENROLL_URL_BA, US893_PKCS10_CT, US893_PKCS10_RSA2048, US893_UIDPWD_GOOD, US893_CACERTS, CURLAUTH_BASIC, NULL, NULL, NULL); /* * Should fail since the proxy will fail the PoP check */ CU_ASSERT(rv == 400); st_proxy_disable_pop(); }
/* * Simple enroll - PoP check fails with curl * * This test case verifies the server is * verifying the PoP from the client CSR. Since curl does not * set the PoP, the EST enrollment should fail. */ static void us748_test6 (void) { long rv; LOG_FUNC_NM; st_proxy_enable_pop(); /* * Send a valid enroll request using curl. Curl does not * include the PoP */ rv = curl_http_post(US748_ENROLL_URL_BA, US748_PKCS10_CT, US748_PKCS10_RSA2048, US748_UIDPWD_GOOD, US748_CACERTS, CURLAUTH_BASIC, NULL, NULL, NULL); /* * The server should respond with a failure code */ CU_ASSERT(rv == 400); st_proxy_disable_pop(); }