Latest update.
This commit is contained in:
+5
-10
@@ -11,6 +11,7 @@
|
||||
#include <string.h>
|
||||
#include <openssl/params.h>
|
||||
#include "internal/thread_once.h"
|
||||
#include "internal/numbers.h"
|
||||
|
||||
OSSL_PARAM *OSSL_PARAM_locate(OSSL_PARAM *p, const char *key)
|
||||
{
|
||||
@@ -582,13 +583,6 @@ OSSL_PARAM OSSL_PARAM_construct_size_t(const char *key, size_t *buf)
|
||||
sizeof(size_t));
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
/*
|
||||
* TODO(3.0): Make this available in FIPS mode.
|
||||
*
|
||||
* Temporarily we don't include these functions in FIPS mode to avoid pulling
|
||||
* in the entire BN sub-library into the module at this point.
|
||||
*/
|
||||
int OSSL_PARAM_get_BN(const OSSL_PARAM *p, BIGNUM **val)
|
||||
{
|
||||
BIGNUM *b;
|
||||
@@ -632,7 +626,6 @@ OSSL_PARAM OSSL_PARAM_construct_BN(const char *key, unsigned char *buf,
|
||||
return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER,
|
||||
buf, bsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
int OSSL_PARAM_get_double(const OSSL_PARAM *p, double *val)
|
||||
{
|
||||
@@ -693,7 +686,7 @@ int OSSL_PARAM_set_double(OSSL_PARAM *p, double val)
|
||||
return 1;
|
||||
}
|
||||
} else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER
|
||||
&& val == (uintmax_t)val) {
|
||||
&& val == (ossl_uintmax_t)val) {
|
||||
p->return_size = sizeof(double);
|
||||
switch (p->data_size) {
|
||||
case sizeof(uint32_t):
|
||||
@@ -710,7 +703,7 @@ int OSSL_PARAM_set_double(OSSL_PARAM *p, double val)
|
||||
return 1;
|
||||
}
|
||||
break; }
|
||||
} else if (p->data_type == OSSL_PARAM_INTEGER && val == (intmax_t)val) {
|
||||
} else if (p->data_type == OSSL_PARAM_INTEGER && val == (ossl_intmax_t)val) {
|
||||
p->return_size = sizeof(double);
|
||||
switch (p->data_size) {
|
||||
case sizeof(int32_t):
|
||||
@@ -815,6 +808,8 @@ int OSSL_PARAM_set_octet_string(OSSL_PARAM *p, const void *val,
|
||||
OSSL_PARAM OSSL_PARAM_construct_utf8_string(const char *key, char *buf,
|
||||
size_t bsize)
|
||||
{
|
||||
if (buf != NULL && bsize == 0)
|
||||
bsize = strlen(buf) + 1;
|
||||
return ossl_param_construct(key, OSSL_PARAM_UTF8_STRING, buf, bsize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user