1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) 2020, Alexandru Gagniuc <mr.nuke.me@gmail.com>
4 * Copyright (c) 2013, Google Inc.
5 */
6
7#ifndef _FDT_LIBCRYPTO_H
8#define _FDT_LIBCRYPTO_H
9
10#include <openssl/bn.h>
11
12/**
13 * fdt_add_bignum() - Write a libcrypto BIGNUM as an FDT property
14 *
15 * Convert a libcrypto BIGNUM * into a big endian array of integers.
16 *
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
23 */
24int fdt_add_bignum(void *blob, int noffset, const char *prop_name,
25		   BIGNUM *num, int num_bits);
26
27#endif /* _FDT_LIBCRYPTO_H */
28