X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fp_test.c;h=a730530463b5803397906b641d010cef046ff5ee;hp=15213b6c1d6810644de9cdd9ca99ec6f6f7997fe;hb=261750134865150fe72298fd34dc7214c849b926;hpb=1ccf49737c89cf1b37cfb0de2370f62ef136062e diff --git a/test/p_test.c b/test/p_test.c index 15213b6c1d..a730530463 100644 --- a/test/p_test.c +++ b/test/p_test.c @@ -33,24 +33,24 @@ static OSSL_core_get_param_types_fn *c_get_param_types = NULL; static OSSL_core_get_params_fn *c_get_params = NULL; /* Tell the core what params we provide and what type they are */ -static const OSSL_ITEM p_param_types[] = { - { OSSL_PARAM_UTF8_STRING, "greeting" }, - { 0, NULL } +static const OSSL_PARAM p_param_types[] = { + { "greeting", OSSL_PARAM_UTF8_STRING, NULL, 0, 0 }, + { NULL, 0, NULL, 0, 0 } }; /* This is a trick to ensure we define the provider functions correctly */ static OSSL_provider_get_param_types_fn p_get_param_types; static OSSL_provider_get_params_fn p_get_params; -static const OSSL_ITEM *p_get_param_types(void *_) +static const OSSL_PARAM *p_get_param_types(void *_) { return p_param_types; } -static int p_get_params(void *vprov, const OSSL_PARAM params[]) +static int p_get_params(void *vprov, OSSL_PARAM params[]) { const OSSL_PROVIDER *prov = vprov; - const OSSL_PARAM *p = params; + OSSL_PARAM *p = params; int ok = 1; for (; ok && p->key != NULL; p++) { @@ -58,18 +58,18 @@ static int p_get_params(void *vprov, const OSSL_PARAM params[]) static char *opensslv; static char *provname; static char *greeting; - static const OSSL_PARAM counter_request[] = { + static OSSL_PARAM counter_request[] = { /* Known libcrypto provided parameters */ { "openssl-version", OSSL_PARAM_UTF8_PTR, - &opensslv, sizeof(&opensslv), NULL }, + &opensslv, sizeof(&opensslv), 0 }, { "provider-name", OSSL_PARAM_UTF8_PTR, - &provname, sizeof(&provname), NULL}, + &provname, sizeof(&provname), 0}, /* This might be present, if there's such a configuration */ { "greeting", OSSL_PARAM_UTF8_PTR, - &greeting, sizeof(&greeting), NULL }, + &greeting, sizeof(&greeting), 0 }, - { NULL, 0, NULL, 0, NULL } + { NULL, 0, NULL, 0, 0 } }; char buf[256]; size_t buf_l; @@ -90,9 +90,9 @@ static int p_get_params(void *vprov, const OSSL_PARAM params[]) sprintf(buf, "Howdy stranger..."); } - *p->return_size = buf_l = strlen(buf) + 1; + p->return_size = buf_l = strlen(buf) + 1; if (p->data_size >= buf_l) - strncpy(p->data, buf, buf_l); + strcpy(p->data, buf); else ok = 0; }