- */
-
- BN_bn2nativepad(tmpbn, buf, buf_n);
-
- /*
- * 2s complement negate, part two.
- *
- * Because we did the first part on the BIGNUM itself, we can just
- * invert all the bytes here and be done with it.
- */
- if (paramdef->data_type == OSSL_PARAM_INTEGER
- && BN_is_negative(tmpbn)) {
- unsigned char *cp;
- size_t i = buf_n;
-
- for (cp = buf; i-- > 0; cp++)
- *cp ^= 0xFF;
- }
- break;
- case OSSL_PARAM_UTF8_STRING:
- strncpy(buf, value, buf_n);
- break;
- case OSSL_PARAM_OCTET_STRING:
- if (ishex) {
- size_t l = 0;
-
- if (!OPENSSL_hexstr2buf_ex(buf, buf_n, &l, value))
- return 0;
- } else {
- memcpy(buf, value, buf_n);
-
+ break;
+ case OSSL_PARAM_UTF8_STRING:
+ strncpy(buf, value, buf_n);
+ break;
+ case OSSL_PARAM_OCTET_STRING:
+ if (ishex) {
+ size_t l = 0;
+
+ if (!OPENSSL_hexstr2buf_ex(buf, buf_n, &l, value))
+ return 0;
+ } else {
+ memcpy(buf, value, buf_n);
+ }
+ break;