diff options
author | schwarze <> | 2015-02-14 14:09:01 +0000 |
---|---|---|
committer | schwarze <> | 2015-02-14 14:09:01 +0000 |
commit | 88853a20be023939d14cfde9e86a81bfcc75ef7b (patch) | |
tree | 14e96de4625e6c5d8612c27a513ebf5ed519b352 /src/lib/libssl | |
parent | 948b14a55ded39aea589e34e23c19085fd99cac5 (diff) | |
download | openbsd-88853a20be023939d14cfde9e86a81bfcc75ef7b.tar.gz openbsd-88853a20be023939d14cfde9e86a81bfcc75ef7b.tar.bz2 openbsd-88853a20be023939d14cfde9e86a81bfcc75ef7b.zip |
second batch of perlpod(1) to mdoc(7) conversion
Diffstat (limited to 'src/lib/libssl')
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BF_set_key.pod | 107 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO.pod | 54 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_ctrl.pod | 128 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_f_base64.pod | 80 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod | 77 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod | 71 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_f_md.pod | 146 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_f_null.pod | 30 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_find_type.pod | 97 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_new.pod | 64 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO_new_CMS.pod | 66 |
11 files changed, 0 insertions, 920 deletions
diff --git a/src/lib/libssl/src/doc/crypto/BF_set_key.pod b/src/lib/libssl/src/doc/crypto/BF_set_key.pod deleted file mode 100644 index 7d2d96fc45..0000000000 --- a/src/lib/libssl/src/doc/crypto/BF_set_key.pod +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BF_set_key, BF_encrypt, BF_decrypt, BF_ecb_encrypt, BF_cbc_encrypt, | ||
6 | BF_cfb64_encrypt, BF_ofb64_encrypt, BF_options - Blowfish encryption | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | #include <openssl/blowfish.h> | ||
11 | |||
12 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); | ||
13 | |||
14 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, | ||
15 | BF_KEY *key, int enc); | ||
16 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, | ||
17 | long length, BF_KEY *schedule, unsigned char *ivec, int enc); | ||
18 | void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, | ||
19 | long length, BF_KEY *schedule, unsigned char *ivec, int *num, | ||
20 | int enc); | ||
21 | void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, | ||
22 | long length, BF_KEY *schedule, unsigned char *ivec, int *num); | ||
23 | const char *BF_options(void); | ||
24 | |||
25 | void BF_encrypt(BF_LONG *data,const BF_KEY *key); | ||
26 | void BF_decrypt(BF_LONG *data,const BF_KEY *key); | ||
27 | |||
28 | =head1 DESCRIPTION | ||
29 | |||
30 | This library implements the Blowfish cipher, which was invented and described | ||
31 | by Counterpane (see http://www.counterpane.com/blowfish.html ). | ||
32 | |||
33 | Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data. | ||
34 | It uses a variable size key, but typically, 128 bit (16 byte) keys are | ||
35 | considered good for strong encryption. Blowfish can be used in the same | ||
36 | modes as DES (see L<des_modes(7)|des_modes(7)>). Blowfish is currently one | ||
37 | of the faster block ciphers. It is quite a bit faster than DES, and much | ||
38 | faster than IDEA or RC2. | ||
39 | |||
40 | Blowfish consists of a key setup phase and the actual encryption or decryption | ||
41 | phase. | ||
42 | |||
43 | BF_set_key() sets up the B<BF_KEY> B<key> using the B<len> bytes long key | ||
44 | at B<data>. | ||
45 | |||
46 | BF_ecb_encrypt() is the basic Blowfish encryption and decryption function. | ||
47 | It encrypts or decrypts the first 64 bits of B<in> using the key B<key>, | ||
48 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) | ||
49 | or decryption (B<BF_DECRYPT>) shall be performed. The vector pointed at by | ||
50 | B<in> and B<out> must be 64 bits in length, no less. If they are larger, | ||
51 | everything after the first 64 bits is ignored. | ||
52 | |||
53 | The mode functions BF_cbc_encrypt(), BF_cfb64_encrypt() and BF_ofb64_encrypt() | ||
54 | all operate on variable length data. They all take an initialization vector | ||
55 | B<ivec> which needs to be passed along into the next call of the same function | ||
56 | for the same message. B<ivec> may be initialized with anything, but the | ||
57 | recipient needs to know what it was initialized with, or it won't be able | ||
58 | to decrypt. Some programs and protocols simplify this, like SSH, where | ||
59 | B<ivec> is simply initialized to zero. | ||
60 | BF_cbc_encrypt() operates on data that is a multiple of 8 bytes long, while | ||
61 | BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable | ||
62 | number of bytes (the amount does not have to be an exact multiple of 8). The | ||
63 | purpose of the latter two is to simulate stream ciphers, and therefore, they | ||
64 | need the parameter B<num>, which is a pointer to an integer where the current | ||
65 | offset in B<ivec> is stored between calls. This integer must be initialized | ||
66 | to zero when B<ivec> is initialized. | ||
67 | |||
68 | BF_cbc_encrypt() is the Cipher Block Chaining function for Blowfish. It | ||
69 | encrypts or decrypts the 64 bits chunks of B<in> using the key B<schedule>, | ||
70 | putting the result in B<out>. B<enc> decides if encryption (BF_ENCRYPT) or | ||
71 | decryption (BF_DECRYPT) shall be performed. B<ivec> must point at an 8 byte | ||
72 | long initialization vector. | ||
73 | |||
74 | BF_cfb64_encrypt() is the CFB mode for Blowfish with 64 bit feedback. | ||
75 | It encrypts or decrypts the bytes in B<in> using the key B<schedule>, | ||
76 | putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>) | ||
77 | or decryption (B<BF_DECRYPT>) shall be performed. B<ivec> must point at an | ||
78 | 8 byte long initialization vector. B<num> must point at an integer which must | ||
79 | be initially zero. | ||
80 | |||
81 | BF_ofb64_encrypt() is the OFB mode for Blowfish with 64 bit feedback. | ||
82 | It uses the same parameters as BF_cfb64_encrypt(), which must be initialized | ||
83 | the same way. | ||
84 | |||
85 | BF_encrypt() and BF_decrypt() are the lowest level functions for Blowfish | ||
86 | encryption. They encrypt/decrypt the first 64 bits of the vector pointed by | ||
87 | B<data>, using the key B<key>. These functions should not be used unless you | ||
88 | implement 'modes' of Blowfish. The alternative is to use BF_ecb_encrypt(). | ||
89 | If you still want to use these functions, you should be aware that they take | ||
90 | each 32-bit chunk in host-byte order, which is little-endian on little-endian | ||
91 | platforms and big-endian on big-endian ones. | ||
92 | |||
93 | =head1 RETURN VALUES | ||
94 | |||
95 | None of the functions presented here return any value. | ||
96 | |||
97 | =head1 NOTE | ||
98 | |||
99 | Applications should use the higher level functions | ||
100 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> etc. instead of calling the | ||
101 | blowfish functions directly. | ||
102 | |||
103 | =head1 HISTORY | ||
104 | |||
105 | The Blowfish functions are available in all versions of SSLeay and OpenSSL. | ||
106 | |||
107 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO.pod b/src/lib/libssl/src/doc/crypto/BIO.pod deleted file mode 100644 index f01ced7d8e..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO.pod +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | bio - I/O abstraction | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/bio.h> | ||
10 | |||
11 | |||
12 | =head1 DESCRIPTION | ||
13 | |||
14 | A BIO is an I/O abstraction, it hides many of the underlying I/O | ||
15 | details from an application. If an application uses a BIO for its | ||
16 | I/O it can transparently handle SSL connections, unencrypted network | ||
17 | connections and file I/O. | ||
18 | |||
19 | There are two type of BIO, a source/sink BIO and a filter BIO. | ||
20 | |||
21 | As its name implies a source/sink BIO is a source and/or sink of data, | ||
22 | examples include a socket BIO and a file BIO. | ||
23 | |||
24 | A filter BIO takes data from one BIO and passes it through to | ||
25 | another, or the application. The data may be left unmodified (for | ||
26 | example a message digest BIO) or translated (for example an | ||
27 | encryption BIO). The effect of a filter BIO may change according | ||
28 | to the I/O operation it is performing: for example an encryption | ||
29 | BIO will encrypt data if it is being written to and decrypt data | ||
30 | if it is being read from. | ||
31 | |||
32 | BIOs can be joined together to form a chain (a single BIO is a chain | ||
33 | with one component). A chain normally consist of one source/sink | ||
34 | BIO and one or more filter BIOs. Data read from or written to the | ||
35 | first BIO then traverses the chain to the end (normally a source/sink | ||
36 | BIO). | ||
37 | |||
38 | =head1 SEE ALSO | ||
39 | |||
40 | L<BIO_ctrl(3)|BIO_ctrl(3)>, | ||
41 | L<BIO_f_base64(3)|BIO_f_base64(3)>, L<BIO_f_buffer(3)|BIO_f_buffer(3)>, | ||
42 | L<BIO_f_cipher(3)|BIO_f_cipher(3)>, L<BIO_f_md(3)|BIO_f_md(3)>, | ||
43 | L<BIO_f_null(3)|BIO_f_null(3)>, L<BIO_f_ssl(3)|BIO_f_ssl(3)>, | ||
44 | L<BIO_find_type(3)|BIO_find_type(3)>, L<BIO_new(3)|BIO_new(3)>, | ||
45 | L<BIO_new_bio_pair(3)|BIO_new_bio_pair(3)>, | ||
46 | L<BIO_push(3)|BIO_push(3)>, L<BIO_read(3)|BIO_read(3)>, | ||
47 | L<BIO_s_accept(3)|BIO_s_accept(3)>, L<BIO_s_bio(3)|BIO_s_bio(3)>, | ||
48 | L<BIO_s_connect(3)|BIO_s_connect(3)>, L<BIO_s_fd(3)|BIO_s_fd(3)>, | ||
49 | L<BIO_s_file(3)|BIO_s_file(3)>, L<BIO_s_mem(3)|BIO_s_mem(3)>, | ||
50 | L<BIO_s_null(3)|BIO_s_null(3)>, L<BIO_s_socket(3)|BIO_s_socket(3)>, | ||
51 | L<BIO_set_callback(3)|BIO_set_callback(3)>, | ||
52 | L<BIO_should_retry(3)|BIO_should_retry(3)> | ||
53 | |||
54 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_ctrl.pod b/src/lib/libssl/src/doc/crypto/BIO_ctrl.pod deleted file mode 100644 index 2271e52c9e..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_ctrl.pod +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset, | ||
6 | BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close, | ||
7 | BIO_pending, BIO_wpending, BIO_ctrl_pending, BIO_ctrl_wpending, | ||
8 | BIO_get_info_callback, BIO_set_info_callback - BIO control operations | ||
9 | |||
10 | =head1 SYNOPSIS | ||
11 | |||
12 | #include <openssl/bio.h> | ||
13 | |||
14 | long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); | ||
15 | long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, | ||
16 | const char *, int, long, long)); | ||
17 | char * BIO_ptr_ctrl(BIO *bp,int cmd,long larg); | ||
18 | long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg); | ||
19 | |||
20 | int BIO_reset(BIO *b); | ||
21 | int BIO_seek(BIO *b, int ofs); | ||
22 | int BIO_tell(BIO *b); | ||
23 | int BIO_flush(BIO *b); | ||
24 | int BIO_eof(BIO *b); | ||
25 | int BIO_set_close(BIO *b,long flag); | ||
26 | int BIO_get_close(BIO *b); | ||
27 | int BIO_pending(BIO *b); | ||
28 | int BIO_wpending(BIO *b); | ||
29 | size_t BIO_ctrl_pending(BIO *b); | ||
30 | size_t BIO_ctrl_wpending(BIO *b); | ||
31 | |||
32 | int BIO_get_info_callback(BIO *b,bio_info_cb **cbp); | ||
33 | int BIO_set_info_callback(BIO *b,bio_info_cb *cb); | ||
34 | |||
35 | typedef void bio_info_cb(BIO *b, int oper, const char *ptr, int arg1, | ||
36 | long arg2, long arg3); | ||
37 | |||
38 | =head1 DESCRIPTION | ||
39 | |||
40 | BIO_ctrl(), BIO_callback_ctrl(), BIO_ptr_ctrl() and BIO_int_ctrl() | ||
41 | are BIO "control" operations taking arguments of various types. | ||
42 | These functions are not normally called directly, various macros | ||
43 | are used instead. The standard macros are described below, macros | ||
44 | specific to a particular type of BIO are described in the specific | ||
45 | BIOs manual page as well as any special features of the standard | ||
46 | calls. | ||
47 | |||
48 | BIO_reset() typically resets a BIO to some initial state, in the case | ||
49 | of file related BIOs for example it rewinds the file pointer to the | ||
50 | start of the file. | ||
51 | |||
52 | BIO_seek() resets a file related BIO's (that is file descriptor and | ||
53 | FILE BIOs) file position pointer to B<ofs> bytes from start of file. | ||
54 | |||
55 | BIO_tell() returns the current file position of a file related BIO. | ||
56 | |||
57 | BIO_flush() normally writes out any internally buffered data, in some | ||
58 | cases it is used to signal EOF and that no more data will be written. | ||
59 | |||
60 | BIO_eof() returns 1 if the BIO has read EOF, the precise meaning of | ||
61 | "EOF" varies according to the BIO type. | ||
62 | |||
63 | BIO_set_close() sets the BIO B<b> close flag to B<flag>. B<flag> can | ||
64 | take the value BIO_CLOSE or BIO_NOCLOSE. Typically BIO_CLOSE is used | ||
65 | in a source/sink BIO to indicate that the underlying I/O stream should | ||
66 | be closed when the BIO is freed. | ||
67 | |||
68 | BIO_get_close() returns the BIOs close flag. | ||
69 | |||
70 | BIO_pending(), BIO_ctrl_pending(), BIO_wpending() and BIO_ctrl_wpending() | ||
71 | return the number of pending characters in the BIOs read and write buffers. | ||
72 | Not all BIOs support these calls. BIO_ctrl_pending() and BIO_ctrl_wpending() | ||
73 | return a size_t type and are functions, BIO_pending() and BIO_wpending() are | ||
74 | macros which call BIO_ctrl(). | ||
75 | |||
76 | =head1 RETURN VALUES | ||
77 | |||
78 | BIO_reset() normally returns 1 for success and 0 or -1 for failure. File | ||
79 | BIOs are an exception, they return 0 for success and -1 for failure. | ||
80 | |||
81 | BIO_seek() and BIO_tell() both return the current file position on success | ||
82 | and -1 for failure, except file BIOs which for BIO_seek() always return 0 | ||
83 | for success and -1 for failure. | ||
84 | |||
85 | BIO_flush() returns 1 for success and 0 or -1 for failure. | ||
86 | |||
87 | BIO_eof() returns 1 if EOF has been reached 0 otherwise. | ||
88 | |||
89 | BIO_set_close() always returns 1. | ||
90 | |||
91 | BIO_get_close() returns the close flag value: BIO_CLOSE or BIO_NOCLOSE. | ||
92 | |||
93 | BIO_pending(), BIO_ctrl_pending(), BIO_wpending() and BIO_ctrl_wpending() | ||
94 | return the amount of pending data. | ||
95 | |||
96 | =head1 NOTES | ||
97 | |||
98 | BIO_flush(), because it can write data may return 0 or -1 indicating | ||
99 | that the call should be retried later in a similar manner to BIO_write(). | ||
100 | The BIO_should_retry() call should be used and appropriate action taken | ||
101 | is the call fails. | ||
102 | |||
103 | The return values of BIO_pending() and BIO_wpending() may not reliably | ||
104 | determine the amount of pending data in all cases. For example in the | ||
105 | case of a file BIO some data may be available in the FILE structures | ||
106 | internal buffers but it is not possible to determine this in a | ||
107 | portably way. For other types of BIO they may not be supported. | ||
108 | |||
109 | Filter BIOs if they do not internally handle a particular BIO_ctrl() | ||
110 | operation usually pass the operation to the next BIO in the chain. | ||
111 | This often means there is no need to locate the required BIO for | ||
112 | a particular operation, it can be called on a chain and it will | ||
113 | be automatically passed to the relevant BIO. However this can cause | ||
114 | unexpected results: for example no current filter BIOs implement | ||
115 | BIO_seek(), but this may still succeed if the chain ends in a FILE | ||
116 | or file descriptor BIO. | ||
117 | |||
118 | Source/sink BIOs return an 0 if they do not recognize the BIO_ctrl() | ||
119 | operation. | ||
120 | |||
121 | =head1 BUGS | ||
122 | |||
123 | Some of the return values are ambiguous and care should be taken. In | ||
124 | particular a return value of 0 can be returned if an operation is not | ||
125 | supported, if an error occurred, if EOF has not been reached and in | ||
126 | the case of BIO_seek() on a file BIO for a successful operation. | ||
127 | |||
128 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod b/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod deleted file mode 100644 index c1c3137d5e..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_f_base64.pod +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_f_base64 - base64 BIO filter | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/bio.h> | ||
10 | #include <openssl/evp.h> | ||
11 | |||
12 | BIO_METHOD * BIO_f_base64(void); | ||
13 | |||
14 | =head1 DESCRIPTION | ||
15 | |||
16 | BIO_f_base64() returns the base64 BIO method. This is a filter | ||
17 | BIO that base64 encodes any data written through it and decodes | ||
18 | any data read through it. | ||
19 | |||
20 | Base64 BIOs do not support BIO_gets() or BIO_puts(). | ||
21 | |||
22 | BIO_flush() on a base64 BIO that is being written through is | ||
23 | used to signal that no more data is to be encoded: this is used | ||
24 | to flush the final block through the BIO. | ||
25 | |||
26 | The flag BIO_FLAGS_BASE64_NO_NL can be set with BIO_set_flags() | ||
27 | to encode the data all on one line or expect the data to be all | ||
28 | on one line. | ||
29 | |||
30 | =head1 NOTES | ||
31 | |||
32 | Because of the format of base64 encoding the end of the encoded | ||
33 | block cannot always be reliably determined. | ||
34 | |||
35 | =head1 RETURN VALUES | ||
36 | |||
37 | BIO_f_base64() returns the base64 BIO method. | ||
38 | |||
39 | =head1 EXAMPLES | ||
40 | |||
41 | Base64 encode the string "Hello World\n" and write the result | ||
42 | to standard output: | ||
43 | |||
44 | BIO *bio, *b64; | ||
45 | char message[] = "Hello World \n"; | ||
46 | |||
47 | b64 = BIO_new(BIO_f_base64()); | ||
48 | bio = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
49 | BIO_push(b64, bio); | ||
50 | BIO_write(b64, message, strlen(message)); | ||
51 | BIO_flush(b64); | ||
52 | |||
53 | BIO_free_all(b64); | ||
54 | |||
55 | Read Base64 encoded data from standard input and write the decoded | ||
56 | data to standard output: | ||
57 | |||
58 | BIO *bio, *b64, *bio_out; | ||
59 | char inbuf[512]; | ||
60 | int inlen; | ||
61 | |||
62 | b64 = BIO_new(BIO_f_base64()); | ||
63 | bio = BIO_new_fp(stdin, BIO_NOCLOSE); | ||
64 | bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
65 | BIO_push(b64, bio); | ||
66 | while((inlen = BIO_read(b64, inbuf, 512)) > 0) | ||
67 | BIO_write(bio_out, inbuf, inlen); | ||
68 | |||
69 | BIO_flush(bio_out); | ||
70 | BIO_free_all(b64); | ||
71 | |||
72 | =head1 BUGS | ||
73 | |||
74 | The ambiguity of EOF in base64 encoded data can cause additional | ||
75 | data following the base64 encoded block to be misinterpreted. | ||
76 | |||
77 | There should be some way of specifying a test that the BIO can perform | ||
78 | to reliably determine EOF (for example a MIME boundary). | ||
79 | |||
80 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod b/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod deleted file mode 100644 index f4ddd3a2cf..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_f_buffer - buffering BIO | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/bio.h> | ||
10 | |||
11 | BIO_METHOD * BIO_f_buffer(void); | ||
12 | |||
13 | #define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL) | ||
14 | #define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0) | ||
15 | #define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1) | ||
16 | #define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL) | ||
17 | #define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf) | ||
18 | |||
19 | =head1 DESCRIPTION | ||
20 | |||
21 | BIO_f_buffer() returns the buffering BIO method. | ||
22 | |||
23 | Data written to a buffering BIO is buffered and periodically written | ||
24 | to the next BIO in the chain. Data read from a buffering BIO comes from | ||
25 | an internal buffer which is filled from the next BIO in the chain. | ||
26 | Both BIO_gets() and BIO_puts() are supported. | ||
27 | |||
28 | Calling BIO_reset() on a buffering BIO clears any buffered data. | ||
29 | |||
30 | BIO_get_buffer_num_lines() returns the number of lines currently buffered. | ||
31 | |||
32 | BIO_set_read_buffer_size(), BIO_set_write_buffer_size() and | ||
33 | BIO_set_buffer_size() set the read, write or both read and write buffer sizes | ||
34 | to B<size>. The initial buffer size is DEFAULT_BUFFER_SIZE, currently 4096. Any | ||
35 | attempt to reduce the buffer size below DEFAULT_BUFFER_SIZE is ignored. Any | ||
36 | buffered data is cleared when the buffer is resized. | ||
37 | |||
38 | BIO_set_buffer_read_data() clears the read buffer and fills it with B<num> | ||
39 | bytes of B<buf>. If B<num> is larger than the current buffer size the buffer | ||
40 | is expanded. | ||
41 | |||
42 | =head1 NOTES | ||
43 | |||
44 | Buffering BIOs implement BIO_gets() by using BIO_read() operations on the | ||
45 | next BIO in the chain. By prepending a buffering BIO to a chain it is therefore | ||
46 | possible to provide BIO_gets() functionality if the following BIOs do not | ||
47 | support it (for example SSL BIOs). | ||
48 | |||
49 | Data is only written to the next BIO in the chain when the write buffer fills | ||
50 | or when BIO_flush() is called. It is therefore important to call BIO_flush() | ||
51 | whenever any pending data should be written such as when removing a buffering | ||
52 | BIO using BIO_pop(). BIO_flush() may need to be retried if the ultimate | ||
53 | source/sink BIO is non blocking. | ||
54 | |||
55 | =head1 RETURN VALUES | ||
56 | |||
57 | BIO_f_buffer() returns the buffering BIO method. | ||
58 | |||
59 | BIO_get_buffer_num_lines() returns the number of lines buffered (may be 0). | ||
60 | |||
61 | BIO_set_read_buffer_size(), BIO_set_write_buffer_size() and | ||
62 | BIO_set_buffer_size() return 1 if the buffer was successfully resized or 0 for | ||
63 | failure. | ||
64 | |||
65 | BIO_set_buffer_read_data() returns 1 if the data was set correctly or 0 if | ||
66 | there was an error. | ||
67 | |||
68 | =head1 SEE ALSO | ||
69 | |||
70 | L<BIO(3)|BIO(3)>, | ||
71 | L<BIO_reset(3)|BIO_reset(3)>, | ||
72 | L<BIO_flush(3)|BIO_flush(3)>, | ||
73 | L<BIO_pop(3)|BIO_pop(3)>, | ||
74 | L<BIO_ctrl(3)|BIO_ctrl(3)>, | ||
75 | L<BIO_int_ctrl(3)|BIO_ctrl(3)> | ||
76 | |||
77 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod b/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod deleted file mode 100644 index 0afd30fb2a..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - | ||
6 | cipher BIO filter | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | #include <openssl/bio.h> | ||
11 | #include <openssl/evp.h> | ||
12 | |||
13 | BIO_METHOD * BIO_f_cipher(void); | ||
14 | void BIO_set_cipher(BIO *b,const EVP_CIPHER *cipher, | ||
15 | unsigned char *key, unsigned char *iv, int enc); | ||
16 | int BIO_get_cipher_status(BIO *b) | ||
17 | int BIO_get_cipher_ctx(BIO *b, EVP_CIPHER_CTX **pctx) | ||
18 | |||
19 | =head1 DESCRIPTION | ||
20 | |||
21 | BIO_f_cipher() returns the cipher BIO method. This is a filter | ||
22 | BIO that encrypts any data written through it, and decrypts any data | ||
23 | read from it. It is a BIO wrapper for the cipher routines | ||
24 | EVP_CipherInit(), EVP_CipherUpdate() and EVP_CipherFinal(). | ||
25 | |||
26 | Cipher BIOs do not support BIO_gets() or BIO_puts(). | ||
27 | |||
28 | BIO_flush() on an encryption BIO that is being written through is | ||
29 | used to signal that no more data is to be encrypted: this is used | ||
30 | to flush and possibly pad the final block through the BIO. | ||
31 | |||
32 | BIO_set_cipher() sets the cipher of BIO B<b> to B<cipher> using key B<key> | ||
33 | and IV B<iv>. B<enc> should be set to 1 for encryption and zero for | ||
34 | decryption. | ||
35 | |||
36 | When reading from an encryption BIO the final block is automatically | ||
37 | decrypted and checked when EOF is detected. BIO_get_cipher_status() | ||
38 | is a BIO_ctrl() macro which can be called to determine whether the | ||
39 | decryption operation was successful. | ||
40 | |||
41 | BIO_get_cipher_ctx() is a BIO_ctrl() macro which retrieves the internal | ||
42 | BIO cipher context. The retrieved context can be used in conjunction | ||
43 | with the standard cipher routines to set it up. This is useful when | ||
44 | BIO_set_cipher() is not flexible enough for the applications needs. | ||
45 | |||
46 | =head1 NOTES | ||
47 | |||
48 | When encrypting BIO_flush() B<must> be called to flush the final block | ||
49 | through the BIO. If it is not then the final block will fail a subsequent | ||
50 | decrypt. | ||
51 | |||
52 | When decrypting an error on the final block is signalled by a zero | ||
53 | return value from the read operation. A successful decrypt followed | ||
54 | by EOF will also return zero for the final read. BIO_get_cipher_status() | ||
55 | should be called to determine if the decrypt was successful. | ||
56 | |||
57 | As always, if BIO_gets() or BIO_puts() support is needed then it can | ||
58 | be achieved by preceding the cipher BIO with a buffering BIO. | ||
59 | |||
60 | =head1 RETURN VALUES | ||
61 | |||
62 | BIO_f_cipher() returns the cipher BIO method. | ||
63 | |||
64 | BIO_set_cipher() does not return a value. | ||
65 | |||
66 | BIO_get_cipher_status() returns 1 for a successful decrypt and 0 | ||
67 | for failure. | ||
68 | |||
69 | BIO_get_cipher_ctx() currently always returns 1. | ||
70 | |||
71 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_md.pod b/src/lib/libssl/src/doc/crypto/BIO_f_md.pod deleted file mode 100644 index 37041d9206..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_f_md.pod +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx - message digest BIO filter | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/bio.h> | ||
10 | #include <openssl/evp.h> | ||
11 | |||
12 | BIO_METHOD * BIO_f_md(void); | ||
13 | int BIO_set_md(BIO *b,EVP_MD *md); | ||
14 | int BIO_get_md(BIO *b,EVP_MD **mdp); | ||
15 | int BIO_get_md_ctx(BIO *b,EVP_MD_CTX **mdcp); | ||
16 | |||
17 | =head1 DESCRIPTION | ||
18 | |||
19 | BIO_f_md() returns the message digest BIO method. This is a filter | ||
20 | BIO that digests any data passed through it, it is a BIO wrapper | ||
21 | for the digest routines EVP_DigestInit(), EVP_DigestUpdate() | ||
22 | and EVP_DigestFinal(). | ||
23 | |||
24 | Any data written or read through a digest BIO using BIO_read() and | ||
25 | BIO_write() is digested. | ||
26 | |||
27 | BIO_gets(), if its B<size> parameter is large enough finishes the | ||
28 | digest calculation and returns the digest value. BIO_puts() is | ||
29 | not supported. | ||
30 | |||
31 | BIO_reset() reinitialises a digest BIO. | ||
32 | |||
33 | BIO_set_md() sets the message digest of BIO B<b> to B<md>: this | ||
34 | must be called to initialize a digest BIO before any data is | ||
35 | passed through it. It is a BIO_ctrl() macro. | ||
36 | |||
37 | BIO_get_md() places the a pointer to the digest BIOs digest method | ||
38 | in B<mdp>, it is a BIO_ctrl() macro. | ||
39 | |||
40 | BIO_get_md_ctx() returns the digest BIOs context into B<mdcp>. | ||
41 | |||
42 | =head1 NOTES | ||
43 | |||
44 | The context returned by BIO_get_md_ctx() can be used in calls | ||
45 | to EVP_DigestFinal() and also the signature routines EVP_SignFinal() | ||
46 | and EVP_VerifyFinal(). | ||
47 | |||
48 | The context returned by BIO_get_md_ctx() is an internal context | ||
49 | structure. Changes made to this context will affect the digest | ||
50 | BIO itself and the context pointer will become invalid when the digest | ||
51 | BIO is freed. | ||
52 | |||
53 | After the digest has been retrieved from a digest BIO it must be | ||
54 | reinitialized by calling BIO_reset(), or BIO_set_md() before any more | ||
55 | data is passed through it. | ||
56 | |||
57 | If an application needs to call BIO_gets() or BIO_puts() through | ||
58 | a chain containing digest BIOs then this can be done by prepending | ||
59 | a buffering BIO. | ||
60 | |||
61 | Before OpenSSL 1.0.0 the call to BIO_get_md_ctx() would only work if the BIO | ||
62 | had been initialized for example by calling BIO_set_md() ). In OpenSSL | ||
63 | 1.0.0 and later the context is always returned and the BIO is state is set | ||
64 | to initialized. This allows applications to initialize the context externally | ||
65 | if the standard calls such as BIO_set_md() are not sufficiently flexible. | ||
66 | |||
67 | =head1 RETURN VALUES | ||
68 | |||
69 | BIO_f_md() returns the digest BIO method. | ||
70 | |||
71 | BIO_set_md(), BIO_get_md() and BIO_md_ctx() return 1 for success and | ||
72 | 0 for failure. | ||
73 | |||
74 | =head1 EXAMPLES | ||
75 | |||
76 | The following example creates a BIO chain containing an SHA1 and MD5 | ||
77 | digest BIO and passes the string "Hello World" through it. Error | ||
78 | checking has been omitted for clarity. | ||
79 | |||
80 | BIO *bio, *mdtmp; | ||
81 | const char message[] = "Hello World"; | ||
82 | bio = BIO_new(BIO_s_null()); | ||
83 | mdtmp = BIO_new(BIO_f_md()); | ||
84 | BIO_set_md(mdtmp, EVP_sha1()); | ||
85 | /* | ||
86 | * For BIO_push() we want to append the sink BIO and keep a note of | ||
87 | * the start of the chain. | ||
88 | */ | ||
89 | bio = BIO_push(mdtmp, bio); | ||
90 | mdtmp = BIO_new(BIO_f_md()); | ||
91 | BIO_set_md(mdtmp, EVP_md5()); | ||
92 | bio = BIO_push(mdtmp, bio); | ||
93 | /* Note: mdtmp can now be discarded */ | ||
94 | BIO_write(bio, message, strlen(message)); | ||
95 | |||
96 | The next example digests data by reading through a chain instead: | ||
97 | |||
98 | BIO *bio, *mdtmp; | ||
99 | char buf[1024]; | ||
100 | int rdlen; | ||
101 | |||
102 | bio = BIO_new_file(file, "rb"); | ||
103 | mdtmp = BIO_new(BIO_f_md()); | ||
104 | BIO_set_md(mdtmp, EVP_sha1()); | ||
105 | bio = BIO_push(mdtmp, bio); | ||
106 | mdtmp = BIO_new(BIO_f_md()); | ||
107 | BIO_set_md(mdtmp, EVP_md5()); | ||
108 | bio = BIO_push(mdtmp, bio); | ||
109 | do { | ||
110 | rdlen = BIO_read(bio, buf, sizeof(buf)); | ||
111 | /* Might want to do something with the data here */ | ||
112 | } while (rdlen > 0); | ||
113 | |||
114 | This next example retrieves the message digests from a BIO chain and | ||
115 | outputs them. This could be used with the examples above. | ||
116 | |||
117 | BIO *mdtmp; | ||
118 | unsigned char mdbuf[EVP_MAX_MD_SIZE]; | ||
119 | int mdlen; | ||
120 | int i; | ||
121 | |||
122 | mdtmp = bio; /* Assume bio has previously been set up */ | ||
123 | do { | ||
124 | EVP_MD *md; | ||
125 | mdtmp = BIO_find_type(mdtmp, BIO_TYPE_MD); | ||
126 | if (!mdtmp) | ||
127 | break; | ||
128 | BIO_get_md(mdtmp, &md); | ||
129 | printf("%s digest", OBJ_nid2sn(EVP_MD_type(md))); | ||
130 | mdlen = BIO_gets(mdtmp, mdbuf, EVP_MAX_MD_SIZE); | ||
131 | for(i = 0; i < mdlen; i++) | ||
132 | printf(":%02X", mdbuf[i]); | ||
133 | printf("\n"); | ||
134 | mdtmp = BIO_next(mdtmp); | ||
135 | } while(mdtmp); | ||
136 | BIO_free_all(bio); | ||
137 | |||
138 | =head1 BUGS | ||
139 | |||
140 | The lack of support for BIO_puts() and the non standard behaviour of | ||
141 | BIO_gets() could be regarded as anomalous. It could be argued that BIO_gets() | ||
142 | and BIO_puts() should be passed to the next BIO in the chain and digest | ||
143 | the data passed through and that digests should be retrieved using a | ||
144 | separate BIO_ctrl() call. | ||
145 | |||
146 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_null.pod b/src/lib/libssl/src/doc/crypto/BIO_f_null.pod deleted file mode 100644 index 5ef19968f6..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_f_null.pod +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_f_null - null filter | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/bio.h> | ||
10 | |||
11 | BIO_METHOD * BIO_f_null(void); | ||
12 | |||
13 | =head1 DESCRIPTION | ||
14 | |||
15 | BIO_f_null() returns the null filter BIO method. This is a filter BIO | ||
16 | that does nothing. | ||
17 | |||
18 | All requests to a null filter BIO are passed through to the next BIO in | ||
19 | the chain: this means that a BIO chain containing a null filter BIO | ||
20 | behaves just as though the BIO was not there. | ||
21 | |||
22 | =head1 NOTES | ||
23 | |||
24 | As may be apparent a null filter BIO is not particularly useful. | ||
25 | |||
26 | =head1 RETURN VALUES | ||
27 | |||
28 | BIO_f_null() returns the null filter BIO method. | ||
29 | |||
30 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_find_type.pod b/src/lib/libssl/src/doc/crypto/BIO_find_type.pod deleted file mode 100644 index a57d42f526..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_find_type.pod +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_find_type, BIO_next, BIO_method_type - BIO chain traversal | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/bio.h> | ||
10 | |||
11 | BIO * BIO_find_type(BIO *b,int bio_type); | ||
12 | BIO * BIO_next(BIO *b); | ||
13 | |||
14 | #define BIO_method_type(b) ((b)->method->type) | ||
15 | |||
16 | #define BIO_TYPE_NONE 0 | ||
17 | #define BIO_TYPE_MEM (1|0x0400) | ||
18 | #define BIO_TYPE_FILE (2|0x0400) | ||
19 | |||
20 | #define BIO_TYPE_FD (4|0x0400|0x0100) | ||
21 | #define BIO_TYPE_SOCKET (5|0x0400|0x0100) | ||
22 | #define BIO_TYPE_NULL (6|0x0400) | ||
23 | #define BIO_TYPE_SSL (7|0x0200) | ||
24 | #define BIO_TYPE_MD (8|0x0200) | ||
25 | #define BIO_TYPE_BUFFER (9|0x0200) | ||
26 | #define BIO_TYPE_CIPHER (10|0x0200) | ||
27 | #define BIO_TYPE_BASE64 (11|0x0200) | ||
28 | #define BIO_TYPE_CONNECT (12|0x0400|0x0100) | ||
29 | #define BIO_TYPE_ACCEPT (13|0x0400|0x0100) | ||
30 | #define BIO_TYPE_PROXY_CLIENT (14|0x0200) | ||
31 | #define BIO_TYPE_PROXY_SERVER (15|0x0200) | ||
32 | #define BIO_TYPE_NBIO_TEST (16|0x0200) | ||
33 | #define BIO_TYPE_NULL_FILTER (17|0x0200) | ||
34 | #define BIO_TYPE_BER (18|0x0200) | ||
35 | #define BIO_TYPE_BIO (19|0x0400) | ||
36 | |||
37 | #define BIO_TYPE_DESCRIPTOR 0x0100 | ||
38 | #define BIO_TYPE_FILTER 0x0200 | ||
39 | #define BIO_TYPE_SOURCE_SINK 0x0400 | ||
40 | |||
41 | =head1 DESCRIPTION | ||
42 | |||
43 | The BIO_find_type() searches for a BIO of a given type in a chain, starting | ||
44 | at BIO B<b>. If B<type> is a specific type (such as BIO_TYPE_MEM) then a search | ||
45 | is made for a BIO of that type. If B<type> is a general type (such as | ||
46 | B<BIO_TYPE_SOURCE_SINK>) then the next matching BIO of the given general type is | ||
47 | searched for. BIO_find_type() returns the next matching BIO or NULL if none is | ||
48 | found. | ||
49 | |||
50 | Note: not all the B<BIO_TYPE_*> types above have corresponding BIO | ||
51 | implementations. | ||
52 | |||
53 | BIO_next() returns the next BIO in a chain. It can be used to traverse all BIOs | ||
54 | in a chain or used in conjunction with BIO_find_type() to find all BIOs of a | ||
55 | certain type. | ||
56 | |||
57 | BIO_method_type() returns the type of a BIO. | ||
58 | |||
59 | =head1 RETURN VALUES | ||
60 | |||
61 | BIO_find_type() returns a matching BIO or NULL for no match. | ||
62 | |||
63 | BIO_next() returns the next BIO in a chain. | ||
64 | |||
65 | BIO_method_type() returns the type of the BIO B<b>. | ||
66 | |||
67 | =head1 NOTES | ||
68 | |||
69 | BIO_next() was added to OpenSSL 0.9.6 to provide a 'clean' way to traverse a BIO | ||
70 | chain or find multiple matches using BIO_find_type(). Previous versions had to | ||
71 | use: | ||
72 | |||
73 | next = bio->next_bio; | ||
74 | |||
75 | =head1 BUGS | ||
76 | |||
77 | BIO_find_type() in OpenSSL 0.9.5a and earlier could not be safely passed a | ||
78 | NULL pointer for the B<b> argument. | ||
79 | |||
80 | =head1 EXAMPLE | ||
81 | |||
82 | Traverse a chain looking for digest BIOs: | ||
83 | |||
84 | BIO *btmp; | ||
85 | btmp = in_bio; /* in_bio is chain to search through */ | ||
86 | |||
87 | do { | ||
88 | btmp = BIO_find_type(btmp, BIO_TYPE_MD); | ||
89 | if (btmp == NULL) | ||
90 | break; /* Not found */ | ||
91 | /* btmp is a digest BIO, do something with it ...*/ | ||
92 | ... | ||
93 | |||
94 | btmp = BIO_next(btmp); | ||
95 | } while(btmp); | ||
96 | |||
97 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_new.pod b/src/lib/libssl/src/doc/crypto/BIO_new.pod deleted file mode 100644 index bd7b7381f3..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_new.pod +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_new, BIO_set, BIO_free, BIO_vfree, BIO_free_all - BIO allocation and | ||
6 | freeing functions | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | #include <openssl/bio.h> | ||
11 | |||
12 | BIO * BIO_new(BIO_METHOD *type); | ||
13 | int BIO_set(BIO *a,BIO_METHOD *type); | ||
14 | int BIO_free(BIO *a); | ||
15 | void BIO_vfree(BIO *a); | ||
16 | void BIO_free_all(BIO *a); | ||
17 | |||
18 | =head1 DESCRIPTION | ||
19 | |||
20 | The BIO_new() function returns a new BIO using method B<type>. | ||
21 | |||
22 | BIO_set() sets the method of an already existing BIO. | ||
23 | |||
24 | BIO_free() frees up a single BIO, BIO_vfree() also frees up a single BIO | ||
25 | but it does not return a value. Calling BIO_free() may also have some effect | ||
26 | on the underlying I/O structure, for example it may close the file being | ||
27 | referred to under certain circumstances. For more details see the individual | ||
28 | BIO_METHOD descriptions. | ||
29 | |||
30 | BIO_free_all() frees up an entire BIO chain, it does not halt if an error | ||
31 | occurs freeing up an individual BIO in the chain. | ||
32 | |||
33 | =head1 RETURN VALUES | ||
34 | |||
35 | BIO_new() returns a newly created BIO or NULL if the call fails. | ||
36 | |||
37 | BIO_set(), BIO_free() return 1 for success and 0 for failure. | ||
38 | |||
39 | BIO_free_all() and BIO_vfree() do not return values. | ||
40 | |||
41 | =head1 NOTES | ||
42 | |||
43 | Some BIOs (such as memory BIOs) can be used immediately after calling | ||
44 | BIO_new(). Others (such as file BIOs) need some additional initialization, | ||
45 | and frequently a utility function exists to create and initialize such BIOs. | ||
46 | |||
47 | If BIO_free() is called on a BIO chain it will only free one BIO resulting | ||
48 | in a memory leak. | ||
49 | |||
50 | Calling BIO_free_all() a single BIO has the same effect as calling BIO_free() | ||
51 | on it other than the discarded return value. | ||
52 | |||
53 | Normally the B<type> argument is supplied by a function which returns a | ||
54 | pointer to a BIO_METHOD. There is a naming convention for such functions: | ||
55 | a source/sink BIO is normally called BIO_s_*() and a filter BIO | ||
56 | BIO_f_*(); | ||
57 | |||
58 | =head1 EXAMPLE | ||
59 | |||
60 | Create a memory BIO: | ||
61 | |||
62 | BIO *mem = BIO_new(BIO_s_mem()); | ||
63 | |||
64 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_new_CMS.pod b/src/lib/libssl/src/doc/crypto/BIO_new_CMS.pod deleted file mode 100644 index 9e3a4b7f89..0000000000 --- a/src/lib/libssl/src/doc/crypto/BIO_new_CMS.pod +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | BIO_new_CMS - CMS streaming filter BIO | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/cms.h> | ||
10 | |||
11 | BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); | ||
12 | |||
13 | =head1 DESCRIPTION | ||
14 | |||
15 | BIO_new_CMS() returns a streaming filter BIO chain based on B<cms>. The output | ||
16 | of the filter is written to B<out>. Any data written to the chain is | ||
17 | automatically translated to a BER format CMS structure of the appropriate type. | ||
18 | |||
19 | =head1 NOTES | ||
20 | |||
21 | The chain returned by this function behaves like a standard filter BIO. It | ||
22 | supports non blocking I/O. Content is processed and streamed on the fly and not | ||
23 | all held in memory at once: so it is possible to encode very large structures. | ||
24 | After all content has been written through the chain BIO_flush() must be called | ||
25 | to finalise the structure. | ||
26 | |||
27 | The B<CMS_STREAM> flag must be included in the corresponding B<flags> | ||
28 | parameter of the B<cms> creation function. | ||
29 | |||
30 | If an application wishes to write additional data to B<out> BIOs should be | ||
31 | removed from the chain using BIO_pop() and freed with BIO_free() until B<out> | ||
32 | is reached. If no additional data needs to be written BIO_free_all() can be | ||
33 | called to free up the whole chain. | ||
34 | |||
35 | Any content written through the filter is used verbatim: no canonical | ||
36 | translation is performed. | ||
37 | |||
38 | It is possible to chain multiple BIOs to, for example, create a triple wrapped | ||
39 | signed, enveloped, signed structure. In this case it is the applications | ||
40 | responsibility to set the inner content type of any outer CMS_ContentInfo | ||
41 | structures. | ||
42 | |||
43 | Large numbers of small writes through the chain should be avoided as this will | ||
44 | produce an output consisting of lots of OCTET STRING structures. Prepending | ||
45 | a BIO_f_buffer() buffering BIO will prevent this. | ||
46 | |||
47 | =head1 BUGS | ||
48 | |||
49 | There is currently no corresponding inverse BIO: i.e. one which can decode | ||
50 | a CMS structure on the fly. | ||
51 | |||
52 | =head1 RETURN VALUES | ||
53 | |||
54 | BIO_new_CMS() returns a BIO chain when successful or NULL if an error | ||
55 | occurred. The error can be obtained from ERR_get_error(3). | ||
56 | |||
57 | =head1 SEE ALSO | ||
58 | |||
59 | L<ERR_get_error(3)|ERR_get_error(3)>, L<CMS_sign(3)|CMS_sign(3)>, | ||
60 | L<CMS_encrypt(3)|CMS_encrypt(3)> | ||
61 | |||
62 | =head1 HISTORY | ||
63 | |||
64 | BIO_new_CMS() was added to OpenSSL 1.0.0 | ||
65 | |||
66 | =cut | ||