summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
authorschwarze <>2015-05-24 15:44:52 +0000
committerschwarze <>2015-05-24 15:44:52 +0000
commit4ecb35c8702ae9bf7de323d549724d7f1d436a06 (patch)
treef40277888d65df9cdaf3fcbb7af8a4259f7f36f1 /src/lib/libssl
parent1642fcb0a2cd3851e9b862e7e1d8403ee01bbb38 (diff)
downloadopenbsd-4ecb35c8702ae9bf7de323d549724d7f1d436a06.tar.gz
openbsd-4ecb35c8702ae9bf7de323d549724d7f1d436a06.tar.bz2
openbsd-4ecb35c8702ae9bf7de323d549724d7f1d436a06.zip
Maximilian dot Fillinger at uni-duesseldorf dot de
starts helping with the pod2mdoc(1)-based conversion of LibreSSL crypto manuals from perlpod(1) to mdoc(7). Here comes the first file, slightly tweaked by me.
Diffstat (limited to 'src/lib/libssl')
-rw-r--r--src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod b/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod
deleted file mode 100644
index 2805755869..0000000000
--- a/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod
+++ /dev/null
@@ -1,72 +0,0 @@
1=pod
2
3=head1 NAME
4
5BUF_MEM_new, BUF_MEM_free, BUF_MEM_grow, BUF_strdup - simple
6character arrays structure
7
8=head1 SYNOPSIS
9
10 #include <openssl/buffer.h>
11
12 BUF_MEM *BUF_MEM_new(void);
13
14 void BUF_MEM_free(BUF_MEM *a);
15
16 int BUF_MEM_grow(BUF_MEM *str, size_t len);
17
18 char * BUF_strdup(const char *str);
19
20=head1 DESCRIPTION
21
22The buffer library handles simple character arrays. Buffers are used for
23various purposes in the library, most notably memory BIOs.
24
25The library uses the BUF_MEM structure defined in buffer.h:
26
27 typedef struct buf_mem_st
28 {
29 size_t length; /* current number of bytes */
30 char *data;
31 size_t max; /* size of buffer */
32 } BUF_MEM;
33
34B<length> is the current size of the buffer in bytes, B<max> is the amount of
35memory allocated to the buffer. There are three functions which handle these
36and one "miscellaneous" function.
37
38BUF_MEM_new() allocates a new buffer of zero size.
39
40BUF_MEM_free() frees up an already existing buffer. The data is zeroed
41before freeing up in case the buffer contains sensitive data.
42
43BUF_MEM_grow() changes the size of an already existing buffer to
44B<len>. Any data already in the buffer is preserved if it increases in
45size.
46
47BUF_strdup() copies a null terminated string into a block of allocated memory
48and returns a pointer to the allocated block. Unlike the system strdup()
49function, BUF_strdup() will accept a NULL argument and will return NULL in
50that case. Its use in new programes is discouraged.
51
52The memory allocated from BUF_strdup() should be freed up using the
53free() function.
54
55=head1 RETURN VALUES
56
57BUF_MEM_new() returns the buffer or NULL on error.
58
59BUF_MEM_free() has no return value.
60
61BUF_MEM_grow() returns zero on error or the new size (i.e. B<len>).
62
63=head1 SEE ALSO
64
65L<bio(3)|bio(3)>
66
67=head1 HISTORY
68
69BUF_MEM_new(), BUF_MEM_free() and BUF_MEM_grow() are available in all
70versions of SSLeay and OpenSSL. BUF_strdup() was added in SSLeay 0.8.
71
72=cut