rsa_mp_coeff_names should only have one entry in it for fips mode.
[openssl.git] / doc / internal / man3 / DER_w_bn.pod
1 =pod
2
3 =head1 NAME
4
5 DER_w_boolean, DER_w_ulong, DER_w_bn, DER_w_null,
6 DER_w_octet_string, DER_w_octet_string_uint32
7 - internal DER writers for DER primitives
8
9 =head1 SYNOPSIS
10
11  #include "internal/der.h"
12
13  int DER_w_boolean(WPACKET *pkt, int tag, int b);
14  int DER_w_ulong(WPACKET *pkt, int tag, unsigned long v);
15  int DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v);
16  int DER_w_null(WPACKET *pkt, int tag);
17  int DER_w_octet_string(WPACKET *pkt, int tag,
18                         const unsigned char *data, size_t data_n);
19  int DER_w_octet_string_uint32(WPACKET *pkt, int tag, uint32_t value);
20
21 =head1 DESCRIPTION
22
23 All functions described here behave the same way, they prepend
24 (remember that DER writers are used backwards) the DER encoding of
25 their respective value to the already written output buffer held by
26 I<pkt>.
27
28 DER_w_boolean() writes the primitive BOOLEAN using the value I<b>.
29 Any value that evaluates as true will render a B<true> BOOLEAN,
30 otherwise a B<false> BOOLEAN.
31
32 DER_w_ulong() and DER_w_bn() both write the primitive INTEGER using
33 the value I<v>.
34
35 =for comment Other similar functions for diverse C integers should be
36 added.
37
38 DER_w_null() writes the primitive NULL.
39
40 DER_w_octet_string() writes the primitive OCTET STRING using the bytes from
41 I<data> with a length of I<data_n>.
42
43 DER_w_octet_string_uint32() writes the primitive OCTET STRING using a 32 bit
44 value in I<value>.
45
46 =head1 RETURN VALUES
47
48 All the functions return 1 on success and 0 on failure.  Failure may
49 mean that the buffer held by the I<pkt> is too small, but may also
50 mean that the values given to the functions are invalid, such as the provided
51 I<tag> value being too large for the implementation.
52
53 =head1 SEE ALSO
54
55 L<DERlib(7)>
56
57 =head1 COPYRIGHT
58
59 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
60
61 Licensed under the Apache License 2.0 (the "License").  You may not use
62 this file except in compliance with the License.  You can obtain a copy
63 in the file LICENSE in the source distribution or at
64 L<https://www.openssl.org/source/license.html>.
65
66 =cut