summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/man/d2i_SSL_SESSION.336
1 files changed, 17 insertions, 19 deletions
diff --git a/src/lib/libssl/man/d2i_SSL_SESSION.3 b/src/lib/libssl/man/d2i_SSL_SESSION.3
index 64f84e6052..9c5c2285fa 100644
--- a/src/lib/libssl/man/d2i_SSL_SESSION.3
+++ b/src/lib/libssl/man/d2i_SSL_SESSION.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: d2i_SSL_SESSION.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: d2i_SSL_SESSION.3,v 1.6 2018/08/27 15:42:39 jsing Exp $
2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. 4.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
@@ -48,7 +48,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: March 27 2018 $ 51.Dd $Mdocdate: August 27 2018 $
52.Dt D2I_SSL_SESSION 3 52.Dt D2I_SSL_SESSION 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -131,31 +131,29 @@ the memory location pointed to by
131.Fa pp 131.Fa pp
132must be large enough to hold the binary representation of the session. 132must be large enough to hold the binary representation of the session.
133There is no known limit on the size of the created ASN1 representation, 133There is no known limit on the size of the created ASN1 representation,
134so the necessary amount of space should be obtained by first calling 134so call
135.Fn i2d_SSL_SESSION 135.Fn i2d_SSL_SESSION
136with 136first with
137.Fa pp Ns 137.Fa pp Ns = Ns Dv NULL
138= Ns 138to obtain the encoded size, before allocating the required amount of memory and
139.Dv NULL , 139calling
140and obtain the size needed, then allocate the memory and call
141.Fn i2d_SSL_SESSION 140.Fn i2d_SSL_SESSION
142again. 141again.
143Note that this will advance the value contained in 142Note that this will advance the value contained in
144.Fa *pp 143.Fa *pp
145so it is necessary to save a copy of the original allocation. 144so it is necessary to save a copy of the original allocation.
146For example: 145For example:
147.Bd -literal 146.Bd -literal -offset indent
148int i, j; 147char *p, *pp;
148int elen, len;
149 149
150char *p, *temp; 150elen = i2d_SSL_SESSION(sess, NULL);
151 151p = pp = malloc(elen);
152 i = i2d_SSL_SESSION(sess, NULL); 152if (p != NULL) {
153 p = temp = malloc(i); 153 len = i2d_SSL_SESSION(sess, &pp);
154 if (temp != NULL) { 154 assert(elen == len);
155 j = i2d_SSL_SESSION(sess, &temp); 155 assert(p + len == pp);
156 assert(i == j); 156}
157 assert(p + i == temp);
158 }
159.Ed 157.Ed
160.Sh RETURN VALUES 158.Sh RETURN VALUES
161.Fn d2i_SSL_SESSION 159.Fn d2i_SSL_SESSION