1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2020, Alexandru Gagniuc <mr.nuke.me@gmail.com>
4 * Copyright (c) 2013, Google Inc.
7 #ifndef _FDT_LIBCRYPTO_H
8 #define _FDT_LIBCRYPTO_H
10 #include <openssl/bn.h>
13 * fdt_add_bignum() - Write a libcrypto BIGNUM as an FDT property
15 * Convert a libcrypto BIGNUM * into a big endian array of integers.
17 * @blob: FDT blob to modify
18 * @noffset: Offset of the FDT node
19 * @prop_name: What to call the property in the FDT
20 * @num: pointer to a libcrypto big number
21 * @num_bits: How big is 'num' in bits?
22 * Return: 0 if all good all working, -ve on horror
24 int fdt_add_bignum(void *blob, int noffset, const char *prop_name,
25 BIGNUM *num, int num_bits);
27 #endif /* _FDT_LIBCRYPTO_H */