diff options
Diffstat (limited to 'src/tool_ssls.c')
-rw-r--r-- | src/tool_ssls.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/tool_ssls.c b/src/tool_ssls.c index 516a7d3c9..edf8d6095 100644 --- a/src/tool_ssls.c +++ b/src/tool_ssls.c @@ -38,7 +38,6 @@ static CURLcode tool_ssls_easy(struct OperationConfig *config, CURLSH *share, CURL **peasy) { CURLcode result = CURLE_OK; - struct GlobalConfig *global = config->global; *peasy = curl_easy_init(); if(!*peasy) @@ -65,12 +64,11 @@ CURLcode tool_ssls_load(struct OperationConfig *config, CURLcode r = CURLE_OK; int i, imported; bool error = FALSE; - struct GlobalConfig *global = config->global; curlx_dyn_init(&buf, MAX_SSLS_LINE); fp = fopen(filename, FOPEN_READTEXT); if(!fp) { /* ok if it does not exist */ - notef(global, "SSL session file does not exist (yet?): %s", filename); + notef("SSL session file does not exist (yet?): %s", filename); goto out; } @@ -87,14 +85,13 @@ CURLcode tool_ssls_load(struct OperationConfig *config, c = memchr(line, ':', strlen(line)); if(!c) { - warnf(global, "unrecognized line %d in ssl session file %s", - i, filename); + warnf("unrecognized line %d in ssl session file %s", i, filename); continue; } *c = '\0'; r = curlx_base64_decode(line, &shmac, &shmac_len); if(r) { - warnf(global, "invalid shmax base64 encoding in line %d", i); + warnf("invalid shmax base64 encoding in line %d", i); continue; } line = c + 1; @@ -105,13 +102,13 @@ CURLcode tool_ssls_load(struct OperationConfig *config, } r = curlx_base64_decode(line, &sdata, &sdata_len); if(r) { - warnf(global, "invalid sdata base64 encoding in line %d: %s", i, line); + warnf("invalid sdata base64 encoding in line %d: %s", i, line); continue; } r = curl_easy_ssls_import(easy, NULL, shmac, shmac_len, sdata, sdata_len); if(r) { - warnf(global, "import of session from line %d rejected(%d)", i, r); + warnf("import of session from line %d rejected(%d)", i, r); continue; } ++imported; @@ -133,7 +130,6 @@ out: } struct tool_ssls_ctx { - struct GlobalConfig *global; FILE *fp; int exported; }; @@ -181,8 +177,7 @@ static CURLcode tool_ssls_exp(CURL *easy, void *userptr, ctx->exported++; out: if(r) - warnf(ctx->global, "Warning: error saving SSL session for '%s': %d", - session_key, r); + warnf("Warning: error saving SSL session for '%s': %d", session_key, r); curl_free(enc); return r; } @@ -194,11 +189,10 @@ CURLcode tool_ssls_save(struct OperationConfig *config, CURL *easy = NULL; CURLcode r = CURLE_OK; - ctx.global = config->global; ctx.exported = 0; ctx.fp = fopen(filename, FOPEN_WRITETEXT); if(!ctx.fp) { - warnf(config->global, "Warning: Failed to create SSL session file %s", + warnf("Warning: Failed to create SSL session file %s", filename); goto out; } |