Document the i2o and o2i SCT functions
[openssl.git] / doc / crypto / o2i_SCT_LIST.pod
1 =pod
2
3 =head1 NAME
4
5 o2i_SCT_LIST, i2o_SCT_LIST, o2i_SCT, i2o_SCT, o2i_SCT_signature, i2o_SCT_signature -
6 decode and encode Signed Certificate Timestamp lists in TLS wire format
7
8 =head1 SYNOPSIS
9
10  #include <openssl/ct.h>
11
12  STACK_OF(SCT) *o2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp, size_t len);
13  int i2o_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
14  SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len);
15  int i2o_SCT(const SCT *sct, unsigned char **out);
16  int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len);
17  int i2o_SCT_signature(const SCT *sct, unsigned char **out);
18
19 =head1 DESCRIPTION
20
21 The SCT_LIST and SCT functions are very similar to the i2d and d2i family of
22 functions, except that they convert to and from TLS wire format, as described in
23 RFC 6962. See L<d2i_SCT_LIST> for more information about how the parameters are
24 treated and the return values.
25
26 The SCT_signature functions are less similar. They still convert to and from
27 TLS wire format, but they require that an SCT is provided that the signature is
28 either taken from or inserted into.
29
30 =head1 NOTES
31
32 If an error occurs during a call to o2i_SCT_signature, the SCT may have its
33 signature NID updated but not the signature value.
34
35 =head1 RETURN VALUES
36
37 All of the functions have return values consist with those stated for
38 L<d2i_SCT_LIST>, except o2i_SCT_signature. The o2i_SCT_signature function
39 returns the number of bytes that were parsed, or a negative integer if an error
40 occurs.
41
42 =head1 SEE ALSO
43
44 L<ct(3)>,
45 L(d2i_SCT_LIST(3)>,
46 L(i2d_SCT_LIST(3)>
47
48 =head1 HISTORY
49
50 These functions were added in OpenSSL 1.1.0.
51
52 =head1 COPYRIGHT
53
54 Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
55
56 Licensed under the OpenSSL license (the "License").  You may not use
57 this file except in compliance with the License.  You can obtain a copy
58 in the file LICENSE in the source distribution or at
59 L<https://www.openssl.org/source/license.html>.
60
61 =cut