diff options
author | mpi <> | 2014-04-16 09:50:10 +0000 |
---|---|---|
committer | mpi <> | 2014-04-16 09:50:10 +0000 |
commit | 27c3c9e543412112b877fdf1f01c5fe54d220138 (patch) | |
tree | 31806a01d35adccbe3db5ef7b8b8875fdd34c5b8 /src | |
parent | f07c2e093541aacc69da893d98de5de30830a555 (diff) | |
download | openbsd-27c3c9e543412112b877fdf1f01c5fe54d220138.tar.gz openbsd-27c3c9e543412112b877fdf1f01c5fe54d220138.tar.bz2 openbsd-27c3c9e543412112b877fdf1f01c5fe54d220138.zip |
Sync the list of man pages for libcrypto, explicity rename conflicting
pages instead of doing it in the Makefiles and move a libssl page where
it belongs.
ok miod@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/doc/DES_set_key.pod (renamed from src/lib/libssl/src/doc/crypto/des.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/ERR.pod (renamed from src/lib/libssl/src/doc/crypto/err.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/HMAC.pod (renamed from src/lib/libssl/src/doc/crypto/hmac.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/MD5.pod (renamed from src/lib/libssl/src/doc/crypto/md5.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/PEM_read_bio_PrivateKey.pod (renamed from src/lib/libssl/src/doc/crypto/pem.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/RAND.pod (renamed from src/lib/libssl/src/doc/crypto/rand.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/RC4.pod (renamed from src/lib/libssl/src/doc/crypto/rc4.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/RIPEMD160.pod (renamed from src/lib/libssl/src/doc/crypto/ripemd.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/doc/SHA1.pod (renamed from src/lib/libssl/src/doc/crypto/sha.pod) | 0 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 132 | ||||
-rw-r--r-- | src/lib/libssl/man/Makefile | 209 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BF_set_key.pod (renamed from src/lib/libssl/src/doc/crypto/blowfish.pod) | 0 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BIO.pod (renamed from src/lib/libssl/src/doc/crypto/bio.pod) | 0 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod (renamed from src/lib/libssl/src/doc/crypto/buffer.pod) | 0 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/CRYPTO_set_locking_callback.pod (renamed from src/lib/libssl/src/doc/crypto/threads.pod) | 0 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/DES_set_key.pod | 358 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/ERR.pod | 187 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/HMAC.pod | 106 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/MD5.pod | 101 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/PEM_read_bio_PrivateKey.pod | 476 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/RAND.pod | 74 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/RC4.pod | 62 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/RIPEMD160.pod | 66 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/crypto/SHA1.pod | 70 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/ssl/BIO_f_ssl.pod (renamed from src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod) | 0 |
25 files changed, 1662 insertions, 179 deletions
diff --git a/src/lib/libssl/src/doc/crypto/des.pod b/src/lib/libcrypto/doc/DES_set_key.pod index 6f0cf1cc5e..6f0cf1cc5e 100644 --- a/src/lib/libssl/src/doc/crypto/des.pod +++ b/src/lib/libcrypto/doc/DES_set_key.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/err.pod b/src/lib/libcrypto/doc/ERR.pod index 6f729554d2..6f729554d2 100644 --- a/src/lib/libssl/src/doc/crypto/err.pod +++ b/src/lib/libcrypto/doc/ERR.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/hmac.pod b/src/lib/libcrypto/doc/HMAC.pod index d92138d273..d92138d273 100644 --- a/src/lib/libssl/src/doc/crypto/hmac.pod +++ b/src/lib/libcrypto/doc/HMAC.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/md5.pod b/src/lib/libcrypto/doc/MD5.pod index d11d5c32cb..d11d5c32cb 100644 --- a/src/lib/libssl/src/doc/crypto/md5.pod +++ b/src/lib/libcrypto/doc/MD5.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/pem.pod b/src/lib/libcrypto/doc/PEM_read_bio_PrivateKey.pod index 54414a3f6f..54414a3f6f 100644 --- a/src/lib/libssl/src/doc/crypto/pem.pod +++ b/src/lib/libcrypto/doc/PEM_read_bio_PrivateKey.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/rand.pod b/src/lib/libcrypto/doc/RAND.pod index e987414477..e987414477 100644 --- a/src/lib/libssl/src/doc/crypto/rand.pod +++ b/src/lib/libcrypto/doc/RAND.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/rc4.pod b/src/lib/libcrypto/doc/RC4.pod index b6d3a4342c..b6d3a4342c 100644 --- a/src/lib/libssl/src/doc/crypto/rc4.pod +++ b/src/lib/libcrypto/doc/RC4.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/ripemd.pod b/src/lib/libcrypto/doc/RIPEMD160.pod index 264bb99ae7..264bb99ae7 100644 --- a/src/lib/libssl/src/doc/crypto/ripemd.pod +++ b/src/lib/libcrypto/doc/RIPEMD160.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/sha.pod b/src/lib/libcrypto/doc/SHA1.pod index 94ab7bc724..94ab7bc724 100644 --- a/src/lib/libssl/src/doc/crypto/sha.pod +++ b/src/lib/libcrypto/doc/SHA1.pod | |||
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 503829ae8d..826d161c23 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2014/04/11 22:51:53 miod Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2014/04/16 09:50:10 mpi Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> # for NOMAN | 3 | .include <bsd.own.mk> # for NOMAN |
4 | 4 | ||
@@ -11,6 +11,8 @@ MAN= \ | |||
11 | ASN1_STRING_new.3 \ | 11 | ASN1_STRING_new.3 \ |
12 | ASN1_STRING_print_ex.3 \ | 12 | ASN1_STRING_print_ex.3 \ |
13 | ASN1_generate_nconf.3 \ | 13 | ASN1_generate_nconf.3 \ |
14 | BF_set_key.3 \ | ||
15 | BIO.3 \ | ||
14 | BIO_ctrl.3 \ | 16 | BIO_ctrl.3 \ |
15 | BIO_f_base64.3 \ | 17 | BIO_f_base64.3 \ |
16 | BIO_f_buffer.3 \ | 18 | BIO_f_buffer.3 \ |
@@ -49,9 +51,12 @@ MAN= \ | |||
49 | BN_set_bit.3 \ | 51 | BN_set_bit.3 \ |
50 | BN_swap.3 \ | 52 | BN_swap.3 \ |
51 | BN_zero.3 \ | 53 | BN_zero.3 \ |
54 | BUF_MEM_new.3 \ | ||
52 | CONF_modules_free.3 \ | 55 | CONF_modules_free.3 \ |
53 | CONF_modules_load_file.3 \ | 56 | CONF_modules_load_file.3 \ |
54 | CRYPTO_set_ex_data.3 \ | 57 | CRYPTO_set_ex_data.3 \ |
58 | CRYPTO_set_locking_callback.3 \ | ||
59 | DES_set_key.3 \ | ||
55 | DH_generate_key.3 \ | 60 | DH_generate_key.3 \ |
56 | DH_generate_parameters.3 \ | 61 | DH_generate_parameters.3 \ |
57 | DH_get_ex_new_index.3 \ | 62 | DH_get_ex_new_index.3 \ |
@@ -68,6 +73,7 @@ MAN= \ | |||
68 | DSA_set_method.3 \ | 73 | DSA_set_method.3 \ |
69 | DSA_sign.3 \ | 74 | DSA_sign.3 \ |
70 | DSA_size.3 \ | 75 | DSA_size.3 \ |
76 | ERR.3 \ | ||
71 | ERR_GET_LIB.3 \ | 77 | ERR_GET_LIB.3 \ |
72 | ERR_clear_error.3 \ | 78 | ERR_clear_error.3 \ |
73 | ERR_error_string.3 \ | 79 | ERR_error_string.3 \ |
@@ -84,28 +90,48 @@ MAN= \ | |||
84 | EVP_DigestVerifyInit.3 \ | 90 | EVP_DigestVerifyInit.3 \ |
85 | EVP_EncryptInit.3 \ | 91 | EVP_EncryptInit.3 \ |
86 | EVP_OpenInit.3 \ | 92 | EVP_OpenInit.3 \ |
93 | EVP_PKEY_CTX_ctrl.3 \ | ||
94 | EVP_PKEY_CTX_new.3 \ | ||
95 | EVP_PKEY_cmp.3 \ | ||
96 | EVP_PKEY_decrypt.3 \ | ||
97 | EVP_PKEY_derive.3 \ | ||
98 | EVP_PKEY_encrypt.3 \ | ||
99 | EVP_PKEY_get_default_digest.3 \ | ||
100 | EVP_PKEY_keygen.3 \ | ||
87 | EVP_PKEY_new.3 \ | 101 | EVP_PKEY_new.3 \ |
102 | EVP_PKEY_print_private.3 \ | ||
88 | EVP_PKEY_set1_RSA.3 \ | 103 | EVP_PKEY_set1_RSA.3 \ |
104 | EVP_PKEY_sign.3 \ | ||
105 | EVP_PKEY_verify.3 \ | ||
106 | EVP_PKEY_verify_recover.3 \ | ||
89 | EVP_SealInit.3 \ | 107 | EVP_SealInit.3 \ |
90 | EVP_SignInit.3 \ | 108 | EVP_SignInit.3 \ |
91 | EVP_VerifyInit.3 \ | 109 | EVP_VerifyInit.3 \ |
110 | HMAC.3 \ | ||
111 | MD5.3 \ | ||
92 | OBJ_nid2obj.3 \ | 112 | OBJ_nid2obj.3 \ |
93 | OPENSSL_VERSION_NUMBER.3 \ | 113 | OPENSSL_VERSION_NUMBER.3 \ |
94 | OPENSSL_config.3 \ | 114 | OPENSSL_config.3 \ |
95 | OPENSSL_load_builtin_modules.3 \ | 115 | OPENSSL_load_builtin_modules.3 \ |
96 | OpenSSL_add_all_algorithms.3 \ | 116 | OpenSSL_add_all_algorithms.3 \ |
117 | PEM_read_bio_PrivateKey.3 \ | ||
118 | PEM_write_bio_PKCS7_stream.3 \ | ||
97 | PKCS12_create.3 \ | 119 | PKCS12_create.3 \ |
98 | PKCS12_parse.3 \ | 120 | PKCS12_parse.3 \ |
99 | PKCS7_decrypt.3 \ | 121 | PKCS7_decrypt.3 \ |
100 | PKCS7_encrypt.3 \ | 122 | PKCS7_encrypt.3 \ |
101 | PKCS7_sign.3 \ | 123 | PKCS7_sign.3 \ |
124 | PKCS7_sign_add_signer.3 \ | ||
102 | PKCS7_verify.3 \ | 125 | PKCS7_verify.3 \ |
126 | RAND.3 \ | ||
103 | RAND_add.3 \ | 127 | RAND_add.3 \ |
104 | RAND_bytes.3 \ | 128 | RAND_bytes.3 \ |
105 | RAND_cleanup.3 \ | 129 | RAND_cleanup.3 \ |
106 | RAND_egd.3 \ | 130 | RAND_egd.3 \ |
107 | RAND_load_file.3 \ | 131 | RAND_load_file.3 \ |
108 | RAND_set_rand_method.3 \ | 132 | RAND_set_rand_method.3 \ |
133 | RC4.3 \ | ||
134 | RIPEMD160.3 \ | ||
109 | RSA_blinding_on.3 \ | 135 | RSA_blinding_on.3 \ |
110 | RSA_check_key.3 \ | 136 | RSA_check_key.3 \ |
111 | RSA_generate_key.3 \ | 137 | RSA_generate_key.3 \ |
@@ -119,19 +145,20 @@ MAN= \ | |||
119 | RSA_sign.3 \ | 145 | RSA_sign.3 \ |
120 | RSA_sign_ASN1_OCTET_STRING.3 \ | 146 | RSA_sign_ASN1_OCTET_STRING.3 \ |
121 | RSA_size.3 \ | 147 | RSA_size.3 \ |
148 | SHA1.3 \ | ||
122 | SMIME_read_PKCS7.3 \ | 149 | SMIME_read_PKCS7.3 \ |
123 | SMIME_write_PKCS7.3 \ | 150 | SMIME_write_PKCS7.3 \ |
124 | X509_NAME_ENTRY_get_object.3 \ | 151 | X509_NAME_ENTRY_get_object.3 \ |
125 | X509_NAME_add_entry_by_txt.3 \ | 152 | X509_NAME_add_entry_by_txt.3 \ |
126 | X509_NAME_get_index_by_NID.3 \ | 153 | X509_NAME_get_index_by_NID.3 \ |
127 | X509_NAME_print_ex.3 \ | 154 | X509_NAME_print_ex.3 \ |
128 | X509_new.3 \ | ||
129 | X509_STORE_CTX_get_error.3 \ | 155 | X509_STORE_CTX_get_error.3 \ |
130 | X509_STORE_CTX_get_ex_new_index.3 \ | 156 | X509_STORE_CTX_get_ex_new_index.3 \ |
131 | X509_STORE_CTX_new.3 \ | 157 | X509_STORE_CTX_new.3 \ |
132 | X509_STORE_CTX_set_verify_cb.3 \ | 158 | X509_STORE_CTX_set_verify_cb.3 \ |
133 | X509_STORE_set_verify_cb_func.3 \ | 159 | X509_STORE_set_verify_cb_func.3 \ |
134 | X509_VERIFY_PARAM_set_flags.3 \ | 160 | X509_VERIFY_PARAM_set_flags.3 \ |
161 | X509_new.3 \ | ||
135 | X509_verify_cert.3 \ | 162 | X509_verify_cert.3 \ |
136 | bn.3 \ | 163 | bn.3 \ |
137 | bn_internal.3 \ | 164 | bn_internal.3 \ |
@@ -152,66 +179,35 @@ MAN= \ | |||
152 | ecdsa.3 \ | 179 | ecdsa.3 \ |
153 | engine.3 \ | 180 | engine.3 \ |
154 | evp.3 \ | 181 | evp.3 \ |
182 | i2d_PKCS7_bio_stream.3 \ | ||
155 | lh_stats.3 \ | 183 | lh_stats.3 \ |
156 | lhash.3 \ | 184 | lhash.3 \ |
157 | pem.3 \ | ||
158 | rsa.3 \ | 185 | rsa.3 \ |
159 | ui.3 \ | 186 | ui.3 \ |
160 | ui_compat.3 \ | 187 | ui_compat.3 \ |
161 | x509.3 \ | 188 | x509.3 \ |
162 | BF_set_key.3 \ | ||
163 | BIO.3 \ | ||
164 | BUF_MEM_new.3 \ | ||
165 | CRYPTO_set_locking_callback.3 \ | ||
166 | DES_set_key.3 \ | ||
167 | ERR.3 \ | ||
168 | HMAC.3 \ | ||
169 | MD5.3 \ | ||
170 | PEM_read_bio_PrivateKey.3 \ | ||
171 | RAND.3 \ | ||
172 | RC4.3 \ | ||
173 | RIPEMD160.3 \ | ||
174 | SHA1.3 | ||
175 | |||
176 | # These pages removed/renamed | ||
177 | # OPENSSL_ia32cap.cat3 \ # i386-only, internal API | ||
178 | # OPENSSL_Applink.cat3 \ # Win32 only | ||
179 | # bio.cat3 \ # conflict; see below | ||
180 | # blowfish.cat3 \ # conflict; see below | ||
181 | # buffer.cat3 \ # conflict; see below | ||
182 | # des.cat3 \ # conflict; see below | ||
183 | # des_modes.cat3 \ # fairly pointless | ||
184 | # hmac.cat3 \ # conflict; see below | ||
185 | # md5.cat3 \ # conflict; see below | ||
186 | # mdc2.cat3 \ # patents; removed | ||
187 | # rand.cat3 \ # conflict; see below | ||
188 | # rc4.cat3 \ # conflict; see below | ||
189 | # ripemd.cat3 \ # conflict; see below | ||
190 | # sha.cat3 \ # conflict; see below | ||
191 | |||
192 | 189 | ||
193 | # these are a real problem, since they re-document functions described in | 190 | #MAN+= BIO_new_CMS.3 \ |
194 | # other pages. | 191 | # CMS_add0_cert.3 \ |
195 | 192 | # CMS_add1_recipient_cert.3 \ | |
196 | .for page src in \ | 193 | # CMS_compress.3 \ |
197 | BF_set_key blowfish \ | 194 | # CMS_decrypt.3 \ |
198 | BIO bio \ | 195 | # CMS_encrypt.3 \ |
199 | BUF_MEM_new buffer \ | 196 | # CMS_final.3 \ |
200 | CRYPTO_set_locking_callback threads \ | 197 | # CMS_get0_RecipientInfos.3 \ |
201 | DES_set_key des \ | 198 | # CMS_get0_SignerInfos.3 \ |
202 | ERR err \ | 199 | # CMS_get0_type.3 \ |
203 | HMAC hmac \ | 200 | # CMS_get1_ReceiptRequest.3 \ |
204 | MD5 md5 \ | 201 | # CMS_sign.3 \ |
205 | PEM_read_bio_PrivateKey pem \ | 202 | # CMS_sign_add1_signer.3 \ |
206 | RAND rand \ | 203 | # CMS_sign_receipt.3 \ |
207 | RC4 rc4 \ | 204 | # CMS_uncompress.3 \ |
208 | RIPEMD160 ripemd \ | 205 | # CMS_verify.3 \ |
209 | SHA1 sha | 206 | # CMS_verify_receipt.3 \ |
210 | 207 | # PEM_write_bio_CMS_stream.3 \ | |
211 | ${page}.3: ${src}.pod | 208 | # SMIME_read_CMS.3 \ |
212 | @echo '${POD2MAN} --section=3 --name=${page:U} $? > $@' | 209 | # SMIME_write_CMS.3 \ |
213 | @${POD2MAN} --section=3 --name=${page:U} $? > $@.tmp && mv $@.tmp $@ | 210 | # i2d_CMS_bio_stream.3 \ |
214 | .endfor | ||
215 | 211 | ||
216 | MLINKS+=\ | 212 | MLINKS+=\ |
217 | ASN1_OBJECT_new.3 ASN1_OBJECT_free.3 \ | 213 | ASN1_OBJECT_new.3 ASN1_OBJECT_free.3 \ |
@@ -520,7 +516,32 @@ MLINKS+=\ | |||
520 | EVP_EncryptInit.3 OBJ_obj2nid.3 \ | 516 | EVP_EncryptInit.3 OBJ_obj2nid.3 \ |
521 | EVP_OpenInit.3 EVP_OpenFinal.3 \ | 517 | EVP_OpenInit.3 EVP_OpenFinal.3 \ |
522 | EVP_OpenInit.3 EVP_OpenUpdate.3 \ | 518 | EVP_OpenInit.3 EVP_OpenUpdate.3 \ |
519 | EVP_PKEY_CTX_ctrl.3 EVP_PKEY_ctrl_str.3 \ | ||
520 | EVP_PKEY_CTX_new.3 EVP_PKEY_CTX_new_id.3 \ | ||
521 | EVP_PKEY_CTX_new.3 EVP_PKEY_CTX_dup.3 \ | ||
522 | EVP_PKEY_CTX_new.3 EVP_PKEY_CTX_free.3 \ | ||
523 | EVP_PKEY_cmp.3 EVP_PKEY_copy_parameters.3 \ | ||
524 | EVP_PKEY_cmp.3 EVP_PKEY_missing_parameters.3 \ | ||
525 | EVP_PKEY_cmp.3 EVP_PKEY_cmp_parameters.3 \ | ||
523 | EVP_PKEY_new.3 EVP_PKEY_free.3 \ | 526 | EVP_PKEY_new.3 EVP_PKEY_free.3 \ |
527 | EVP_PKEY_decrypt.3 EVP_PKEY_decrypt_init.3 \ | ||
528 | EVP_PKEY_derive.3 EVP_PKEY_derive_init.3 \ | ||
529 | EVP_PKEY_derive.3 EVP_PKEY_derive_set_peer.3 \ | ||
530 | EVP_PKEY_get_default_digest.3 EVP_PKEY_get_default_digest_nid.3 \ | ||
531 | EVP_PKEY_encrypt.3 EVP_PKEY_encrypt_init.3 \ | ||
532 | EVP_PKEY_keygen.3 EVP_PKEY_keygen_init.3 \ | ||
533 | EVP_PKEY_keygen.3 EVP_PKEY_paramgen_init.3 \ | ||
534 | EVP_PKEY_keygen.3 EVP_PKEY_paramgen.3 \ | ||
535 | EVP_PKEY_keygen.3 EVP_PKEY_CTX_set_cb.3 \ | ||
536 | EVP_PKEY_keygen.3 EVP_PKEY_CTX_get_cb.3 \ | ||
537 | EVP_PKEY_keygen.3 EVP_PKEY_CTX_get_keygen_info.3 \ | ||
538 | EVP_PKEY_keygen.3 EVP_PKEY_CTX_set_app_data.3 \ | ||
539 | EVP_PKEY_keygen.3 EVP_PKEY_CTX_get_app_data.3 \ | ||
540 | EVP_PKEY_print_private.3 EVP_PKEY_print_private.3 \ | ||
541 | EVP_PKEY_print_private.3 EVP_PKEY_print_params.3 \ | ||
542 | EVP_PKEY_sign.3 EVP_PKEY_sign_init.3 \ | ||
543 | EVP_PKEY_verify.3 EVP_PKEY_verify_init.3 \ | ||
544 | EVP_PKEY_verify_recover.3 EVP_PKEY_verify_recover_init.3 \ | ||
524 | EVP_PKEY_set1_RSA.3 EVP_PKEY_assign_DH.3 \ | 545 | EVP_PKEY_set1_RSA.3 EVP_PKEY_assign_DH.3 \ |
525 | EVP_PKEY_set1_RSA.3 EVP_PKEY_assign_DSA.3 \ | 546 | EVP_PKEY_set1_RSA.3 EVP_PKEY_assign_DSA.3 \ |
526 | EVP_PKEY_set1_RSA.3 EVP_PKEY_assign_EC_KEY.3 \ | 547 | EVP_PKEY_set1_RSA.3 EVP_PKEY_assign_EC_KEY.3 \ |
@@ -887,7 +908,6 @@ maninstall: | |||
887 | 908 | ||
888 | .endif | 909 | .endif |
889 | 910 | ||
890 | # XXX .PATH order is critical because of non-unique filenames | ||
891 | .PATH: ${.CURDIR}/../../libssl/src/doc/crypto | 911 | .PATH: ${.CURDIR}/../../libssl/src/doc/crypto |
892 | .SUFFIXES: .pod .1 .3 .7 | 912 | .SUFFIXES: .pod .1 .3 .7 |
893 | .for sect in 1 3 7 | 913 | .for sect in 1 3 7 |
diff --git a/src/lib/libssl/man/Makefile b/src/lib/libssl/man/Makefile index b3b5369cd8..00414ad322 100644 --- a/src/lib/libssl/man/Makefile +++ b/src/lib/libssl/man/Makefile | |||
@@ -1,129 +1,94 @@ | |||
1 | # $OpenBSD: Makefile,v 1.24 2014/04/14 08:18:40 mpi Exp $ | 1 | # $OpenBSD: Makefile,v 1.25 2014/04/16 09:50:10 mpi Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> # for NOMAN | 3 | .include <bsd.own.mk> # for NOMAN |
4 | 4 | ||
5 | POD2MAN=pod2man --official --release="OpenBSD ${OSREV}" --center=OpenSSL | 5 | POD2MAN=pod2man --official --release="OpenBSD ${OSREV}" --center=OpenSSL |
6 | 6 | ||
7 | .ifndef NOMAN | 7 | .ifndef NOMAN |
8 | 8 | MAN= \ | |
9 | # libcrypto | 9 | BIO_f_ssl.3 \ |
10 | MAN= ASN1_OBJECT_new.3 ASN1_STRING_length.3 ASN1_STRING_new.3 \ | 10 | SSL_CIPHER_get_name.3 \ |
11 | ASN1_STRING_print_ex.3 ASN1_generate_nconf.3 | 11 | SSL_COMP_add_compression_method.3 \ |
12 | 12 | SSL_CTX_add_extra_chain_cert.3 \ | |
13 | MAN+= BIO_ctrl.3 BIO_f_base64.3 BIO_f_buffer.3 BIO_f_cipher.3 BIO_f_md.3 \ | 13 | SSL_CTX_add_session.3 \ |
14 | BIO_f_null.3 BIO_f_ssl.3 BIO_find_type.3 BIO_new.3 BIO_new_CMS.3 \ | 14 | SSL_CTX_ctrl.3 \ |
15 | BIO_push.3 BIO_read.3 BIO_s_accept.3 BIO_s_bio.3 BIO_s_connect.3 \ | 15 | SSL_CTX_flush_sessions.3 \ |
16 | BIO_s_fd.3 BIO_s_file.3 BIO_s_mem.3 BIO_s_null.3 BIO_s_socket.3 \ | 16 | SSL_CTX_free.3 \ |
17 | BIO_set_callback.3 BIO_should_retry.3 | 17 | SSL_CTX_get_ex_new_index.3 \ |
18 | 18 | SSL_CTX_get_verify_mode.3 \ | |
19 | MAN+= BN_BLINDING_new.3 BN_CTX_new.3 BN_CTX_start.3 BN_add.3 BN_add_word.3 \ | 19 | SSL_CTX_load_verify_locations.3 \ |
20 | BN_bn2bin.3 BN_cmp.3 BN_copy.3 BN_generate_prime.3 BN_mod_inverse.3 \ | 20 | SSL_CTX_new.3 \ |
21 | BN_mod_mul_montgomery.3 BN_mod_mul_reciprocal.3 BN_new.3 \ | 21 | SSL_CTX_sess_number.3 \ |
22 | BN_num_bytes.3 BN_rand.3 BN_set_bit.3 BN_swap.3 BN_zero.3 | 22 | SSL_CTX_sess_set_cache_size.3 \ |
23 | 23 | SSL_CTX_sess_set_get_cb.3 \ | |
24 | MAN+= CMS_add0_cert.3 CMS_add1_recipient_cert.3 CMS_compress.3 CMS_decrypt.3 \ | 24 | SSL_CTX_sessions.3 \ |
25 | CMS_encrypt.3 CMS_final.3 CMS_get0_RecipientInfos.3 \ | 25 | SSL_CTX_set_cert_store.3 \ |
26 | CMS_get0_SignerInfos.3 CMS_get0_type.3 CMS_get1_ReceiptRequest.3 \ | 26 | SSL_CTX_set_cert_verify_callback.3 \ |
27 | CMS_sign.3 CMS_sign_add1_signer.3 CMS_sign_receipt.3 CMS_uncompress.3 \ | 27 | SSL_CTX_set_cipher_list.3 \ |
28 | CMS_verify.3 CMS_verify_receipt.3 | 28 | SSL_CTX_set_client_CA_list.3 \ |
29 | 29 | SSL_CTX_set_client_cert_cb.3 \ | |
30 | MAN+= CONF_modules_free.3 CONF_modules_load_file.3 | 30 | SSL_CTX_set_default_passwd_cb.3 \ |
31 | 31 | SSL_CTX_set_generate_session_id.3 \ | |
32 | MAN+= CRYPTO_set_ex_data.3 | 32 | SSL_CTX_set_info_callback.3 \ |
33 | 33 | SSL_CTX_set_max_cert_list.3 \ | |
34 | MAN+= DH_generate_key.3 DH_generate_parameters.3 DH_get_ex_new_index.3 \ | 34 | SSL_CTX_set_mode.3 \ |
35 | DH_new.3 DH_set_method.3 DH_size.3 | 35 | SSL_CTX_set_msg_callback.3 \ |
36 | 36 | SSL_CTX_set_options.3 \ | |
37 | MAN+= DSA_SIG_new.3 DSA_do_sign.3 DSA_dup_DH.3 DSA_generate_key.3 \ | 37 | SSL_CTX_set_psk_client_callback.3 \ |
38 | DSA_generate_parameters.3 DSA_get_ex_new_index.3 DSA_new.3 \ | 38 | SSL_CTX_set_quiet_shutdown.3 \ |
39 | DSA_set_method.3 DSA_sign.3 DSA_size.3 | 39 | SSL_CTX_set_session_cache_mode.3 \ |
40 | 40 | SSL_CTX_set_session_id_context.3 \ | |
41 | MAN+= ERR_GET_LIB.3 ERR_clear_error.3 ERR_error_string.3 ERR_get_error.3 \ | 41 | SSL_CTX_set_ssl_version.3 \ |
42 | ERR_load_crypto_strings.3 ERR_load_strings.3 ERR_print_errors.3 \ | 42 | SSL_CTX_set_timeout.3 \ |
43 | ERR_put_error.3 ERR_remove_state.3 ERR_set_mark.3 | 43 | SSL_CTX_set_tmp_dh_callback.3 \ |
44 | 44 | SSL_CTX_set_tmp_rsa_callback.3 \ | |
45 | MAN+= EVP_BytesToKey.3 EVP_DigestInit.3 EVP_DigestSignInit.3 \ | 45 | SSL_CTX_set_verify.3 \ |
46 | EVP_DigestVerifyInit.3 EVP_EncryptInit.3 EVP_OpenInit.3 \ | 46 | SSL_CTX_use_certificate.3 \ |
47 | EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_new.3 EVP_PKEY_cmp.3 \ | 47 | SSL_CTX_use_psk_identity_hint.3 \ |
48 | EVP_PKEY_decrypt.3 EVP_PKEY_derive.3 EVP_PKEY_encrypt.3 \ | 48 | SSL_SESSION_free.3 \ |
49 | EVP_PKEY_get_default_digest.3 EVP_PKEY_keygen.3 EVP_PKEY_new.3 \ | 49 | SSL_SESSION_get_ex_new_index.3 \ |
50 | EVP_PKEY_print_private.3 EVP_PKEY_set1_RSA.3 EVP_PKEY_sign.3 \ | 50 | SSL_SESSION_get_time.3 \ |
51 | EVP_PKEY_verify.3 EVP_PKEY_verify_recover.3 EVP_SealInit.3 \ | 51 | SSL_accept.3 \ |
52 | EVP_SignInit.3 EVP_VerifyInit.3 | 52 | SSL_alert_type_string.3 \ |
53 | 53 | SSL_clear.3 \ | |
54 | MAN+= OBJ_nid2obj.3 | 54 | SSL_connect.3 \ |
55 | 55 | SSL_do_handshake.3 \ | |
56 | MAN+= OPENSSL_Applink.3 OPENSSL_VERSION_NUMBER.3 OPENSSL_config.3 \ | 56 | SSL_free.3 \ |
57 | OPENSSL_ia32cap.3 OPENSSL_load_builtin_modules.3 \ | 57 | SSL_get_SSL_CTX.3 \ |
58 | OpenSSL_add_all_algorithms.3 | 58 | SSL_get_ciphers.3 \ |
59 | 59 | SSL_get_client_CA_list.3 \ | |
60 | MAN+= PEM_write_bio_CMS_stream.3 PEM_write_bio_PKCS7_stream.3 | 60 | SSL_get_current_cipher.3 \ |
61 | 61 | SSL_get_default_timeout.3 \ | |
62 | MAN+= PKCS12_create.3 PKCS12_parse.3 PKCS7_decrypt.3 PKCS7_encrypt.3 \ | 62 | SSL_get_error.3 \ |
63 | PKCS7_sign.3 PKCS7_sign_add_signer.3 PKCS7_verify.3 | 63 | SSL_get_ex_data_X509_STORE_CTX_idx.3 \ |
64 | 64 | SSL_get_ex_new_index.3 \ | |
65 | MAN+= RAND_add.3 RAND_bytes.3 RAND_cleanup.3 RAND_egd.3 RAND_load_file.3 \ | 65 | SSL_get_fd.3 \ |
66 | RAND_set_rand_method.3 | 66 | SSL_get_peer_cert_chain.3 \ |
67 | 67 | SSL_get_peer_certificate.3 \ | |
68 | MAN+= RSA_blinding_on.3 RSA_check_key.3 RSA_generate_key.3 \ | 68 | SSL_get_psk_identity.3 \ |
69 | RSA_get_ex_new_index.3 RSA_new.3 RSA_padding_add_PKCS1_type_1.3 \ | 69 | SSL_get_rbio.3 \ |
70 | RSA_print.3 RSA_private_encrypt.3 RSA_public_encrypt.3 \ | 70 | SSL_get_session.3 \ |
71 | RSA_set_method.3 RSA_sign.3 RSA_sign_ASN1_OCTET_STRING.3 RSA_size.3 | 71 | SSL_get_verify_result.3 \ |
72 | 72 | SSL_get_version.3 \ | |
73 | MAN+= SMIME_read_CMS.3 SMIME_read_PKCS7.3 SMIME_write_CMS.3 \ | 73 | SSL_library_init.3 \ |
74 | SMIME_write_PKCS7.3 | 74 | SSL_load_client_CA_file.3 \ |
75 | 75 | SSL_new.3 \ | |
76 | MAN+= X509_NAME_ENTRY_get_object.3 X509_NAME_add_entry_by_txt.3 \ | 76 | SSL_pending.3 \ |
77 | X509_NAME_get_index_by_NID.3 X509_NAME_print_ex.3 \ | 77 | SSL_read.3 \ |
78 | X509_STORE_CTX_get_error.3 X509_STORE_CTX_get_ex_new_index.3 \ | 78 | SSL_rstate_string.3 \ |
79 | X509_STORE_CTX_new.3 X509_STORE_CTX_set_verify_cb.3 \ | 79 | SSL_session_reused.3 \ |
80 | X509_STORE_set_verify_cb_func.3 X509_VERIFY_PARAM_set_flags.3 \ | 80 | SSL_set_bio.3 \ |
81 | X509_new.3 X509_verify_cert.3 | 81 | SSL_set_connect_state.3 \ |
82 | 82 | SSL_set_fd.3 \ | |
83 | MAN+= d2i_ASN1_OBJECT.3 d2i_DHparams.3 d2i_DSAPublicKey.3 \ | 83 | SSL_set_session.3 \ |
84 | d2i_PKCS8PrivateKey.3 d2i_RSAPublicKey.3 d2i_X509.3 d2i_X509_ALGOR.3 \ | 84 | SSL_set_shutdown.3 \ |
85 | d2i_X509_CRL.3 d2i_X509_NAME.3 d2i_X509_REQ.3 d2i_X509_SIG.3 | 85 | SSL_set_verify_result.3 \ |
86 | 86 | SSL_shutdown.3 \ | |
87 | MAN+= i2d_CMS_bio_stream.3 i2d_PKCS7_bio_stream.3 | 87 | SSL_state_string.3 \ |
88 | 88 | SSL_want.3 \ | |
89 | MAN+= bio.3 blowfish.3 bn.3 bn_internal.3 buffer.3 crypto.3 des.3 \ | 89 | SSL_write.3 \ |
90 | des_modes.3 dh.3 dsa.3 ecdsa.3 engine.3 err.3 evp.3 hmac.3 lh_stats.3 \ | 90 | d2i_SSL_SESSION.3 \ |
91 | lhash.3 md5.3 mdc2.3 pem.3 rand.3 rc4.3 ripemd.3 rsa.3 sha.3 threads.3 \ | 91 | ssl.3 \ |
92 | ui.3 ui_compat.3 x509.3 | ||
93 | |||
94 | # libssl | ||
95 | MAN+= SSL_CIPHER_get_name.3 SSL_COMP_add_compression_method.3 \ | ||
96 | SSL_CTX_add_extra_chain_cert.3 SSL_CTX_add_session.3 SSL_CTX_ctrl.3 \ | ||
97 | SSL_CTX_flush_sessions.3 SSL_CTX_free.3 SSL_CTX_get_ex_new_index.3 \ | ||
98 | SSL_CTX_get_verify_mode.3 SSL_CTX_load_verify_locations.3 \ | ||
99 | SSL_CTX_new.3 SSL_CTX_sess_number.3 SSL_CTX_sess_set_cache_size.3 \ | ||
100 | SSL_CTX_sess_set_get_cb.3 SSL_CTX_sessions.3 SSL_CTX_set_cert_store.3 \ | ||
101 | SSL_CTX_set_cert_verify_callback.3 SSL_CTX_set_cipher_list.3 \ | ||
102 | SSL_CTX_set_client_CA_list.3 SSL_CTX_set_client_cert_cb.3 \ | ||
103 | SSL_CTX_set_default_passwd_cb.3 SSL_CTX_set_generate_session_id.3 \ | ||
104 | SSL_CTX_set_info_callback.3 SSL_CTX_set_max_cert_list.3 \ | ||
105 | SSL_CTX_set_mode.3 SSL_CTX_set_msg_callback.3 SSL_CTX_set_options.3 \ | ||
106 | SSL_CTX_set_psk_client_callback.3 SSL_CTX_set_quiet_shutdown.3 \ | ||
107 | SSL_CTX_set_session_cache_mode.3 SSL_CTX_set_session_id_context.3 \ | ||
108 | SSL_CTX_set_ssl_version.3 SSL_CTX_set_timeout.3 \ | ||
109 | SSL_CTX_set_tmp_dh_callback.3 SSL_CTX_set_tmp_rsa_callback.3 \ | ||
110 | SSL_CTX_set_verify.3 SSL_CTX_use_certificate.3 \ | ||
111 | SSL_CTX_use_psk_identity_hint.3 SSL_SESSION_free.3 \ | ||
112 | SSL_SESSION_get_ex_new_index.3 SSL_SESSION_get_time.3 SSL_accept.3 \ | ||
113 | SSL_alert_type_string.3 SSL_clear.3 SSL_connect.3 SSL_do_handshake.3 \ | ||
114 | SSL_free.3 SSL_get_SSL_CTX.3 SSL_get_ciphers.3 \ | ||
115 | SSL_get_client_CA_list.3 SSL_get_current_cipher.3 \ | ||
116 | SSL_get_default_timeout.3 SSL_get_error.3 \ | ||
117 | SSL_get_ex_data_X509_STORE_CTX_idx.3 SSL_get_ex_new_index.3 \ | ||
118 | SSL_get_fd.3 SSL_get_peer_cert_chain.3 SSL_get_peer_certificate.3 \ | ||
119 | SSL_get_psk_identity.3 SSL_get_rbio.3 SSL_get_session.3 \ | ||
120 | SSL_get_verify_result.3 SSL_get_version.3 SSL_library_init.3 \ | ||
121 | SSL_load_client_CA_file.3 SSL_new.3 SSL_pending.3 SSL_read.3 \ | ||
122 | SSL_rstate_string.3 SSL_session_reused.3 SSL_set_bio.3 \ | ||
123 | SSL_set_connect_state.3 SSL_set_fd.3 SSL_set_session.3 \ | ||
124 | SSL_set_shutdown.3 SSL_set_verify_result.3 SSL_shutdown.3 \ | ||
125 | SSL_state_string.3 SSL_want.3 SSL_write.3 \ | ||
126 | d2i_SSL_SESSION.3 ssl.3 | ||
127 | 92 | ||
128 | # XXX ERR_load_crypto_strings.3 built by libcrypto | 93 | # XXX ERR_load_crypto_strings.3 built by libcrypto |
129 | MLINKS+=\ | 94 | MLINKS+=\ |
@@ -282,9 +247,7 @@ maninstall: | |||
282 | 247 | ||
283 | .endif | 248 | .endif |
284 | 249 | ||
285 | # XXX .PATH order is critical because of non-unique filenames | 250 | .PATH: ${.CURDIR}/../src/doc/ssl |
286 | # XXX doc/crypto because of BIO_f_ssl() | ||
287 | .PATH: ${.CURDIR}/../src/doc/crypto ${.CURDIR}/../src/doc/ssl | ||
288 | .SUFFIXES: .pod .1 .3 .7 | 251 | .SUFFIXES: .pod .1 .3 .7 |
289 | .for sect in 1 3 7 | 252 | .for sect in 1 3 7 |
290 | .pod.${sect}: | 253 | .pod.${sect}: |
diff --git a/src/lib/libssl/src/doc/crypto/blowfish.pod b/src/lib/libssl/src/doc/crypto/BF_set_key.pod index 5b2d274c15..5b2d274c15 100644 --- a/src/lib/libssl/src/doc/crypto/blowfish.pod +++ b/src/lib/libssl/src/doc/crypto/BF_set_key.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/bio.pod b/src/lib/libssl/src/doc/crypto/BIO.pod index f9239226ff..f9239226ff 100644 --- a/src/lib/libssl/src/doc/crypto/bio.pod +++ b/src/lib/libssl/src/doc/crypto/BIO.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/buffer.pod b/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod index 781f5b11ee..781f5b11ee 100644 --- a/src/lib/libssl/src/doc/crypto/buffer.pod +++ b/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/threads.pod b/src/lib/libssl/src/doc/crypto/CRYPTO_set_locking_callback.pod index dc0e9391dc..dc0e9391dc 100644 --- a/src/lib/libssl/src/doc/crypto/threads.pod +++ b/src/lib/libssl/src/doc/crypto/CRYPTO_set_locking_callback.pod | |||
diff --git a/src/lib/libssl/src/doc/crypto/DES_set_key.pod b/src/lib/libssl/src/doc/crypto/DES_set_key.pod new file mode 100644 index 0000000000..6f0cf1cc5e --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/DES_set_key.pod | |||
@@ -0,0 +1,358 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | DES_random_key, DES_set_key, DES_key_sched, DES_set_key_checked, | ||
6 | DES_set_key_unchecked, DES_set_odd_parity, DES_is_weak_key, | ||
7 | DES_ecb_encrypt, DES_ecb2_encrypt, DES_ecb3_encrypt, DES_ncbc_encrypt, | ||
8 | DES_cfb_encrypt, DES_ofb_encrypt, DES_pcbc_encrypt, DES_cfb64_encrypt, | ||
9 | DES_ofb64_encrypt, DES_xcbc_encrypt, DES_ede2_cbc_encrypt, | ||
10 | DES_ede2_cfb64_encrypt, DES_ede2_ofb64_encrypt, DES_ede3_cbc_encrypt, | ||
11 | DES_ede3_cbcm_encrypt, DES_ede3_cfb64_encrypt, DES_ede3_ofb64_encrypt, | ||
12 | DES_cbc_cksum, DES_quad_cksum, DES_string_to_key, DES_string_to_2keys, | ||
13 | DES_fcrypt, DES_crypt, DES_enc_read, DES_enc_write - DES encryption | ||
14 | |||
15 | =head1 SYNOPSIS | ||
16 | |||
17 | #include <openssl/des.h> | ||
18 | |||
19 | void DES_random_key(DES_cblock *ret); | ||
20 | |||
21 | int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule); | ||
22 | int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule); | ||
23 | int DES_set_key_checked(const_DES_cblock *key, | ||
24 | DES_key_schedule *schedule); | ||
25 | void DES_set_key_unchecked(const_DES_cblock *key, | ||
26 | DES_key_schedule *schedule); | ||
27 | |||
28 | void DES_set_odd_parity(DES_cblock *key); | ||
29 | int DES_is_weak_key(const_DES_cblock *key); | ||
30 | |||
31 | void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, | ||
32 | DES_key_schedule *ks, int enc); | ||
33 | void DES_ecb2_encrypt(const_DES_cblock *input, DES_cblock *output, | ||
34 | DES_key_schedule *ks1, DES_key_schedule *ks2, int enc); | ||
35 | void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, | ||
36 | DES_key_schedule *ks1, DES_key_schedule *ks2, | ||
37 | DES_key_schedule *ks3, int enc); | ||
38 | |||
39 | void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output, | ||
40 | long length, DES_key_schedule *schedule, DES_cblock *ivec, | ||
41 | int enc); | ||
42 | void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, | ||
43 | int numbits, long length, DES_key_schedule *schedule, | ||
44 | DES_cblock *ivec, int enc); | ||
45 | void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, | ||
46 | int numbits, long length, DES_key_schedule *schedule, | ||
47 | DES_cblock *ivec); | ||
48 | void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output, | ||
49 | long length, DES_key_schedule *schedule, DES_cblock *ivec, | ||
50 | int enc); | ||
51 | void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out, | ||
52 | long length, DES_key_schedule *schedule, DES_cblock *ivec, | ||
53 | int *num, int enc); | ||
54 | void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out, | ||
55 | long length, DES_key_schedule *schedule, DES_cblock *ivec, | ||
56 | int *num); | ||
57 | |||
58 | void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output, | ||
59 | long length, DES_key_schedule *schedule, DES_cblock *ivec, | ||
60 | const_DES_cblock *inw, const_DES_cblock *outw, int enc); | ||
61 | |||
62 | void DES_ede2_cbc_encrypt(const unsigned char *input, | ||
63 | unsigned char *output, long length, DES_key_schedule *ks1, | ||
64 | DES_key_schedule *ks2, DES_cblock *ivec, int enc); | ||
65 | void DES_ede2_cfb64_encrypt(const unsigned char *in, | ||
66 | unsigned char *out, long length, DES_key_schedule *ks1, | ||
67 | DES_key_schedule *ks2, DES_cblock *ivec, int *num, int enc); | ||
68 | void DES_ede2_ofb64_encrypt(const unsigned char *in, | ||
69 | unsigned char *out, long length, DES_key_schedule *ks1, | ||
70 | DES_key_schedule *ks2, DES_cblock *ivec, int *num); | ||
71 | |||
72 | void DES_ede3_cbc_encrypt(const unsigned char *input, | ||
73 | unsigned char *output, long length, DES_key_schedule *ks1, | ||
74 | DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec, | ||
75 | int enc); | ||
76 | void DES_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out, | ||
77 | long length, DES_key_schedule *ks1, DES_key_schedule *ks2, | ||
78 | DES_key_schedule *ks3, DES_cblock *ivec1, DES_cblock *ivec2, | ||
79 | int enc); | ||
80 | void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out, | ||
81 | long length, DES_key_schedule *ks1, DES_key_schedule *ks2, | ||
82 | DES_key_schedule *ks3, DES_cblock *ivec, int *num, int enc); | ||
83 | void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out, | ||
84 | long length, DES_key_schedule *ks1, | ||
85 | DES_key_schedule *ks2, DES_key_schedule *ks3, | ||
86 | DES_cblock *ivec, int *num); | ||
87 | |||
88 | DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output, | ||
89 | long length, DES_key_schedule *schedule, | ||
90 | const_DES_cblock *ivec); | ||
91 | DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], | ||
92 | long length, int out_count, DES_cblock *seed); | ||
93 | void DES_string_to_key(const char *str, DES_cblock *key); | ||
94 | void DES_string_to_2keys(const char *str, DES_cblock *key1, | ||
95 | DES_cblock *key2); | ||
96 | |||
97 | char *DES_fcrypt(const char *buf, const char *salt, char *ret); | ||
98 | char *DES_crypt(const char *buf, const char *salt); | ||
99 | |||
100 | int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched, | ||
101 | DES_cblock *iv); | ||
102 | int DES_enc_write(int fd, const void *buf, int len, | ||
103 | DES_key_schedule *sched, DES_cblock *iv); | ||
104 | |||
105 | =head1 DESCRIPTION | ||
106 | |||
107 | This library contains a fast implementation of the DES encryption | ||
108 | algorithm. | ||
109 | |||
110 | There are two phases to the use of DES encryption. The first is the | ||
111 | generation of a I<DES_key_schedule> from a key, the second is the | ||
112 | actual encryption. A DES key is of type I<DES_cblock>. This type is | ||
113 | consists of 8 bytes with odd parity. The least significant bit in | ||
114 | each byte is the parity bit. The key schedule is an expanded form of | ||
115 | the key; it is used to speed the encryption process. | ||
116 | |||
117 | DES_random_key() generates a random key. The PRNG must be seeded | ||
118 | prior to using this function (see L<rand(3)|rand(3)>). If the PRNG | ||
119 | could not generate a secure key, 0 is returned. | ||
120 | |||
121 | Before a DES key can be used, it must be converted into the | ||
122 | architecture dependent I<DES_key_schedule> via the | ||
123 | DES_set_key_checked() or DES_set_key_unchecked() function. | ||
124 | |||
125 | DES_set_key_checked() will check that the key passed is of odd parity | ||
126 | and is not a week or semi-weak key. If the parity is wrong, then -1 | ||
127 | is returned. If the key is a weak key, then -2 is returned. If an | ||
128 | error is returned, the key schedule is not generated. | ||
129 | |||
130 | DES_set_key() works like | ||
131 | DES_set_key_checked() if the I<DES_check_key> flag is non-zero, | ||
132 | otherwise like DES_set_key_unchecked(). These functions are available | ||
133 | for compatibility; it is recommended to use a function that does not | ||
134 | depend on a global variable. | ||
135 | |||
136 | DES_set_odd_parity() sets the parity of the passed I<key> to odd. | ||
137 | |||
138 | DES_is_weak_key() returns 1 is the passed key is a weak key, 0 if it | ||
139 | is ok. The probability that a randomly generated key is weak is | ||
140 | 1/2^52, so it is not really worth checking for them. | ||
141 | |||
142 | The following routines mostly operate on an input and output stream of | ||
143 | I<DES_cblock>s. | ||
144 | |||
145 | DES_ecb_encrypt() is the basic DES encryption routine that encrypts or | ||
146 | decrypts a single 8-byte I<DES_cblock> in I<electronic code book> | ||
147 | (ECB) mode. It always transforms the input data, pointed to by | ||
148 | I<input>, into the output data, pointed to by the I<output> argument. | ||
149 | If the I<encrypt> argument is non-zero (DES_ENCRYPT), the I<input> | ||
150 | (cleartext) is encrypted in to the I<output> (ciphertext) using the | ||
151 | key_schedule specified by the I<schedule> argument, previously set via | ||
152 | I<DES_set_key>. If I<encrypt> is zero (DES_DECRYPT), the I<input> (now | ||
153 | ciphertext) is decrypted into the I<output> (now cleartext). Input | ||
154 | and output may overlap. DES_ecb_encrypt() does not return a value. | ||
155 | |||
156 | DES_ecb3_encrypt() encrypts/decrypts the I<input> block by using | ||
157 | three-key Triple-DES encryption in ECB mode. This involves encrypting | ||
158 | the input with I<ks1>, decrypting with the key schedule I<ks2>, and | ||
159 | then encrypting with I<ks3>. This routine greatly reduces the chances | ||
160 | of brute force breaking of DES and has the advantage of if I<ks1>, | ||
161 | I<ks2> and I<ks3> are the same, it is equivalent to just encryption | ||
162 | using ECB mode and I<ks1> as the key. | ||
163 | |||
164 | The macro DES_ecb2_encrypt() is provided to perform two-key Triple-DES | ||
165 | encryption by using I<ks1> for the final encryption. | ||
166 | |||
167 | DES_ncbc_encrypt() encrypts/decrypts using the I<cipher-block-chaining> | ||
168 | (CBC) mode of DES. If the I<encrypt> argument is non-zero, the | ||
169 | routine cipher-block-chain encrypts the cleartext data pointed to by | ||
170 | the I<input> argument into the ciphertext pointed to by the I<output> | ||
171 | argument, using the key schedule provided by the I<schedule> argument, | ||
172 | and initialization vector provided by the I<ivec> argument. If the | ||
173 | I<length> argument is not an integral multiple of eight bytes, the | ||
174 | last block is copied to a temporary area and zero filled. The output | ||
175 | is always an integral multiple of eight bytes. | ||
176 | |||
177 | DES_xcbc_encrypt() is RSA's DESX mode of DES. It uses I<inw> and | ||
178 | I<outw> to 'whiten' the encryption. I<inw> and I<outw> are secret | ||
179 | (unlike the iv) and are as such, part of the key. So the key is sort | ||
180 | of 24 bytes. This is much better than CBC DES. | ||
181 | |||
182 | DES_ede3_cbc_encrypt() implements outer triple CBC DES encryption with | ||
183 | three keys. This means that each DES operation inside the CBC mode is | ||
184 | really an C<C=E(ks3,D(ks2,E(ks1,M)))>. This mode is used by SSL. | ||
185 | |||
186 | The DES_ede2_cbc_encrypt() macro implements two-key Triple-DES by | ||
187 | reusing I<ks1> for the final encryption. C<C=E(ks1,D(ks2,E(ks1,M)))>. | ||
188 | This form of Triple-DES is used by the RSAREF library. | ||
189 | |||
190 | DES_pcbc_encrypt() encrypt/decrypts using the propagating cipher block | ||
191 | chaining mode used by Kerberos v4. Its parameters are the same as | ||
192 | DES_ncbc_encrypt(). | ||
193 | |||
194 | DES_cfb_encrypt() encrypt/decrypts using cipher feedback mode. This | ||
195 | method takes an array of characters as input and outputs and array of | ||
196 | characters. It does not require any padding to 8 character groups. | ||
197 | Note: the I<ivec> variable is changed and the new changed value needs to | ||
198 | be passed to the next call to this function. Since this function runs | ||
199 | a complete DES ECB encryption per I<numbits>, this function is only | ||
200 | suggested for use when sending small numbers of characters. | ||
201 | |||
202 | DES_cfb64_encrypt() | ||
203 | implements CFB mode of DES with 64bit feedback. Why is this | ||
204 | useful you ask? Because this routine will allow you to encrypt an | ||
205 | arbitrary number of bytes, no 8 byte padding. Each call to this | ||
206 | routine will encrypt the input bytes to output and then update ivec | ||
207 | and num. num contains 'how far' we are though ivec. If this does | ||
208 | not make much sense, read more about cfb mode of DES :-). | ||
209 | |||
210 | DES_ede3_cfb64_encrypt() and DES_ede2_cfb64_encrypt() is the same as | ||
211 | DES_cfb64_encrypt() except that Triple-DES is used. | ||
212 | |||
213 | DES_ofb_encrypt() encrypts using output feedback mode. This method | ||
214 | takes an array of characters as input and outputs and array of | ||
215 | characters. It does not require any padding to 8 character groups. | ||
216 | Note: the I<ivec> variable is changed and the new changed value needs to | ||
217 | be passed to the next call to this function. Since this function runs | ||
218 | a complete DES ECB encryption per numbits, this function is only | ||
219 | suggested for use when sending small numbers of characters. | ||
220 | |||
221 | DES_ofb64_encrypt() is the same as DES_cfb64_encrypt() using Output | ||
222 | Feed Back mode. | ||
223 | |||
224 | DES_ede3_ofb64_encrypt() and DES_ede2_ofb64_encrypt() is the same as | ||
225 | DES_ofb64_encrypt(), using Triple-DES. | ||
226 | |||
227 | The following functions are included in the DES library for | ||
228 | compatibility with the MIT Kerberos library. | ||
229 | |||
230 | DES_cbc_cksum() produces an 8 byte checksum based on the input stream | ||
231 | (via CBC encryption). The last 4 bytes of the checksum are returned | ||
232 | and the complete 8 bytes are placed in I<output>. This function is | ||
233 | used by Kerberos v4. Other applications should use | ||
234 | L<EVP_DigestInit(3)|EVP_DigestInit(3)> etc. instead. | ||
235 | |||
236 | DES_quad_cksum() is a Kerberos v4 function. It returns a 4 byte | ||
237 | checksum from the input bytes. The algorithm can be iterated over the | ||
238 | input, depending on I<out_count>, 1, 2, 3 or 4 times. If I<output> is | ||
239 | non-NULL, the 8 bytes generated by each pass are written into | ||
240 | I<output>. | ||
241 | |||
242 | The following are DES-based transformations: | ||
243 | |||
244 | DES_fcrypt() is a fast version of the Unix crypt(3) function. This | ||
245 | version takes only a small amount of space relative to other fast | ||
246 | crypt() implementations. This is different to the normal crypt in | ||
247 | that the third parameter is the buffer that the return value is | ||
248 | written into. It needs to be at least 14 bytes long. This function | ||
249 | is thread safe, unlike the normal crypt. | ||
250 | |||
251 | DES_crypt() is a faster replacement for the normal system crypt(). | ||
252 | This function calls DES_fcrypt() with a static array passed as the | ||
253 | third parameter. This emulates the normal non-thread safe semantics | ||
254 | of crypt(3). | ||
255 | |||
256 | DES_enc_write() writes I<len> bytes to file descriptor I<fd> from | ||
257 | buffer I<buf>. The data is encrypted via I<pcbc_encrypt> (default) | ||
258 | using I<sched> for the key and I<iv> as a starting vector. The actual | ||
259 | data send down I<fd> consists of 4 bytes (in network byte order) | ||
260 | containing the length of the following encrypted data. The encrypted | ||
261 | data then follows, padded with random data out to a multiple of 8 | ||
262 | bytes. | ||
263 | |||
264 | DES_enc_read() is used to read I<len> bytes from file descriptor | ||
265 | I<fd> into buffer I<buf>. The data being read from I<fd> is assumed to | ||
266 | have come from DES_enc_write() and is decrypted using I<sched> for | ||
267 | the key schedule and I<iv> for the initial vector. | ||
268 | |||
269 | B<Warning:> The data format used by DES_enc_write() and DES_enc_read() | ||
270 | has a cryptographic weakness: When asked to write more than MAXWRITE | ||
271 | bytes, DES_enc_write() will split the data into several chunks that | ||
272 | are all encrypted using the same IV. So don't use these functions | ||
273 | unless you are sure you know what you do (in which case you might not | ||
274 | want to use them anyway). They cannot handle non-blocking sockets. | ||
275 | DES_enc_read() uses an internal state and thus cannot be used on | ||
276 | multiple files. | ||
277 | |||
278 | I<DES_rw_mode> is used to specify the encryption mode to use with | ||
279 | DES_enc_read() and DES_end_write(). If set to I<DES_PCBC_MODE> (the | ||
280 | default), DES_pcbc_encrypt is used. If set to I<DES_CBC_MODE> | ||
281 | DES_cbc_encrypt is used. | ||
282 | |||
283 | =head1 NOTES | ||
284 | |||
285 | Single-key DES is insecure due to its short key size. ECB mode is | ||
286 | not suitable for most applications; see L<des_modes(7)|des_modes(7)>. | ||
287 | |||
288 | The L<evp(3)|evp(3)> library provides higher-level encryption functions. | ||
289 | |||
290 | =head1 BUGS | ||
291 | |||
292 | DES_3cbc_encrypt() is flawed and must not be used in applications. | ||
293 | |||
294 | DES_cbc_encrypt() does not modify B<ivec>; use DES_ncbc_encrypt() | ||
295 | instead. | ||
296 | |||
297 | DES_cfb_encrypt() and DES_ofb_encrypt() operates on input of 8 bits. | ||
298 | What this means is that if you set numbits to 12, and length to 2, the | ||
299 | first 12 bits will come from the 1st input byte and the low half of | ||
300 | the second input byte. The second 12 bits will have the low 8 bits | ||
301 | taken from the 3rd input byte and the top 4 bits taken from the 4th | ||
302 | input byte. The same holds for output. This function has been | ||
303 | implemented this way because most people will be using a multiple of 8 | ||
304 | and because once you get into pulling bytes input bytes apart things | ||
305 | get ugly! | ||
306 | |||
307 | DES_string_to_key() is available for backward compatibility with the | ||
308 | MIT library. New applications should use a cryptographic hash function. | ||
309 | The same applies for DES_string_to_2key(). | ||
310 | |||
311 | =head1 CONFORMING TO | ||
312 | |||
313 | ANSI X3.106 | ||
314 | |||
315 | The B<des> library was written to be source code compatible with | ||
316 | the MIT Kerberos library. | ||
317 | |||
318 | =head1 SEE ALSO | ||
319 | |||
320 | crypt(3), L<des_modes(7)|des_modes(7)>, L<evp(3)|evp(3)>, L<rand(3)|rand(3)> | ||
321 | |||
322 | =head1 HISTORY | ||
323 | |||
324 | In OpenSSL 0.9.7, all des_ functions were renamed to DES_ to avoid | ||
325 | clashes with older versions of libdes. Compatibility des_ functions | ||
326 | are provided for a short while, as well as crypt(). | ||
327 | Declarations for these are in <openssl/des_old.h>. There is no DES_ | ||
328 | variant for des_random_seed(). | ||
329 | This will happen to other functions | ||
330 | as well if they are deemed redundant (des_random_seed() just calls | ||
331 | RAND_seed() and is present for backward compatibility only), buggy or | ||
332 | already scheduled for removal. | ||
333 | |||
334 | des_cbc_cksum(), des_cbc_encrypt(), des_ecb_encrypt(), | ||
335 | des_is_weak_key(), des_key_sched(), des_pcbc_encrypt(), | ||
336 | des_quad_cksum(), des_random_key() and des_string_to_key() | ||
337 | are available in the MIT Kerberos library; | ||
338 | des_check_key_parity(), des_fixup_key_parity() and des_is_weak_key() | ||
339 | are available in newer versions of that library. | ||
340 | |||
341 | des_set_key_checked() and des_set_key_unchecked() were added in | ||
342 | OpenSSL 0.9.5. | ||
343 | |||
344 | des_generate_random_block(), des_init_random_number_generator(), | ||
345 | des_new_random_key(), des_set_random_generator_seed() and | ||
346 | des_set_sequence_number() and des_rand_data() are used in newer | ||
347 | versions of Kerberos but are not implemented here. | ||
348 | |||
349 | des_random_key() generated cryptographically weak random data in | ||
350 | SSLeay and in OpenSSL prior version 0.9.5, as well as in the original | ||
351 | MIT library. | ||
352 | |||
353 | =head1 AUTHOR | ||
354 | |||
355 | Eric Young (eay@cryptsoft.com). Modified for the OpenSSL project | ||
356 | (http://www.openssl.org). | ||
357 | |||
358 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/ERR.pod b/src/lib/libssl/src/doc/crypto/ERR.pod new file mode 100644 index 0000000000..6f729554d2 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/ERR.pod | |||
@@ -0,0 +1,187 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | err - error codes | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/err.h> | ||
10 | |||
11 | unsigned long ERR_get_error(void); | ||
12 | unsigned long ERR_peek_error(void); | ||
13 | unsigned long ERR_get_error_line(const char **file, int *line); | ||
14 | unsigned long ERR_peek_error_line(const char **file, int *line); | ||
15 | unsigned long ERR_get_error_line_data(const char **file, int *line, | ||
16 | const char **data, int *flags); | ||
17 | unsigned long ERR_peek_error_line_data(const char **file, int *line, | ||
18 | const char **data, int *flags); | ||
19 | |||
20 | int ERR_GET_LIB(unsigned long e); | ||
21 | int ERR_GET_FUNC(unsigned long e); | ||
22 | int ERR_GET_REASON(unsigned long e); | ||
23 | |||
24 | void ERR_clear_error(void); | ||
25 | |||
26 | char *ERR_error_string(unsigned long e, char *buf); | ||
27 | const char *ERR_lib_error_string(unsigned long e); | ||
28 | const char *ERR_func_error_string(unsigned long e); | ||
29 | const char *ERR_reason_error_string(unsigned long e); | ||
30 | |||
31 | void ERR_print_errors(BIO *bp); | ||
32 | void ERR_print_errors_fp(FILE *fp); | ||
33 | |||
34 | void ERR_load_crypto_strings(void); | ||
35 | void ERR_free_strings(void); | ||
36 | |||
37 | void ERR_remove_state(unsigned long pid); | ||
38 | |||
39 | void ERR_put_error(int lib, int func, int reason, const char *file, | ||
40 | int line); | ||
41 | void ERR_add_error_data(int num, ...); | ||
42 | |||
43 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); | ||
44 | unsigned long ERR_PACK(int lib, int func, int reason); | ||
45 | int ERR_get_next_error_library(void); | ||
46 | |||
47 | =head1 DESCRIPTION | ||
48 | |||
49 | When a call to the OpenSSL library fails, this is usually signalled | ||
50 | by the return value, and an error code is stored in an error queue | ||
51 | associated with the current thread. The B<err> library provides | ||
52 | functions to obtain these error codes and textual error messages. | ||
53 | |||
54 | The L<ERR_get_error(3)|ERR_get_error(3)> manpage describes how to | ||
55 | access error codes. | ||
56 | |||
57 | Error codes contain information about where the error occurred, and | ||
58 | what went wrong. L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> describes how to | ||
59 | extract this information. A method to obtain human-readable error | ||
60 | messages is described in L<ERR_error_string(3)|ERR_error_string(3)>. | ||
61 | |||
62 | L<ERR_clear_error(3)|ERR_clear_error(3)> can be used to clear the | ||
63 | error queue. | ||
64 | |||
65 | Note that L<ERR_remove_state(3)|ERR_remove_state(3)> should be used to | ||
66 | avoid memory leaks when threads are terminated. | ||
67 | |||
68 | =head1 ADDING NEW ERROR CODES TO OPENSSL | ||
69 | |||
70 | See L<ERR_put_error(3)> if you want to record error codes in the | ||
71 | OpenSSL error system from within your application. | ||
72 | |||
73 | The remainder of this section is of interest only if you want to add | ||
74 | new error codes to OpenSSL or add error codes from external libraries. | ||
75 | |||
76 | =head2 Reporting errors | ||
77 | |||
78 | Each sub-library has a specific macro XXXerr() that is used to report | ||
79 | errors. Its first argument is a function code B<XXX_F_...>, the second | ||
80 | argument is a reason code B<XXX_R_...>. Function codes are derived | ||
81 | from the function names; reason codes consist of textual error | ||
82 | descriptions. For example, the function ssl23_read() reports a | ||
83 | "handshake failure" as follows: | ||
84 | |||
85 | SSLerr(SSL_F_SSL23_READ, SSL_R_SSL_HANDSHAKE_FAILURE); | ||
86 | |||
87 | Function and reason codes should consist of upper case characters, | ||
88 | numbers and underscores only. The error file generation script translates | ||
89 | function codes into function names by looking in the header files | ||
90 | for an appropriate function name, if none is found it just uses | ||
91 | the capitalized form such as "SSL23_READ" in the above example. | ||
92 | |||
93 | The trailing section of a reason code (after the "_R_") is translated | ||
94 | into lower case and underscores changed to spaces. | ||
95 | |||
96 | When you are using new function or reason codes, run B<make errors>. | ||
97 | The necessary B<#define>s will then automatically be added to the | ||
98 | sub-library's header file. | ||
99 | |||
100 | Although a library will normally report errors using its own specific | ||
101 | XXXerr macro, another library's macro can be used. This is normally | ||
102 | only done when a library wants to include ASN1 code which must use | ||
103 | the ASN1err() macro. | ||
104 | |||
105 | =head2 Adding new libraries | ||
106 | |||
107 | When adding a new sub-library to OpenSSL, assign it a library number | ||
108 | B<ERR_LIB_XXX>, define a macro XXXerr() (both in B<err.h>), add its | ||
109 | name to B<ERR_str_libraries[]> (in B<crypto/err/err.c>), and add | ||
110 | C<ERR_load_XXX_strings()> to the ERR_load_crypto_strings() function | ||
111 | (in B<crypto/err/err_all.c>). Finally, add an entry | ||
112 | |||
113 | L XXX xxx.h xxx_err.c | ||
114 | |||
115 | to B<crypto/err/openssl.ec>, and add B<xxx_err.c> to the Makefile. | ||
116 | Running B<make errors> will then generate a file B<xxx_err.c>, and | ||
117 | add all error codes used in the library to B<xxx.h>. | ||
118 | |||
119 | Additionally the library include file must have a certain form. | ||
120 | Typically it will initially look like this: | ||
121 | |||
122 | #ifndef HEADER_XXX_H | ||
123 | #define HEADER_XXX_H | ||
124 | |||
125 | #ifdef __cplusplus | ||
126 | extern "C" { | ||
127 | #endif | ||
128 | |||
129 | /* Include files */ | ||
130 | |||
131 | #include <openssl/bio.h> | ||
132 | #include <openssl/x509.h> | ||
133 | |||
134 | /* Macros, structures and function prototypes */ | ||
135 | |||
136 | |||
137 | /* BEGIN ERROR CODES */ | ||
138 | |||
139 | The B<BEGIN ERROR CODES> sequence is used by the error code | ||
140 | generation script as the point to place new error codes, any text | ||
141 | after this point will be overwritten when B<make errors> is run. | ||
142 | The closing #endif etc will be automatically added by the script. | ||
143 | |||
144 | The generated C error code file B<xxx_err.c> will load the header | ||
145 | files B<stdio.h>, B<openssl/err.h> and B<openssl/xxx.h> so the | ||
146 | header file must load any additional header files containing any | ||
147 | definitions it uses. | ||
148 | |||
149 | =head1 USING ERROR CODES IN EXTERNAL LIBRARIES | ||
150 | |||
151 | It is also possible to use OpenSSL's error code scheme in external | ||
152 | libraries. The library needs to load its own codes and call the OpenSSL | ||
153 | error code insertion script B<mkerr.pl> explicitly to add codes to | ||
154 | the header file and generate the C error code file. This will normally | ||
155 | be done if the external library needs to generate new ASN1 structures | ||
156 | but it can also be used to add more general purpose error code handling. | ||
157 | |||
158 | TBA more details | ||
159 | |||
160 | =head1 INTERNALS | ||
161 | |||
162 | The error queues are stored in a hash table with one B<ERR_STATE> | ||
163 | entry for each pid. ERR_get_state() returns the current thread's | ||
164 | B<ERR_STATE>. An B<ERR_STATE> can hold up to B<ERR_NUM_ERRORS> error | ||
165 | codes. When more error codes are added, the old ones are overwritten, | ||
166 | on the assumption that the most recent errors are most important. | ||
167 | |||
168 | Error strings are also stored in hash table. The hash tables can | ||
169 | be obtained by calling ERR_get_err_state_table(void) and | ||
170 | ERR_get_string_table(void) respectively. | ||
171 | |||
172 | =head1 SEE ALSO | ||
173 | |||
174 | L<CRYPTO_set_id_callback(3)|CRYPTO_set_id_callback(3)>, | ||
175 | L<CRYPTO_set_locking_callback(3)|CRYPTO_set_locking_callback(3)>, | ||
176 | L<ERR_get_error(3)|ERR_get_error(3)>, | ||
177 | L<ERR_GET_LIB(3)|ERR_GET_LIB(3)>, | ||
178 | L<ERR_clear_error(3)|ERR_clear_error(3)>, | ||
179 | L<ERR_error_string(3)|ERR_error_string(3)>, | ||
180 | L<ERR_print_errors(3)|ERR_print_errors(3)>, | ||
181 | L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, | ||
182 | L<ERR_remove_state(3)|ERR_remove_state(3)>, | ||
183 | L<ERR_put_error(3)|ERR_put_error(3)>, | ||
184 | L<ERR_load_strings(3)|ERR_load_strings(3)>, | ||
185 | L<SSL_get_error(3)|SSL_get_error(3)> | ||
186 | |||
187 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/HMAC.pod b/src/lib/libssl/src/doc/crypto/HMAC.pod new file mode 100644 index 0000000000..d92138d273 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/HMAC.pod | |||
@@ -0,0 +1,106 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | HMAC, HMAC_Init, HMAC_Update, HMAC_Final, HMAC_cleanup - HMAC message | ||
6 | authentication code | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | #include <openssl/hmac.h> | ||
11 | |||
12 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, | ||
13 | int key_len, const unsigned char *d, int n, | ||
14 | unsigned char *md, unsigned int *md_len); | ||
15 | |||
16 | void HMAC_CTX_init(HMAC_CTX *ctx); | ||
17 | |||
18 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len, | ||
19 | const EVP_MD *md); | ||
20 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int key_len, | ||
21 | const EVP_MD *md, ENGINE *impl); | ||
22 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len); | ||
23 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); | ||
24 | |||
25 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); | ||
26 | void HMAC_cleanup(HMAC_CTX *ctx); | ||
27 | |||
28 | =head1 DESCRIPTION | ||
29 | |||
30 | HMAC is a MAC (message authentication code), i.e. a keyed hash | ||
31 | function used for message authentication, which is based on a hash | ||
32 | function. | ||
33 | |||
34 | HMAC() computes the message authentication code of the B<n> bytes at | ||
35 | B<d> using the hash function B<evp_md> and the key B<key> which is | ||
36 | B<key_len> bytes long. | ||
37 | |||
38 | It places the result in B<md> (which must have space for the output of | ||
39 | the hash function, which is no more than B<EVP_MAX_MD_SIZE> bytes). | ||
40 | If B<md> is NULL, the digest is placed in a static array. The size of | ||
41 | the output is placed in B<md_len>, unless it is B<NULL>. | ||
42 | |||
43 | B<evp_md> can be EVP_sha1(), EVP_ripemd160() etc. | ||
44 | |||
45 | HMAC_CTX_init() initialises a B<HMAC_CTX> before first use. It must be | ||
46 | called. | ||
47 | |||
48 | HMAC_CTX_cleanup() erases the key and other data from the B<HMAC_CTX> | ||
49 | and releases any associated resources. It must be called when an | ||
50 | B<HMAC_CTX> is no longer required. | ||
51 | |||
52 | HMAC_cleanup() is an alias for HMAC_CTX_cleanup() included for back | ||
53 | compatibility with 0.9.6b, it is deprecated. | ||
54 | |||
55 | The following functions may be used if the message is not completely | ||
56 | stored in memory: | ||
57 | |||
58 | HMAC_Init() initializes a B<HMAC_CTX> structure to use the hash | ||
59 | function B<evp_md> and the key B<key> which is B<key_len> bytes | ||
60 | long. It is deprecated and only included for backward compatibility | ||
61 | with OpenSSL 0.9.6b. | ||
62 | |||
63 | HMAC_Init_ex() initializes or reuses a B<HMAC_CTX> structure to use | ||
64 | the function B<evp_md> and key B<key>. Either can be NULL, in which | ||
65 | case the existing one will be reused. HMAC_CTX_init() must have been | ||
66 | called before the first use of an B<HMAC_CTX> in this | ||
67 | function. B<N.B. HMAC_Init() had this undocumented behaviour in | ||
68 | previous versions of OpenSSL - failure to switch to HMAC_Init_ex() in | ||
69 | programs that expect it will cause them to stop working>. | ||
70 | |||
71 | HMAC_Update() can be called repeatedly with chunks of the message to | ||
72 | be authenticated (B<len> bytes at B<data>). | ||
73 | |||
74 | HMAC_Final() places the message authentication code in B<md>, which | ||
75 | must have space for the hash function output. | ||
76 | |||
77 | =head1 RETURN VALUES | ||
78 | |||
79 | HMAC() returns a pointer to the message authentication code or NULL if | ||
80 | an error occurred. | ||
81 | |||
82 | HMAC_Init_ex(), HMAC_Update() and HMAC_Final() return 1 for success or 0 if | ||
83 | an error occurred. | ||
84 | |||
85 | HMAC_CTX_init() and HMAC_CTX_cleanup() do not return values. | ||
86 | |||
87 | =head1 CONFORMING TO | ||
88 | |||
89 | RFC 2104 | ||
90 | |||
91 | =head1 SEE ALSO | ||
92 | |||
93 | L<sha(3)|sha(3)>, L<evp(3)|evp(3)> | ||
94 | |||
95 | =head1 HISTORY | ||
96 | |||
97 | HMAC(), HMAC_Init(), HMAC_Update(), HMAC_Final() and HMAC_cleanup() | ||
98 | are available since SSLeay 0.9.0. | ||
99 | |||
100 | HMAC_CTX_init(), HMAC_Init_ex() and HMAC_CTX_cleanup() are available | ||
101 | since OpenSSL 0.9.7. | ||
102 | |||
103 | HMAC_Init_ex(), HMAC_Update() and HMAC_Final() did not return values in | ||
104 | versions of OpenSSL before 1.0.0. | ||
105 | |||
106 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/MD5.pod b/src/lib/libssl/src/doc/crypto/MD5.pod new file mode 100644 index 0000000000..d11d5c32cb --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/MD5.pod | |||
@@ -0,0 +1,101 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | MD2, MD4, MD5, MD2_Init, MD2_Update, MD2_Final, MD4_Init, MD4_Update, | ||
6 | MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash functions | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | #include <openssl/md2.h> | ||
11 | |||
12 | unsigned char *MD2(const unsigned char *d, unsigned long n, | ||
13 | unsigned char *md); | ||
14 | |||
15 | int MD2_Init(MD2_CTX *c); | ||
16 | int MD2_Update(MD2_CTX *c, const unsigned char *data, | ||
17 | unsigned long len); | ||
18 | int MD2_Final(unsigned char *md, MD2_CTX *c); | ||
19 | |||
20 | |||
21 | #include <openssl/md4.h> | ||
22 | |||
23 | unsigned char *MD4(const unsigned char *d, unsigned long n, | ||
24 | unsigned char *md); | ||
25 | |||
26 | int MD4_Init(MD4_CTX *c); | ||
27 | int MD4_Update(MD4_CTX *c, const void *data, | ||
28 | unsigned long len); | ||
29 | int MD4_Final(unsigned char *md, MD4_CTX *c); | ||
30 | |||
31 | |||
32 | #include <openssl/md5.h> | ||
33 | |||
34 | unsigned char *MD5(const unsigned char *d, unsigned long n, | ||
35 | unsigned char *md); | ||
36 | |||
37 | int MD5_Init(MD5_CTX *c); | ||
38 | int MD5_Update(MD5_CTX *c, const void *data, | ||
39 | unsigned long len); | ||
40 | int MD5_Final(unsigned char *md, MD5_CTX *c); | ||
41 | |||
42 | =head1 DESCRIPTION | ||
43 | |||
44 | MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit output. | ||
45 | |||
46 | MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest | ||
47 | of the B<n> bytes at B<d> and place it in B<md> (which must have space | ||
48 | for MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16 | ||
49 | bytes of output). If B<md> is NULL, the digest is placed in a static | ||
50 | array. | ||
51 | |||
52 | The following functions may be used if the message is not completely | ||
53 | stored in memory: | ||
54 | |||
55 | MD2_Init() initializes a B<MD2_CTX> structure. | ||
56 | |||
57 | MD2_Update() can be called repeatedly with chunks of the message to | ||
58 | be hashed (B<len> bytes at B<data>). | ||
59 | |||
60 | MD2_Final() places the message digest in B<md>, which must have space | ||
61 | for MD2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MD2_CTX>. | ||
62 | |||
63 | MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and | ||
64 | MD5_Final() are analogous using an B<MD4_CTX> and B<MD5_CTX> structure. | ||
65 | |||
66 | Applications should use the higher level functions | ||
67 | L<EVP_DigestInit(3)|EVP_DigestInit(3)> | ||
68 | etc. instead of calling the hash functions directly. | ||
69 | |||
70 | =head1 NOTE | ||
71 | |||
72 | MD2, MD4, and MD5 are recommended only for compatibility with existing | ||
73 | applications. In new applications, SHA-1 or RIPEMD-160 should be | ||
74 | preferred. | ||
75 | |||
76 | =head1 RETURN VALUES | ||
77 | |||
78 | MD2(), MD4(), and MD5() return pointers to the hash value. | ||
79 | |||
80 | MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(), | ||
81 | MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for | ||
82 | success, 0 otherwise. | ||
83 | |||
84 | =head1 CONFORMING TO | ||
85 | |||
86 | RFC 1319, RFC 1320, RFC 1321 | ||
87 | |||
88 | =head1 SEE ALSO | ||
89 | |||
90 | L<sha(3)|sha(3)>, L<ripemd(3)|ripemd(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> | ||
91 | |||
92 | =head1 HISTORY | ||
93 | |||
94 | MD2(), MD2_Init(), MD2_Update() MD2_Final(), MD5(), MD5_Init(), | ||
95 | MD5_Update() and MD5_Final() are available in all versions of SSLeay | ||
96 | and OpenSSL. | ||
97 | |||
98 | MD4(), MD4_Init(), and MD4_Update() are available in OpenSSL 0.9.6 and | ||
99 | above. | ||
100 | |||
101 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/PEM_read_bio_PrivateKey.pod b/src/lib/libssl/src/doc/crypto/PEM_read_bio_PrivateKey.pod new file mode 100644 index 0000000000..54414a3f6f --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/PEM_read_bio_PrivateKey.pod | |||
@@ -0,0 +1,476 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | PEM, PEM_read_bio_PrivateKey, PEM_read_PrivateKey, PEM_write_bio_PrivateKey, PEM_write_PrivateKey, PEM_write_bio_PKCS8PrivateKey, PEM_write_PKCS8PrivateKey, PEM_write_bio_PKCS8PrivateKey_nid, PEM_write_PKCS8PrivateKey_nid, PEM_read_bio_PUBKEY, PEM_read_PUBKEY, PEM_write_bio_PUBKEY, PEM_write_PUBKEY, PEM_read_bio_RSAPrivateKey, PEM_read_RSAPrivateKey, PEM_write_bio_RSAPrivateKey, PEM_write_RSAPrivateKey, PEM_read_bio_RSAPublicKey, PEM_read_RSAPublicKey, PEM_write_bio_RSAPublicKey, PEM_write_RSAPublicKey, PEM_read_bio_RSA_PUBKEY, PEM_read_RSA_PUBKEY, PEM_write_bio_RSA_PUBKEY, PEM_write_RSA_PUBKEY, PEM_read_bio_DSAPrivateKey, PEM_read_DSAPrivateKey, PEM_write_bio_DSAPrivateKey, PEM_write_DSAPrivateKey, PEM_read_bio_DSA_PUBKEY, PEM_read_DSA_PUBKEY, PEM_write_bio_DSA_PUBKEY, PEM_write_DSA_PUBKEY, PEM_read_bio_DSAparams, PEM_read_DSAparams, PEM_write_bio_DSAparams, PEM_write_DSAparams, PEM_read_bio_DHparams, PEM_read_DHparams, PEM_write_bio_DHparams, PEM_write_DHparams, PEM_read_bio_X509, PEM_read_X509, PEM_write_bio_X509, PEM_write_X509, PEM_read_bio_X509_AUX, PEM_read_X509_AUX, PEM_write_bio_X509_AUX, PEM_write_X509_AUX, PEM_read_bio_X509_REQ, PEM_read_X509_REQ, PEM_write_bio_X509_REQ, PEM_write_X509_REQ, PEM_write_bio_X509_REQ_NEW, PEM_write_X509_REQ_NEW, PEM_read_bio_X509_CRL, PEM_read_X509_CRL, PEM_write_bio_X509_CRL, PEM_write_X509_CRL, PEM_read_bio_PKCS7, PEM_read_PKCS7, PEM_write_bio_PKCS7, PEM_write_PKCS7, PEM_read_bio_NETSCAPE_CERT_SEQUENCE, PEM_read_NETSCAPE_CERT_SEQUENCE, PEM_write_bio_NETSCAPE_CERT_SEQUENCE, PEM_write_NETSCAPE_CERT_SEQUENCE - PEM routines | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/pem.h> | ||
10 | |||
11 | EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, | ||
12 | pem_password_cb *cb, void *u); | ||
13 | |||
14 | EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, | ||
15 | pem_password_cb *cb, void *u); | ||
16 | |||
17 | int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | ||
18 | unsigned char *kstr, int klen, | ||
19 | pem_password_cb *cb, void *u); | ||
20 | |||
21 | int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, | ||
22 | unsigned char *kstr, int klen, | ||
23 | pem_password_cb *cb, void *u); | ||
24 | |||
25 | int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | ||
26 | char *kstr, int klen, | ||
27 | pem_password_cb *cb, void *u); | ||
28 | |||
29 | int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, | ||
30 | char *kstr, int klen, | ||
31 | pem_password_cb *cb, void *u); | ||
32 | |||
33 | int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, | ||
34 | char *kstr, int klen, | ||
35 | pem_password_cb *cb, void *u); | ||
36 | |||
37 | int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, | ||
38 | char *kstr, int klen, | ||
39 | pem_password_cb *cb, void *u); | ||
40 | |||
41 | EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, | ||
42 | pem_password_cb *cb, void *u); | ||
43 | |||
44 | EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, | ||
45 | pem_password_cb *cb, void *u); | ||
46 | |||
47 | int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x); | ||
48 | int PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x); | ||
49 | |||
50 | RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x, | ||
51 | pem_password_cb *cb, void *u); | ||
52 | |||
53 | RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **x, | ||
54 | pem_password_cb *cb, void *u); | ||
55 | |||
56 | int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc, | ||
57 | unsigned char *kstr, int klen, | ||
58 | pem_password_cb *cb, void *u); | ||
59 | |||
60 | int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc, | ||
61 | unsigned char *kstr, int klen, | ||
62 | pem_password_cb *cb, void *u); | ||
63 | |||
64 | RSA *PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x, | ||
65 | pem_password_cb *cb, void *u); | ||
66 | |||
67 | RSA *PEM_read_RSAPublicKey(FILE *fp, RSA **x, | ||
68 | pem_password_cb *cb, void *u); | ||
69 | |||
70 | int PEM_write_bio_RSAPublicKey(BIO *bp, RSA *x); | ||
71 | |||
72 | int PEM_write_RSAPublicKey(FILE *fp, RSA *x); | ||
73 | |||
74 | RSA *PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x, | ||
75 | pem_password_cb *cb, void *u); | ||
76 | |||
77 | RSA *PEM_read_RSA_PUBKEY(FILE *fp, RSA **x, | ||
78 | pem_password_cb *cb, void *u); | ||
79 | |||
80 | int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x); | ||
81 | |||
82 | int PEM_write_RSA_PUBKEY(FILE *fp, RSA *x); | ||
83 | |||
84 | DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **x, | ||
85 | pem_password_cb *cb, void *u); | ||
86 | |||
87 | DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **x, | ||
88 | pem_password_cb *cb, void *u); | ||
89 | |||
90 | int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc, | ||
91 | unsigned char *kstr, int klen, | ||
92 | pem_password_cb *cb, void *u); | ||
93 | |||
94 | int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc, | ||
95 | unsigned char *kstr, int klen, | ||
96 | pem_password_cb *cb, void *u); | ||
97 | |||
98 | DSA *PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x, | ||
99 | pem_password_cb *cb, void *u); | ||
100 | |||
101 | DSA *PEM_read_DSA_PUBKEY(FILE *fp, DSA **x, | ||
102 | pem_password_cb *cb, void *u); | ||
103 | |||
104 | int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x); | ||
105 | |||
106 | int PEM_write_DSA_PUBKEY(FILE *fp, DSA *x); | ||
107 | |||
108 | DSA *PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u); | ||
109 | |||
110 | DSA *PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u); | ||
111 | |||
112 | int PEM_write_bio_DSAparams(BIO *bp, DSA *x); | ||
113 | |||
114 | int PEM_write_DSAparams(FILE *fp, DSA *x); | ||
115 | |||
116 | DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u); | ||
117 | |||
118 | DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u); | ||
119 | |||
120 | int PEM_write_bio_DHparams(BIO *bp, DH *x); | ||
121 | |||
122 | int PEM_write_DHparams(FILE *fp, DH *x); | ||
123 | |||
124 | X509 *PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u); | ||
125 | |||
126 | X509 *PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u); | ||
127 | |||
128 | int PEM_write_bio_X509(BIO *bp, X509 *x); | ||
129 | |||
130 | int PEM_write_X509(FILE *fp, X509 *x); | ||
131 | |||
132 | X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u); | ||
133 | |||
134 | X509 *PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u); | ||
135 | |||
136 | int PEM_write_bio_X509_AUX(BIO *bp, X509 *x); | ||
137 | |||
138 | int PEM_write_X509_AUX(FILE *fp, X509 *x); | ||
139 | |||
140 | X509_REQ *PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x, | ||
141 | pem_password_cb *cb, void *u); | ||
142 | |||
143 | X509_REQ *PEM_read_X509_REQ(FILE *fp, X509_REQ **x, | ||
144 | pem_password_cb *cb, void *u); | ||
145 | |||
146 | int PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x); | ||
147 | |||
148 | int PEM_write_X509_REQ(FILE *fp, X509_REQ *x); | ||
149 | |||
150 | int PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x); | ||
151 | |||
152 | int PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x); | ||
153 | |||
154 | X509_CRL *PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x, | ||
155 | pem_password_cb *cb, void *u); | ||
156 | X509_CRL *PEM_read_X509_CRL(FILE *fp, X509_CRL **x, | ||
157 | pem_password_cb *cb, void *u); | ||
158 | int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x); | ||
159 | int PEM_write_X509_CRL(FILE *fp, X509_CRL *x); | ||
160 | |||
161 | PKCS7 *PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u); | ||
162 | |||
163 | PKCS7 *PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u); | ||
164 | |||
165 | int PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x); | ||
166 | |||
167 | int PEM_write_PKCS7(FILE *fp, PKCS7 *x); | ||
168 | |||
169 | NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp, | ||
170 | NETSCAPE_CERT_SEQUENCE **x, | ||
171 | pem_password_cb *cb, void *u); | ||
172 | |||
173 | NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *fp, | ||
174 | NETSCAPE_CERT_SEQUENCE **x, | ||
175 | pem_password_cb *cb, void *u); | ||
176 | |||
177 | int PEM_write_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp, NETSCAPE_CERT_SEQUENCE *x); | ||
178 | |||
179 | int PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE *x); | ||
180 | |||
181 | =head1 DESCRIPTION | ||
182 | |||
183 | The PEM functions read or write structures in PEM format. In | ||
184 | this sense PEM format is simply base64 encoded data surrounded | ||
185 | by header lines. | ||
186 | |||
187 | For more details about the meaning of arguments see the | ||
188 | B<PEM FUNCTION ARGUMENTS> section. | ||
189 | |||
190 | Each operation has four functions associated with it. For | ||
191 | clarity the term "B<foobar> functions" will be used to collectively | ||
192 | refer to the PEM_read_bio_foobar(), PEM_read_foobar(), | ||
193 | PEM_write_bio_foobar() and PEM_write_foobar() functions. | ||
194 | |||
195 | The B<PrivateKey> functions read or write a private key in | ||
196 | PEM format using an EVP_PKEY structure. The write routines use | ||
197 | "traditional" private key format and can handle both RSA and DSA | ||
198 | private keys. The read functions can additionally transparently | ||
199 | handle PKCS#8 format encrypted and unencrypted keys too. | ||
200 | |||
201 | PEM_write_bio_PKCS8PrivateKey() and PEM_write_PKCS8PrivateKey() | ||
202 | write a private key in an EVP_PKEY structure in PKCS#8 | ||
203 | EncryptedPrivateKeyInfo format using PKCS#5 v2.0 password based encryption | ||
204 | algorithms. The B<cipher> argument specifies the encryption algorithm to | ||
205 | use: unlike all other PEM routines the encryption is applied at the | ||
206 | PKCS#8 level and not in the PEM headers. If B<cipher> is NULL then no | ||
207 | encryption is used and a PKCS#8 PrivateKeyInfo structure is used instead. | ||
208 | |||
209 | PEM_write_bio_PKCS8PrivateKey_nid() and PEM_write_PKCS8PrivateKey_nid() | ||
210 | also write out a private key as a PKCS#8 EncryptedPrivateKeyInfo however | ||
211 | it uses PKCS#5 v1.5 or PKCS#12 encryption algorithms instead. The algorithm | ||
212 | to use is specified in the B<nid> parameter and should be the NID of the | ||
213 | corresponding OBJECT IDENTIFIER (see NOTES section). | ||
214 | |||
215 | The B<PUBKEY> functions process a public key using an EVP_PKEY | ||
216 | structure. The public key is encoded as a SubjectPublicKeyInfo | ||
217 | structure. | ||
218 | |||
219 | The B<RSAPrivateKey> functions process an RSA private key using an | ||
220 | RSA structure. It handles the same formats as the B<PrivateKey> | ||
221 | functions but an error occurs if the private key is not RSA. | ||
222 | |||
223 | The B<RSAPublicKey> functions process an RSA public key using an | ||
224 | RSA structure. The public key is encoded using a PKCS#1 RSAPublicKey | ||
225 | structure. | ||
226 | |||
227 | The B<RSA_PUBKEY> functions also process an RSA public key using | ||
228 | an RSA structure. However the public key is encoded using a | ||
229 | SubjectPublicKeyInfo structure and an error occurs if the public | ||
230 | key is not RSA. | ||
231 | |||
232 | The B<DSAPrivateKey> functions process a DSA private key using a | ||
233 | DSA structure. It handles the same formats as the B<PrivateKey> | ||
234 | functions but an error occurs if the private key is not DSA. | ||
235 | |||
236 | The B<DSA_PUBKEY> functions process a DSA public key using | ||
237 | a DSA structure. The public key is encoded using a | ||
238 | SubjectPublicKeyInfo structure and an error occurs if the public | ||
239 | key is not DSA. | ||
240 | |||
241 | The B<DSAparams> functions process DSA parameters using a DSA | ||
242 | structure. The parameters are encoded using a foobar structure. | ||
243 | |||
244 | The B<DHparams> functions process DH parameters using a DH | ||
245 | structure. The parameters are encoded using a PKCS#3 DHparameter | ||
246 | structure. | ||
247 | |||
248 | The B<X509> functions process an X509 certificate using an X509 | ||
249 | structure. They will also process a trusted X509 certificate but | ||
250 | any trust settings are discarded. | ||
251 | |||
252 | The B<X509_AUX> functions process a trusted X509 certificate using | ||
253 | an X509 structure. | ||
254 | |||
255 | The B<X509_REQ> and B<X509_REQ_NEW> functions process a PKCS#10 | ||
256 | certificate request using an X509_REQ structure. The B<X509_REQ> | ||
257 | write functions use B<CERTIFICATE REQUEST> in the header whereas | ||
258 | the B<X509_REQ_NEW> functions use B<NEW CERTIFICATE REQUEST> | ||
259 | (as required by some CAs). The B<X509_REQ> read functions will | ||
260 | handle either form so there are no B<X509_REQ_NEW> read functions. | ||
261 | |||
262 | The B<X509_CRL> functions process an X509 CRL using an X509_CRL | ||
263 | structure. | ||
264 | |||
265 | The B<PKCS7> functions process a PKCS#7 ContentInfo using a PKCS7 | ||
266 | structure. | ||
267 | |||
268 | The B<NETSCAPE_CERT_SEQUENCE> functions process a Netscape Certificate | ||
269 | Sequence using a NETSCAPE_CERT_SEQUENCE structure. | ||
270 | |||
271 | =head1 PEM FUNCTION ARGUMENTS | ||
272 | |||
273 | The PEM functions have many common arguments. | ||
274 | |||
275 | The B<bp> BIO parameter (if present) specifies the BIO to read from | ||
276 | or write to. | ||
277 | |||
278 | The B<fp> FILE parameter (if present) specifies the FILE pointer to | ||
279 | read from or write to. | ||
280 | |||
281 | The PEM read functions all take an argument B<TYPE **x> and return | ||
282 | a B<TYPE *> pointer. Where B<TYPE> is whatever structure the function | ||
283 | uses. If B<x> is NULL then the parameter is ignored. If B<x> is not | ||
284 | NULL but B<*x> is NULL then the structure returned will be written | ||
285 | to B<*x>. If neither B<x> nor B<*x> is NULL then an attempt is made | ||
286 | to reuse the structure at B<*x> (but see BUGS and EXAMPLES sections). | ||
287 | Irrespective of the value of B<x> a pointer to the structure is always | ||
288 | returned (or NULL if an error occurred). | ||
289 | |||
290 | The PEM functions which write private keys take an B<enc> parameter | ||
291 | which specifies the encryption algorithm to use, encryption is done | ||
292 | at the PEM level. If this parameter is set to NULL then the private | ||
293 | key is written in unencrypted form. | ||
294 | |||
295 | The B<cb> argument is the callback to use when querying for the pass | ||
296 | phrase used for encrypted PEM structures (normally only private keys). | ||
297 | |||
298 | For the PEM write routines if the B<kstr> parameter is not NULL then | ||
299 | B<klen> bytes at B<kstr> are used as the passphrase and B<cb> is | ||
300 | ignored. | ||
301 | |||
302 | If the B<cb> parameters is set to NULL and the B<u> parameter is not | ||
303 | NULL then the B<u> parameter is interpreted as a null terminated string | ||
304 | to use as the passphrase. If both B<cb> and B<u> are NULL then the | ||
305 | default callback routine is used which will typically prompt for the | ||
306 | passphrase on the current terminal with echoing turned off. | ||
307 | |||
308 | The default passphrase callback is sometimes inappropriate (for example | ||
309 | in a GUI application) so an alternative can be supplied. The callback | ||
310 | routine has the following form: | ||
311 | |||
312 | int cb(char *buf, int size, int rwflag, void *u); | ||
313 | |||
314 | B<buf> is the buffer to write the passphrase to. B<size> is the maximum | ||
315 | length of the passphrase (i.e. the size of buf). B<rwflag> is a flag | ||
316 | which is set to 0 when reading and 1 when writing. A typical routine | ||
317 | will ask the user to verify the passphrase (for example by prompting | ||
318 | for it twice) if B<rwflag> is 1. The B<u> parameter has the same | ||
319 | value as the B<u> parameter passed to the PEM routine. It allows | ||
320 | arbitrary data to be passed to the callback by the application | ||
321 | (for example a window handle in a GUI application). The callback | ||
322 | B<must> return the number of characters in the passphrase or 0 if | ||
323 | an error occurred. | ||
324 | |||
325 | =head1 EXAMPLES | ||
326 | |||
327 | Although the PEM routines take several arguments in almost all applications | ||
328 | most of them are set to 0 or NULL. | ||
329 | |||
330 | Read a certificate in PEM format from a BIO: | ||
331 | |||
332 | X509 *x; | ||
333 | x = PEM_read_bio_X509(bp, NULL, 0, NULL); | ||
334 | if (x == NULL) | ||
335 | { | ||
336 | /* Error */ | ||
337 | } | ||
338 | |||
339 | Alternative method: | ||
340 | |||
341 | X509 *x = NULL; | ||
342 | if (!PEM_read_bio_X509(bp, &x, 0, NULL)) | ||
343 | { | ||
344 | /* Error */ | ||
345 | } | ||
346 | |||
347 | Write a certificate to a BIO: | ||
348 | |||
349 | if (!PEM_write_bio_X509(bp, x)) | ||
350 | { | ||
351 | /* Error */ | ||
352 | } | ||
353 | |||
354 | Write an unencrypted private key to a FILE pointer: | ||
355 | |||
356 | if (!PEM_write_PrivateKey(fp, key, NULL, NULL, 0, 0, NULL)) | ||
357 | { | ||
358 | /* Error */ | ||
359 | } | ||
360 | |||
361 | Write a private key (using traditional format) to a BIO using | ||
362 | triple DES encryption, the pass phrase is prompted for: | ||
363 | |||
364 | if (!PEM_write_bio_PrivateKey(bp, key, EVP_des_ede3_cbc(), NULL, 0, 0, NULL)) | ||
365 | { | ||
366 | /* Error */ | ||
367 | } | ||
368 | |||
369 | Write a private key (using PKCS#8 format) to a BIO using triple | ||
370 | DES encryption, using the pass phrase "hello": | ||
371 | |||
372 | if (!PEM_write_bio_PKCS8PrivateKey(bp, key, EVP_des_ede3_cbc(), NULL, 0, 0, "hello")) | ||
373 | { | ||
374 | /* Error */ | ||
375 | } | ||
376 | |||
377 | Read a private key from a BIO using the pass phrase "hello": | ||
378 | |||
379 | key = PEM_read_bio_PrivateKey(bp, NULL, 0, "hello"); | ||
380 | if (key == NULL) | ||
381 | { | ||
382 | /* Error */ | ||
383 | } | ||
384 | |||
385 | Read a private key from a BIO using a pass phrase callback: | ||
386 | |||
387 | key = PEM_read_bio_PrivateKey(bp, NULL, pass_cb, "My Private Key"); | ||
388 | if (key == NULL) | ||
389 | { | ||
390 | /* Error */ | ||
391 | } | ||
392 | |||
393 | Skeleton pass phrase callback: | ||
394 | |||
395 | int pass_cb(char *buf, int size, int rwflag, void *u); | ||
396 | { | ||
397 | int len; | ||
398 | char *tmp; | ||
399 | /* We'd probably do something else if 'rwflag' is 1 */ | ||
400 | printf("Enter pass phrase for \"%s\"\n", u); | ||
401 | |||
402 | /* get pass phrase, length 'len' into 'tmp' */ | ||
403 | tmp = "hello"; | ||
404 | len = strlen(tmp); | ||
405 | |||
406 | if (len <= 0) return 0; | ||
407 | /* if too long, truncate */ | ||
408 | if (len > size) len = size; | ||
409 | memcpy(buf, tmp, len); | ||
410 | return len; | ||
411 | } | ||
412 | |||
413 | =head1 NOTES | ||
414 | |||
415 | The old B<PrivateKey> write routines are retained for compatibility. | ||
416 | New applications should write private keys using the | ||
417 | PEM_write_bio_PKCS8PrivateKey() or PEM_write_PKCS8PrivateKey() routines | ||
418 | because they are more secure (they use an iteration count of 2048 whereas | ||
419 | the traditional routines use a count of 1) unless compatibility with older | ||
420 | versions of OpenSSL is important. | ||
421 | |||
422 | The B<PrivateKey> read routines can be used in all applications because | ||
423 | they handle all formats transparently. | ||
424 | |||
425 | A frequent cause of problems is attempting to use the PEM routines like | ||
426 | this: | ||
427 | |||
428 | X509 *x; | ||
429 | PEM_read_bio_X509(bp, &x, 0, NULL); | ||
430 | |||
431 | this is a bug because an attempt will be made to reuse the data at B<x> | ||
432 | which is an uninitialised pointer. | ||
433 | |||
434 | =head1 PEM ENCRYPTION FORMAT | ||
435 | |||
436 | This old B<PrivateKey> routines use a non standard technique for encryption. | ||
437 | |||
438 | The private key (or other data) takes the following form: | ||
439 | |||
440 | -----BEGIN RSA PRIVATE KEY----- | ||
441 | Proc-Type: 4,ENCRYPTED | ||
442 | DEK-Info: DES-EDE3-CBC,3F17F5316E2BAC89 | ||
443 | |||
444 | ...base64 encoded data... | ||
445 | -----END RSA PRIVATE KEY----- | ||
446 | |||
447 | The line beginning DEK-Info contains two comma separated pieces of information: | ||
448 | the encryption algorithm name as used by EVP_get_cipherbyname() and an 8 | ||
449 | byte B<salt> encoded as a set of hexadecimal digits. | ||
450 | |||
451 | After this is the base64 encoded encrypted data. | ||
452 | |||
453 | The encryption key is determined using EVP_bytestokey(), using B<salt> and an | ||
454 | iteration count of 1. The IV used is the value of B<salt> and *not* the IV | ||
455 | returned by EVP_bytestokey(). | ||
456 | |||
457 | =head1 BUGS | ||
458 | |||
459 | The PEM read routines in some versions of OpenSSL will not correctly reuse | ||
460 | an existing structure. Therefore the following: | ||
461 | |||
462 | PEM_read_bio_X509(bp, &x, 0, NULL); | ||
463 | |||
464 | where B<x> already contains a valid certificate, may not work, whereas: | ||
465 | |||
466 | X509_free(x); | ||
467 | x = PEM_read_bio_X509(bp, NULL, 0, NULL); | ||
468 | |||
469 | is guaranteed to work. | ||
470 | |||
471 | =head1 RETURN CODES | ||
472 | |||
473 | The read routines return either a pointer to the structure read or NULL | ||
474 | if an error occurred. | ||
475 | |||
476 | The write routines return 1 for success or 0 for failure. | ||
diff --git a/src/lib/libssl/src/doc/crypto/RAND.pod b/src/lib/libssl/src/doc/crypto/RAND.pod new file mode 100644 index 0000000000..e987414477 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/RAND.pod | |||
@@ -0,0 +1,74 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | rand - pseudo-random number generator | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/rand.h> | ||
10 | |||
11 | int RAND_set_rand_engine(ENGINE *engine); | ||
12 | |||
13 | int RAND_bytes(unsigned char *buf, int num); | ||
14 | int RAND_pseudo_bytes(unsigned char *buf, int num); | ||
15 | |||
16 | void RAND_seed(const void *buf, int num); | ||
17 | void RAND_add(const void *buf, int num, int entropy); | ||
18 | int RAND_status(void); | ||
19 | |||
20 | int RAND_load_file(const char *file, long max_bytes); | ||
21 | int RAND_write_file(const char *file); | ||
22 | const char *RAND_file_name(char *file, size_t num); | ||
23 | |||
24 | int RAND_egd(const char *path); | ||
25 | |||
26 | void RAND_set_rand_method(const RAND_METHOD *meth); | ||
27 | const RAND_METHOD *RAND_get_rand_method(void); | ||
28 | RAND_METHOD *RAND_SSLeay(void); | ||
29 | |||
30 | void RAND_cleanup(void); | ||
31 | |||
32 | =head1 DESCRIPTION | ||
33 | |||
34 | Since the introduction of the ENGINE API, the recommended way of controlling | ||
35 | default implementations is by using the ENGINE API functions. The default | ||
36 | B<RAND_METHOD>, as set by RAND_set_rand_method() and returned by | ||
37 | RAND_get_rand_method(), is only used if no ENGINE has been set as the default | ||
38 | "rand" implementation. Hence, these two functions are no longer the recommened | ||
39 | way to control defaults. | ||
40 | |||
41 | If an alternative B<RAND_METHOD> implementation is being used (either set | ||
42 | directly or as provided by an ENGINE module), then it is entirely responsible | ||
43 | for the generation and management of a cryptographically secure PRNG stream. The | ||
44 | mechanisms described below relate solely to the software PRNG implementation | ||
45 | built in to OpenSSL and used by default. | ||
46 | |||
47 | These functions implement a cryptographically secure pseudo-random | ||
48 | number generator (PRNG). It is used by other library functions for | ||
49 | example to generate random keys, and applications can use it when they | ||
50 | need randomness. | ||
51 | |||
52 | A cryptographic PRNG must be seeded with unpredictable data such as | ||
53 | mouse movements or keys pressed at random by the user. This is | ||
54 | described in L<RAND_add(3)|RAND_add(3)>. Its state can be saved in a seed file | ||
55 | (see L<RAND_load_file(3)|RAND_load_file(3)>) to avoid having to go through the | ||
56 | seeding process whenever the application is started. | ||
57 | |||
58 | L<RAND_bytes(3)|RAND_bytes(3)> describes how to obtain random data from the | ||
59 | PRNG. | ||
60 | |||
61 | =head1 INTERNALS | ||
62 | |||
63 | The RAND_SSLeay() method implements a PRNG based on the systems' | ||
64 | L<arc4random_buf(3)> random number generator. | ||
65 | |||
66 | =head1 SEE ALSO | ||
67 | |||
68 | L<BN_rand(3)|BN_rand(3)>, L<RAND_add(3)|RAND_add(3)>, | ||
69 | L<RAND_load_file(3)|RAND_load_file(3)>, L<RAND_egd(3)|RAND_egd(3)>, | ||
70 | L<RAND_bytes(3)|RAND_bytes(3)>, | ||
71 | L<RAND_set_rand_method(3)|RAND_set_rand_method(3)>, | ||
72 | L<RAND_cleanup(3)|RAND_cleanup(3)> | ||
73 | |||
74 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/RC4.pod b/src/lib/libssl/src/doc/crypto/RC4.pod new file mode 100644 index 0000000000..b6d3a4342c --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/RC4.pod | |||
@@ -0,0 +1,62 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | RC4_set_key, RC4 - RC4 encryption | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/rc4.h> | ||
10 | |||
11 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); | ||
12 | |||
13 | void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, | ||
14 | unsigned char *outdata); | ||
15 | |||
16 | =head1 DESCRIPTION | ||
17 | |||
18 | This library implements the Alleged RC4 cipher, which is described for | ||
19 | example in I<Applied Cryptography>. It is believed to be compatible | ||
20 | with RC4[TM], a proprietary cipher of RSA Security Inc. | ||
21 | |||
22 | RC4 is a stream cipher with variable key length. Typically, 128 bit | ||
23 | (16 byte) keys are used for strong encryption, but shorter insecure | ||
24 | key sizes have been widely used due to export restrictions. | ||
25 | |||
26 | RC4 consists of a key setup phase and the actual encryption or | ||
27 | decryption phase. | ||
28 | |||
29 | RC4_set_key() sets up the B<RC4_KEY> B<key> using the B<len> bytes long | ||
30 | key at B<data>. | ||
31 | |||
32 | RC4() encrypts or decrypts the B<len> bytes of data at B<indata> using | ||
33 | B<key> and places the result at B<outdata>. Repeated RC4() calls with | ||
34 | the same B<key> yield a continuous key stream. | ||
35 | |||
36 | Since RC4 is a stream cipher (the input is XORed with a pseudo-random | ||
37 | key stream to produce the output), decryption uses the same function | ||
38 | calls as encryption. | ||
39 | |||
40 | Applications should use the higher level functions | ||
41 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> | ||
42 | etc. instead of calling the RC4 functions directly. | ||
43 | |||
44 | =head1 RETURN VALUES | ||
45 | |||
46 | RC4_set_key() and RC4() do not return values. | ||
47 | |||
48 | =head1 NOTE | ||
49 | |||
50 | Certain conditions have to be observed to securely use stream ciphers. | ||
51 | It is not permissible to perform multiple encryptions using the same | ||
52 | key stream. | ||
53 | |||
54 | =head1 SEE ALSO | ||
55 | |||
56 | L<blowfish(3)|blowfish(3)>, L<des(3)|des(3)>, L<rc2(3)|rc2(3)> | ||
57 | |||
58 | =head1 HISTORY | ||
59 | |||
60 | RC4_set_key() and RC4() are available in all versions of SSLeay and OpenSSL. | ||
61 | |||
62 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/RIPEMD160.pod b/src/lib/libssl/src/doc/crypto/RIPEMD160.pod new file mode 100644 index 0000000000..264bb99ae7 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/RIPEMD160.pod | |||
@@ -0,0 +1,66 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | RIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final - | ||
6 | RIPEMD-160 hash function | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | #include <openssl/ripemd.h> | ||
11 | |||
12 | unsigned char *RIPEMD160(const unsigned char *d, unsigned long n, | ||
13 | unsigned char *md); | ||
14 | |||
15 | int RIPEMD160_Init(RIPEMD160_CTX *c); | ||
16 | int RIPEMD160_Update(RIPEMD_CTX *c, const void *data, | ||
17 | unsigned long len); | ||
18 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); | ||
19 | |||
20 | =head1 DESCRIPTION | ||
21 | |||
22 | RIPEMD-160 is a cryptographic hash function with a | ||
23 | 160 bit output. | ||
24 | |||
25 | RIPEMD160() computes the RIPEMD-160 message digest of the B<n> | ||
26 | bytes at B<d> and places it in B<md> (which must have space for | ||
27 | RIPEMD160_DIGEST_LENGTH == 20 bytes of output). If B<md> is NULL, the digest | ||
28 | is placed in a static array. | ||
29 | |||
30 | The following functions may be used if the message is not completely | ||
31 | stored in memory: | ||
32 | |||
33 | RIPEMD160_Init() initializes a B<RIPEMD160_CTX> structure. | ||
34 | |||
35 | RIPEMD160_Update() can be called repeatedly with chunks of the message to | ||
36 | be hashed (B<len> bytes at B<data>). | ||
37 | |||
38 | RIPEMD160_Final() places the message digest in B<md>, which must have | ||
39 | space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output, and erases | ||
40 | the B<RIPEMD160_CTX>. | ||
41 | |||
42 | Applications should use the higher level functions | ||
43 | L<EVP_DigestInit(3)|EVP_DigestInit(3)> etc. instead of calling the | ||
44 | hash functions directly. | ||
45 | |||
46 | =head1 RETURN VALUES | ||
47 | |||
48 | RIPEMD160() returns a pointer to the hash value. | ||
49 | |||
50 | RIPEMD160_Init(), RIPEMD160_Update() and RIPEMD160_Final() return 1 for | ||
51 | success, 0 otherwise. | ||
52 | |||
53 | =head1 CONFORMING TO | ||
54 | |||
55 | ISO/IEC 10118-3 (draft) (??) | ||
56 | |||
57 | =head1 SEE ALSO | ||
58 | |||
59 | L<sha(3)|sha(3)>, L<hmac(3)|hmac(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> | ||
60 | |||
61 | =head1 HISTORY | ||
62 | |||
63 | RIPEMD160(), RIPEMD160_Init(), RIPEMD160_Update() and | ||
64 | RIPEMD160_Final() are available since SSLeay 0.9.0. | ||
65 | |||
66 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/SHA1.pod b/src/lib/libssl/src/doc/crypto/SHA1.pod new file mode 100644 index 0000000000..94ab7bc724 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/SHA1.pod | |||
@@ -0,0 +1,70 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | SHA1, SHA1_Init, SHA1_Update, SHA1_Final - Secure Hash Algorithm | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/sha.h> | ||
10 | |||
11 | unsigned char *SHA1(const unsigned char *d, unsigned long n, | ||
12 | unsigned char *md); | ||
13 | |||
14 | int SHA1_Init(SHA_CTX *c); | ||
15 | int SHA1_Update(SHA_CTX *c, const void *data, | ||
16 | unsigned long len); | ||
17 | int SHA1_Final(unsigned char *md, SHA_CTX *c); | ||
18 | |||
19 | =head1 DESCRIPTION | ||
20 | |||
21 | SHA-1 (Secure Hash Algorithm) is a cryptographic hash function with a | ||
22 | 160 bit output. | ||
23 | |||
24 | SHA1() computes the SHA-1 message digest of the B<n> | ||
25 | bytes at B<d> and places it in B<md> (which must have space for | ||
26 | SHA_DIGEST_LENGTH == 20 bytes of output). If B<md> is NULL, the digest | ||
27 | is placed in a static array. | ||
28 | |||
29 | The following functions may be used if the message is not completely | ||
30 | stored in memory: | ||
31 | |||
32 | SHA1_Init() initializes a B<SHA_CTX> structure. | ||
33 | |||
34 | SHA1_Update() can be called repeatedly with chunks of the message to | ||
35 | be hashed (B<len> bytes at B<data>). | ||
36 | |||
37 | SHA1_Final() places the message digest in B<md>, which must have space | ||
38 | for SHA_DIGEST_LENGTH == 20 bytes of output, and erases the B<SHA_CTX>. | ||
39 | |||
40 | Applications should use the higher level functions | ||
41 | L<EVP_DigestInit(3)|EVP_DigestInit(3)> | ||
42 | etc. instead of calling the hash functions directly. | ||
43 | |||
44 | The predecessor of SHA-1, SHA, is also implemented, but it should be | ||
45 | used only when backward compatibility is required. | ||
46 | |||
47 | =head1 RETURN VALUES | ||
48 | |||
49 | SHA1() returns a pointer to the hash value. | ||
50 | |||
51 | SHA1_Init(), SHA1_Update() and SHA1_Final() return 1 for success, 0 otherwise. | ||
52 | |||
53 | =head1 CONFORMING TO | ||
54 | |||
55 | SHA: US Federal Information Processing Standard FIPS PUB 180 (Secure Hash | ||
56 | Standard), | ||
57 | SHA-1: US Federal Information Processing Standard FIPS PUB 180-1 (Secure Hash | ||
58 | Standard), | ||
59 | ANSI X9.30 | ||
60 | |||
61 | =head1 SEE ALSO | ||
62 | |||
63 | L<ripemd(3)|ripemd(3)>, L<hmac(3)|hmac(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)> | ||
64 | |||
65 | =head1 HISTORY | ||
66 | |||
67 | SHA1(), SHA1_Init(), SHA1_Update() and SHA1_Final() are available in all | ||
68 | versions of SSLeay and OpenSSL. | ||
69 | |||
70 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod b/src/lib/libssl/src/doc/ssl/BIO_f_ssl.pod index bc5861ab34..bc5861ab34 100644 --- a/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod +++ b/src/lib/libssl/src/doc/ssl/BIO_f_ssl.pod | |||