5 DER_w_boolean, DER_w_ulong, DER_w_bn, DER_w_null
6 - internal DER writers for DER primitives
10 #include "internal/der.h"
12 int DER_w_boolean(WPACKET *pkt, int tag, int b);
13 int DER_w_ulong(WPACKET *pkt, int tag, unsigned long v);
14 int DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v);
15 int DER_w_null(WPACKET *pkt, int tag);
19 All functions described here behave the same way, they prepend
20 (remember that DER writers are used backwards) the DER encoding of
21 their respective value to the already written output buffer held by
24 DER_w_boolean() writes the primitive BOOLEAN using the value I<b>.
25 Any value that evaluates as true will render a B<true> BOOLEAN,
26 otherwise a B<false> BOOLEAN.
28 DER_w_ulong() and DER_w_bn() both write the primitive INTEGER using
31 =for comment Other similar functions for diverse C integers should be
34 DER_w_null() writes the primitive NULL.
38 All the functions return 1 on success and 0 on failure. Failure may
39 mean that the buffer held by the I<pkt> is too small, but may also
40 mean that the values given to the functions are invalid, such as the provided
41 I<tag> value being too large for the implementation.
49 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
51 Licensed under the Apache License 2.0 (the "License"). You may not use
52 this file except in compliance with the License. You can obtain a copy
53 in the file LICENSE in the source distribution or at
54 L<https://www.openssl.org/source/license.html>.