control sending nonce

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16996 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-03 18:44:07 +00:00
parent 53da7dba23
commit 2eb3049463

View File

@@ -683,15 +683,21 @@ int
ocsp_fetch(struct ocsp_fetch_options *opt, int argc, char **argv)
{
hx509_certs reqcerts, pool;
heim_octet_string req;
heim_octet_string req, nonce_data, *nonce = &nonce_data;
hx509_lock lock;
int i, ret;
char *file;
const char *url = "/";
memset(&nonce, 0, sizeof(nonce));
hx509_lock_init(context, &lock);
lock_strings(lock, &opt->pass_strings);
/* no nonce */
if (!opt->nonce_flag)
nonce = NULL;
if (opt->url_path_string)
url = opt->url_path_string;
@@ -715,7 +721,7 @@ ocsp_fetch(struct ocsp_fetch_options *opt, int argc, char **argv)
errx(1, "hx509_certs_append: req: %s: %d", argv[i], ret);
}
ret = hx509_ocsp_request(context, reqcerts, pool, NULL, NULL, &req, NULL);
ret = hx509_ocsp_request(context, reqcerts, pool, NULL, NULL, &req, nonce);
if (ret)
errx(1, "hx509_ocsp_request: req: %d", ret);
@@ -737,6 +743,9 @@ ocsp_fetch(struct ocsp_fetch_options *opt, int argc, char **argv)
fclose(f);
}
if (nonce)
free_octet_string(nonce);
return 0;
}