1
0
mirror of https://github.com/GOSTSec/vanitygen synced 2025-02-07 12:24:20 +00:00

Vanity pool doesn't accept solutions using POST, despite their

documentation, so use GET instead of POST for solutions.
Use OPENSSL_free() instead of free() for hex public keys.
This commit is contained in:
samr7 2012-10-11 20:17:53 -07:00
parent f95e89020f
commit 8c2a7cb90b

View File

@ -175,7 +175,7 @@ server_batch_free(pubkeybatch_t *pbatch)
if (pbatch->pubkey) if (pbatch->pubkey)
EC_POINT_free(pbatch->pubkey); EC_POINT_free(pbatch->pubkey);
if (pbatch->pubkey_hex) if (pbatch->pubkey_hex)
free((char*)pbatch->pubkey_hex); OPENSSL_free((char*)pbatch->pubkey_hex);
free(pbatch); free(pbatch);
} }
@ -206,12 +206,12 @@ pubkeybatch_avl_search(avl_root_t *rootp, const EC_POINT *pubkey,
if (cmpres < 0) { if (cmpres < 0) {
itemp = itemp->ai_right; itemp = itemp->ai_right;
} else { } else {
free(pubkey_hex); OPENSSL_free(pubkey_hex);
return vp; return vp;
} }
} }
} }
free(pubkey_hex); OPENSSL_free(pubkey_hex);
return NULL; return NULL;
} }
@ -649,8 +649,7 @@ server_context_submit_solution(server_context_t *ctxp,
creq = curl_easy_init(); creq = curl_easy_init();
if (curl_easy_setopt(creq, CURLOPT_URL, urlbuf) || if (curl_easy_setopt(creq, CURLOPT_URL, urlbuf) ||
curl_easy_setopt(creq, CURLOPT_VERBOSE, ctxp->verbose > 1) || curl_easy_setopt(creq, CURLOPT_VERBOSE, ctxp->verbose > 1) ||
curl_easy_setopt(creq, CURLOPT_FOLLOWLOCATION, 1) || curl_easy_setopt(creq, CURLOPT_FOLLOWLOCATION, 1)) {
curl_easy_setopt(creq, CURLOPT_POST, 1)) {
fprintf(stderr, "Failed to set up libcurl\n"); fprintf(stderr, "Failed to set up libcurl\n");
exit(1); exit(1);
} }