summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/doc')
-rw-r--r--src/lib/libssl/src/doc/HOWTO/certificates.txt53
-rw-r--r--src/lib/libssl/src/doc/HOWTO/keys.txt73
-rw-r--r--src/lib/libssl/src/doc/apps/ca.pod66
-rw-r--r--src/lib/libssl/src/doc/apps/ciphers.pod26
-rw-r--r--src/lib/libssl/src/doc/apps/dhparam.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/dsa.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/dsaparam.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/gendsa.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/genrsa.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/ocsp.pod37
-rw-r--r--src/lib/libssl/src/doc/apps/passwd.pod2
-rw-r--r--src/lib/libssl/src/doc/apps/pkcs7.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/pkcs8.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/req.pod18
-rw-r--r--src/lib/libssl/src/doc/apps/rsa.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/s_client.pod7
-rw-r--r--src/lib/libssl/src/doc/apps/s_server.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/smime.pod4
-rw-r--r--src/lib/libssl/src/doc/apps/speed.pod2
-rw-r--r--src/lib/libssl/src/doc/apps/spkac.pod8
-rw-r--r--src/lib/libssl/src/doc/apps/x509.pod40
-rw-r--r--src/lib/libssl/src/doc/c-indentation.el10
-rw-r--r--src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod43
-rw-r--r--src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod81
-rw-r--r--src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod44
-rw-r--r--src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod96
-rw-r--r--src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BIO_s_accept.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BIO_s_bio.pod56
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_CTX_new.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_add.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_add_word.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_bn2bin.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_copy.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_generate_prime.pod4
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_mod_inverse.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_new.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/BN_rand.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/DH_generate_key.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/DH_generate_parameters.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/DH_new.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/DSA_SIG_new.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/DSA_do_sign.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/DSA_dup_DH.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/DSA_generate_key.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/DSA_generate_parameters.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/DSA_new.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/DSA_sign.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/ERR_get_error.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_PKEY_new.pod47
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_PKEY_set1_RSA.pod80
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_SealInit.pod26
-rw-r--r--src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod149
-rw-r--r--src/lib/libssl/src/doc/crypto/PKCS12_create.pod57
-rw-r--r--src/lib/libssl/src/doc/crypto/PKCS12_parse.pod50
-rw-r--r--src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod53
-rw-r--r--src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod65
-rw-r--r--src/lib/libssl/src/doc/crypto/PKCS7_sign.pod85
-rw-r--r--src/lib/libssl/src/doc/crypto/PKCS7_verify.pod116
-rw-r--r--src/lib/libssl/src/doc/crypto/RAND_bytes.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_check_key.pod2
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_generate_key.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_new.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_print.pod6
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_private_encrypt.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod3
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_set_method.pod13
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_sign.pod4
-rw-r--r--src/lib/libssl/src/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod4
-rw-r--r--src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod71
-rw-r--r--src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod59
-rw-r--r--src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod72
-rw-r--r--src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod110
-rw-r--r--src/lib/libssl/src/doc/crypto/X509_NAME_get_index_by_NID.pod106
-rw-r--r--src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod105
-rw-r--r--src/lib/libssl/src/doc/crypto/X509_new.pod37
-rw-r--r--src/lib/libssl/src/doc/crypto/crypto.pod16
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_ASN1_OBJECT.pod29
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_DHparams.pod14
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_DSAPublicKey.pod82
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_PKCS8PrivateKey.pod56
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod39
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_X509.pod231
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_X509_ALGOR.pod30
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod37
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_X509_NAME.pod31
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod36
-rw-r--r--src/lib/libssl/src/doc/crypto/d2i_X509_SIG.pod30
-rw-r--r--src/lib/libssl/src/doc/crypto/engine.pod12
-rw-r--r--src/lib/libssl/src/doc/openssl-shared.txt32
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_add_session.pod8
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod12
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_sess_set_get_cb.pod12
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_cache_mode.pod53
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod2
-rw-r--r--src/lib/libssl/src/doc/ssl/ssl.pod2
-rw-r--r--src/lib/libssl/src/doc/standards.txt173
101 files changed, 2872 insertions, 192 deletions
diff --git a/src/lib/libssl/src/doc/HOWTO/certificates.txt b/src/lib/libssl/src/doc/HOWTO/certificates.txt
index 88048645db..d3a62545ad 100644
--- a/src/lib/libssl/src/doc/HOWTO/certificates.txt
+++ b/src/lib/libssl/src/doc/HOWTO/certificates.txt
@@ -1,6 +1,8 @@
1<DRAFT!> 1<DRAFT!>
2 HOWTO certificates 2 HOWTO certificates
3 3
41. Introduction
5
4How you handle certificates depend a great deal on what your role is. 6How you handle certificates depend a great deal on what your role is.
5Your role can be one or several of: 7Your role can be one or several of:
6 8
@@ -13,12 +15,14 @@ Certificate authorities should read ca.txt.
13 15
14In all the cases shown below, the standard configuration file, as 16In all the cases shown below, the standard configuration file, as
15compiled into openssl, will be used. You may find it in /etc/, 17compiled into openssl, will be used. You may find it in /etc/,
16/usr/local/ssr/ or somewhere else. The name is openssl.cnf, and 18/usr/local/ssl/ or somewhere else. The name is openssl.cnf, and
17is better described in another HOWTO <config.txt?>. If you want to 19is better described in another HOWTO <config.txt?>. If you want to
18use a different configuration file, use the argument '-config {file}' 20use a different configuration file, use the argument '-config {file}'
19with the command shown below. 21with the command shown below.
20 22
21 23
242. Relationship with keys
25
22Certificates are related to public key cryptography by containing a 26Certificates are related to public key cryptography by containing a
23public key. To be useful, there must be a corresponding private key 27public key. To be useful, there must be a corresponding private key
24somewhere. With OpenSSL, public keys are easily derived from private 28somewhere. With OpenSSL, public keys are easily derived from private
@@ -26,22 +30,25 @@ keys, so before you create a certificate or a certificate request, you
26need to create a private key. 30need to create a private key.
27 31
28Private keys are generated with 'openssl genrsa' if you want a RSA 32Private keys are generated with 'openssl genrsa' if you want a RSA
29private key, or 'openssl gendsa' if you want a DSA private key. More 33private key, or 'openssl gendsa' if you want a DSA private key.
30info on how to handle these commands are found in the manual pages for 34Further information on how to create private keys can be found in
31those commands or by running them with the argument '-h'. For the 35another HOWTO <keys.txt?>. The rest of this text assumes you have
32sake of the description in this file, let's assume that the private 36a private key in the file privkey.pem.
33key ended up in the file privkey.pem (which is the default in some 37
34cases). 38
35 393. Creating a certificate request
36 40
37Let's start with the most normal way of getting a certificate. Most 41To create a certificate, you need to start with a certificate
38often, you want or need to get a certificate from a certificate 42request (or, as some certificate authorities like to put
39authority. To handle that, the certificate authority needs a
40certificate request (or, as some certificate authorities like to put
41it, "certificate signing request", since that's exactly what they do, 43it, "certificate signing request", since that's exactly what they do,
42they sign it and give you the result back, thus making it authentic 44they sign it and give you the result back, thus making it authentic
43according to their policies) from you. To generate a request, use the 45according to their policies). A certificate request can then be sent
44command 'openssl req' like this: 46to a certificate authority to get it signed into a certificate, or if
47you have your own certificate authority, you may sign it yourself, or
48if you need a self-signed certificate (because you just want a test
49certificate or because you are setting up your own CA).
50
51The certificate request is created like this:
45 52
46 openssl req -new -key privkey.pem -out cert.csr 53 openssl req -new -key privkey.pem -out cert.csr
47 54
@@ -55,9 +62,23 @@ When the certificate authority has then done the checks the need to
55do (and probably gotten payment from you), they will hand over your 62do (and probably gotten payment from you), they will hand over your
56new certificate to you. 63new certificate to you.
57 64
65Section 5 will tell you more on how to handle the certificate you
66received.
67
68
694. Creating a self-signed certificate
70
71If you don't want to deal with another certificate authority, or just
72want to create a test certificate for yourself, or are setting up a
73certificate authority of your own, you may want to make the requested
74certificate a self-signed one. This is similar to creating a
75certificate request, but creates a certificate instead of a
76certificate request (1095 is 3 years):
77
78 openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
58 79
59[fill in on how to create a self-signed certificate]
60 80
815. What to do with the certificate
61 82
62If you created everything yourself, or if the certificate authority 83If you created everything yourself, or if the certificate authority
63was kind enough, your certificate is a raw DER thing in PEM format. 84was kind enough, your certificate is a raw DER thing in PEM format.
diff --git a/src/lib/libssl/src/doc/HOWTO/keys.txt b/src/lib/libssl/src/doc/HOWTO/keys.txt
new file mode 100644
index 0000000000..45f42eaaf1
--- /dev/null
+++ b/src/lib/libssl/src/doc/HOWTO/keys.txt
@@ -0,0 +1,73 @@
1<DRAFT!>
2 HOWTO keys
3
41. Introduction
5
6Keys are the basis of public key algorithms and PKI. Keys usually
7come in pairs, with one half being the public key and the other half
8being the private key. With OpenSSL, the private key contains the
9public key information as well, so a public key doesn't need to be
10generated separately.
11
12Public keys come in several flavors, using different cryptographic
13algorithms. The most popular ones associated with certificates are
14RSA and DSA, and this HOWTO will show how to generate each of them.
15
16
172. To generate a RSA key
18
19A RSA key can be used both for encryption and for signing.
20
21Generating a key for the RSA algorithm is quite easy, all you have to
22do is the following:
23
24 openssl genrsa -des3 -out privkey.pem 2048
25
26With this variant, you will be prompted for a protecting password. If
27you don't want your key to be protected by a password, remove the flag
28'-des3' from the command line above.
29
30 NOTE: if you intend to use the key together with a server
31 certificate, it may be a good thing to avoid protecting it
32 with a password, since that would mean someone would have to
33 type in the password every time the server needs to access
34 the key.
35
36The number 2048 is the size of the key, in bits. Today, 2048 or
37higher is recommended for RSA keys, as fewer amount of bits is
38consider insecure or to be insecure pretty soon.
39
40
413. To generate a DSA key
42
43A DSA key can be used both for signing only. This is important to
44keep in mind to know what kind of purposes a certificate request with
45a DSA key can really be used for.
46
47Generating a key for the DSA algorithm is a two-step process. First,
48you have to generate parameters from which to generate the key:
49
50 openssl dsaparam -out dsaparam.pem 2048
51
52The number 2048 is the size of the key, in bits. Today, 2048 or
53higher is recommended for DSA keys, as fewer amount of bits is
54consider insecure or to be insecure pretty soon.
55
56When that is done, you can generate a key using the parameters in
57question (actually, several keys can be generated from the same
58parameters):
59
60 openssl gendsa -des3 -out privkey.pem dsaparam.pem
61
62With this variant, you will be prompted for a protecting password. If
63you don't want your key to be protected by a password, remove the flag
64'-des3' from the command line above.
65
66 NOTE: if you intend to use the key together with a server
67 certificate, it may be a good thing to avoid protecting it
68 with a password, since that would mean someone would have to
69 type in the password every time the server needs to access
70 the key.
71
72--
73Richard Levitte
diff --git a/src/lib/libssl/src/doc/apps/ca.pod b/src/lib/libssl/src/doc/apps/ca.pod
index c2ca8f2400..de66c534b5 100644
--- a/src/lib/libssl/src/doc/apps/ca.pod
+++ b/src/lib/libssl/src/doc/apps/ca.pod
@@ -13,6 +13,10 @@ B<openssl> B<ca>
13[B<-name section>] 13[B<-name section>]
14[B<-gencrl>] 14[B<-gencrl>]
15[B<-revoke file>] 15[B<-revoke file>]
16[B<-crl_reason reason>]
17[B<-crl_hold instruction>]
18[B<-crl_compromise time>]
19[B<-crl_CA_compromise time>]
16[B<-subj arg>] 20[B<-subj arg>]
17[B<-crldays days>] 21[B<-crldays days>]
18[B<-crlhours hours>] 22[B<-crlhours hours>]
@@ -39,6 +43,7 @@ B<openssl> B<ca>
39[B<-msie_hack>] 43[B<-msie_hack>]
40[B<-extensions section>] 44[B<-extensions section>]
41[B<-extfile section>] 45[B<-extfile section>]
46[B<-engine id>]
42 47
43=head1 DESCRIPTION 48=head1 DESCRIPTION
44 49
@@ -74,7 +79,7 @@ a single self signed certificate to be signed by the CA.
74=item B<-spkac filename> 79=item B<-spkac filename>
75 80
76a file containing a single Netscape signed public key and challenge 81a file containing a single Netscape signed public key and challenge
77and additional field values to be signed by the CA. See the B<NOTES> 82and additional field values to be signed by the CA. See the B<SPKAC FORMAT>
78section for information on the required format. 83section for information on the required format.
79 84
80=item B<-infiles> 85=item B<-infiles>
@@ -191,6 +196,13 @@ an additional configuration file to read certificate extensions from
191(using the default section unless the B<-extensions> option is also 196(using the default section unless the B<-extensions> option is also
192used). 197used).
193 198
199=item B<-engine id>
200
201specifying an engine (by it's unique B<id> string) will cause B<req>
202to attempt to obtain a functional reference to the specified engine,
203thus initialising it if needed. The engine will then be set as the default
204for all available algorithms.
205
194=back 206=back
195 207
196=head1 CRL OPTIONS 208=head1 CRL OPTIONS
@@ -214,6 +226,33 @@ the number of hours before the next CRL is due.
214 226
215a filename containing a certificate to revoke. 227a filename containing a certificate to revoke.
216 228
229=item B<-crl_reason reason>
230
231revocation reason, where B<reason> is one of: B<unspecified>, B<keyCompromise>,
232B<CACompromise>, B<affiliationChanged>, B<superseded>, B<cessationOfOperation>,
233B<certificateHold> or B<removeFromCRL>. The matching of B<reason> is case
234insensitive. Setting any revocation reason will make the CRL v2.
235
236In practive B<removeFromCRL> is not particularly useful because it is only used
237in delta CRLs which are not currently implemented.
238
239=item B<-crl_hold instruction>
240
241This sets the CRL revocation reason code to B<certificateHold> and the hold
242instruction to B<instruction> which must be an OID. Although any OID can be
243used only B<holdInstructionNone> (the use of which is discouraged by RFC2459)
244B<holdInstructionCallIssuer> or B<holdInstructionReject> will normally be used.
245
246=item B<-crl_compromise time>
247
248This sets the revocation reason to B<keyCompromise> and the compromise time to
249B<time>. B<time> should be in GeneralizedTime format that is B<YYYYMMDDHHMMSSZ>.
250
251=item B<-crl_CA_compromise time>
252
253This is the same as B<crl_compromise> except the revocation reason is set to
254B<CACompromise>.
255
217=item B<-subj arg> 256=item B<-subj arg>
218 257
219supersedes subject name given in the request. 258supersedes subject name given in the request.
@@ -486,18 +525,6 @@ A sample configuration file with the relevant sections for B<ca>:
486 commonName = supplied 525 commonName = supplied
487 emailAddress = optional 526 emailAddress = optional
488 527
489=head1 WARNINGS
490
491The B<ca> command is quirky and at times downright unfriendly.
492
493The B<ca> utility was originally meant as an example of how to do things
494in a CA. It was not supposed to be used as a full blown CA itself:
495nevertheless some people are using it for this purpose.
496
497The B<ca> command is effectively a single user command: no locking is
498done on the various files and attempts to run more than one B<ca> command
499on the same database can have unpredictable results.
500
501=head1 FILES 528=head1 FILES
502 529
503Note: the location of all files can change either by compile time options, 530Note: the location of all files can change either by compile time options,
@@ -527,9 +554,6 @@ if corrupted it can be difficult to fix. It is theoretically possible
527to rebuild the index file from all the issued certificates and a current 554to rebuild the index file from all the issued certificates and a current
528CRL: however there is no option to do this. 555CRL: however there is no option to do this.
529 556
530CRL entry extensions cannot currently be created: only CRL extensions
531can be added.
532
533V2 CRL features like delta CRL support and CRL numbers are not currently 557V2 CRL features like delta CRL support and CRL numbers are not currently
534supported. 558supported.
535 559
@@ -565,6 +589,16 @@ create an empty file.
565 589
566=head1 WARNINGS 590=head1 WARNINGS
567 591
592The B<ca> command is quirky and at times downright unfriendly.
593
594The B<ca> utility was originally meant as an example of how to do things
595in a CA. It was not supposed to be used as a full blown CA itself:
596nevertheless some people are using it for this purpose.
597
598The B<ca> command is effectively a single user command: no locking is
599done on the various files and attempts to run more than one B<ca> command
600on the same database can have unpredictable results.
601
568The B<copy_extensions> option should be used with caution. If care is 602The B<copy_extensions> option should be used with caution. If care is
569not taken then it can be a security risk. For example if a certificate 603not taken then it can be a security risk. For example if a certificate
570request contains a basicConstraints extension with CA:TRUE and the 604request contains a basicConstraints extension with CA:TRUE and the
diff --git a/src/lib/libssl/src/doc/apps/ciphers.pod b/src/lib/libssl/src/doc/apps/ciphers.pod
index b7e577b24f..81a2c43893 100644
--- a/src/lib/libssl/src/doc/apps/ciphers.pod
+++ b/src/lib/libssl/src/doc/apps/ciphers.pod
@@ -203,6 +203,10 @@ cipher suites using DH, including anonymous DH.
203 203
204anonymous DH cipher suites. 204anonymous DH cipher suites.
205 205
206=item B<AES>
207
208cipher suites using AES.
209
206=item B<3DES> 210=item B<3DES>
207 211
208cipher suites using triple DES. 212cipher suites using triple DES.
@@ -236,7 +240,9 @@ cipher suites using SHA1.
236=head1 CIPHER SUITE NAMES 240=head1 CIPHER SUITE NAMES
237 241
238The following lists give the SSL or TLS cipher suites names from the 242The following lists give the SSL or TLS cipher suites names from the
239relevant specification and their OpenSSL equivalents. 243relevant specification and their OpenSSL equivalents. It should be noted,
244that several cipher suite names do not include the authentication used,
245e.g. DES-CBC3-SHA. In these cases, RSA authentication is used.
240 246
241=head2 SSL v3.0 cipher suites. 247=head2 SSL v3.0 cipher suites.
242 248
@@ -306,6 +312,24 @@ relevant specification and their OpenSSL equivalents.
306 TLS_DH_anon_WITH_DES_CBC_SHA ADH-DES-CBC-SHA 312 TLS_DH_anon_WITH_DES_CBC_SHA ADH-DES-CBC-SHA
307 TLS_DH_anon_WITH_3DES_EDE_CBC_SHA ADH-DES-CBC3-SHA 313 TLS_DH_anon_WITH_3DES_EDE_CBC_SHA ADH-DES-CBC3-SHA
308 314
315=head2 AES ciphersuites from RFC3268, extending TLS v1.0
316
317 TLS_RSA_WITH_AES_128_CBC_SHA AES128-SHA
318 TLS_RSA_WITH_AES_256_CBC_SHA AES256-SHA
319
320 TLS_DH_DSS_WITH_AES_128_CBC_SHA DH-DSS-AES128-SHA
321 TLS_DH_DSS_WITH_AES_256_CBC_SHA DH-DSS-AES256-SHA
322 TLS_DH_RSA_WITH_AES_128_CBC_SHA DH-RSA-AES128-SHA
323 TLS_DH_RSA_WITH_AES_256_CBC_SHA DH-RSA-AES256-SHA
324
325 TLS_DHE_DSS_WITH_AES_128_CBC_SHA DHE-DSS-AES128-SHA
326 TLS_DHE_DSS_WITH_AES_256_CBC_SHA DHE-DSS-AES256-SHA
327 TLS_DHE_RSA_WITH_AES_128_CBC_SHA DHE-RSA-AES128-SHA
328 TLS_DHE_RSA_WITH_AES_256_CBC_SHA DHE-RSA-AES256-SHA
329
330 TLS_DH_anon_WITH_AES_128_CBC_SHA ADH-AES128-SHA
331 TLS_DH_anon_WITH_AES_256_CBC_SHA ADH-AES256-SHA
332
309=head2 Additional Export 1024 and other cipher suites 333=head2 Additional Export 1024 and other cipher suites
310 334
311Note: these ciphers can also be used in SSL v3. 335Note: these ciphers can also be used in SSL v3.
diff --git a/src/lib/libssl/src/doc/apps/dhparam.pod b/src/lib/libssl/src/doc/apps/dhparam.pod
index ff8a6e5e5b..c31db95a47 100644
--- a/src/lib/libssl/src/doc/apps/dhparam.pod
+++ b/src/lib/libssl/src/doc/apps/dhparam.pod
@@ -18,6 +18,7 @@ B<openssl dhparam>
18[B<-2>] 18[B<-2>]
19[B<-5>] 19[B<-5>]
20[B<-rand> I<file(s)>] 20[B<-rand> I<file(s)>]
21[B<-engine id>]
21[I<numbits>] 22[I<numbits>]
22 23
23=head1 DESCRIPTION 24=head1 DESCRIPTION
@@ -96,6 +97,13 @@ this option prints out the DH parameters in human readable form.
96this option converts the parameters into C code. The parameters can then 97this option converts the parameters into C code. The parameters can then
97be loaded by calling the B<get_dh>I<numbits>B<()> function. 98be loaded by calling the B<get_dh>I<numbits>B<()> function.
98 99
100=item B<-engine id>
101
102specifying an engine (by it's unique B<id> string) will cause B<req>
103to attempt to obtain a functional reference to the specified engine,
104thus initialising it if needed. The engine will then be set as the default
105for all available algorithms.
106
99=back 107=back
100 108
101=head1 WARNINGS 109=head1 WARNINGS
diff --git a/src/lib/libssl/src/doc/apps/dsa.pod b/src/lib/libssl/src/doc/apps/dsa.pod
index 28e534bb95..ed06b8806d 100644
--- a/src/lib/libssl/src/doc/apps/dsa.pod
+++ b/src/lib/libssl/src/doc/apps/dsa.pod
@@ -21,6 +21,7 @@ B<openssl> B<dsa>
21[B<-modulus>] 21[B<-modulus>]
22[B<-pubin>] 22[B<-pubin>]
23[B<-pubout>] 23[B<-pubout>]
24[B<-engine id>]
24 25
25=head1 DESCRIPTION 26=head1 DESCRIPTION
26 27
@@ -106,6 +107,13 @@ by default a private key is output. With this option a public
106key will be output instead. This option is automatically set if the input is 107key will be output instead. This option is automatically set if the input is
107a public key. 108a public key.
108 109
110=item B<-engine id>
111
112specifying an engine (by it's unique B<id> string) will cause B<req>
113to attempt to obtain a functional reference to the specified engine,
114thus initialising it if needed. The engine will then be set as the default
115for all available algorithms.
116
109=back 117=back
110 118
111=head1 NOTES 119=head1 NOTES
diff --git a/src/lib/libssl/src/doc/apps/dsaparam.pod b/src/lib/libssl/src/doc/apps/dsaparam.pod
index 50c2f61242..b9b1b93b42 100644
--- a/src/lib/libssl/src/doc/apps/dsaparam.pod
+++ b/src/lib/libssl/src/doc/apps/dsaparam.pod
@@ -16,6 +16,7 @@ B<openssl dsaparam>
16[B<-C>] 16[B<-C>]
17[B<-rand file(s)>] 17[B<-rand file(s)>]
18[B<-genkey>] 18[B<-genkey>]
19[B<-engine id>]
19[B<numbits>] 20[B<numbits>]
20 21
21=head1 DESCRIPTION 22=head1 DESCRIPTION
@@ -82,6 +83,13 @@ this option specifies that a parameter set should be generated of size
82B<numbits>. It must be the last option. If this option is included then 83B<numbits>. It must be the last option. If this option is included then
83the input file (if any) is ignored. 84the input file (if any) is ignored.
84 85
86=item B<-engine id>
87
88specifying an engine (by it's unique B<id> string) will cause B<req>
89to attempt to obtain a functional reference to the specified engine,
90thus initialising it if needed. The engine will then be set as the default
91for all available algorithms.
92
85=back 93=back
86 94
87=head1 NOTES 95=head1 NOTES
diff --git a/src/lib/libssl/src/doc/apps/gendsa.pod b/src/lib/libssl/src/doc/apps/gendsa.pod
index 74318fe7fb..2c56cc7888 100644
--- a/src/lib/libssl/src/doc/apps/gendsa.pod
+++ b/src/lib/libssl/src/doc/apps/gendsa.pod
@@ -12,6 +12,7 @@ B<openssl> B<gendsa>
12[B<-des3>] 12[B<-des3>]
13[B<-idea>] 13[B<-idea>]
14[B<-rand file(s)>] 14[B<-rand file(s)>]
15[B<-engine id>]
15[B<paramfile>] 16[B<paramfile>]
16 17
17=head1 DESCRIPTION 18=head1 DESCRIPTION
@@ -37,6 +38,13 @@ Multiple files can be specified separated by a OS-dependent character.
37The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for 38The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
38all others. 39all others.
39 40
41=item B<-engine id>
42
43specifying an engine (by it's unique B<id> string) will cause B<req>
44to attempt to obtain a functional reference to the specified engine,
45thus initialising it if needed. The engine will then be set as the default
46for all available algorithms.
47
40=item B<paramfile> 48=item B<paramfile>
41 49
42This option specifies the DSA parameter file to use. The parameters in this 50This option specifies the DSA parameter file to use. The parameters in this
diff --git a/src/lib/libssl/src/doc/apps/genrsa.pod b/src/lib/libssl/src/doc/apps/genrsa.pod
index cdcc03c123..25af4d1475 100644
--- a/src/lib/libssl/src/doc/apps/genrsa.pod
+++ b/src/lib/libssl/src/doc/apps/genrsa.pod
@@ -15,6 +15,7 @@ B<openssl> B<genrsa>
15[B<-f4>] 15[B<-f4>]
16[B<-3>] 16[B<-3>]
17[B<-rand file(s)>] 17[B<-rand file(s)>]
18[B<-engine id>]
18[B<numbits>] 19[B<numbits>]
19 20
20=head1 DESCRIPTION 21=head1 DESCRIPTION
@@ -54,6 +55,13 @@ Multiple files can be specified separated by a OS-dependent character.
54The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for 55The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
55all others. 56all others.
56 57
58=item B<-engine id>
59
60specifying an engine (by it's unique B<id> string) will cause B<req>
61to attempt to obtain a functional reference to the specified engine,
62thus initialising it if needed. The engine will then be set as the default
63for all available algorithms.
64
57=item B<numbits> 65=item B<numbits>
58 66
59the size of the private key to generate in bits. This must be the last option 67the size of the private key to generate in bits. This must be the last option
diff --git a/src/lib/libssl/src/doc/apps/ocsp.pod b/src/lib/libssl/src/doc/apps/ocsp.pod
index da201b95e6..4f266058e5 100644
--- a/src/lib/libssl/src/doc/apps/ocsp.pod
+++ b/src/lib/libssl/src/doc/apps/ocsp.pod
@@ -11,6 +11,10 @@ B<openssl> B<ocsp>
11[B<-issuer file>] 11[B<-issuer file>]
12[B<-cert file>] 12[B<-cert file>]
13[B<-serial n>] 13[B<-serial n>]
14[B<-signer file>]
15[B<-signkey file>]
16[B<-sign_other file>]
17[B<-no_certs>]
14[B<-req_text>] 18[B<-req_text>]
15[B<-resp_text>] 19[B<-resp_text>]
16[B<-text>] 20[B<-text>]
@@ -20,27 +24,36 @@ B<openssl> B<ocsp>
20[B<-respin file>] 24[B<-respin file>]
21[B<-nonce>] 25[B<-nonce>]
22[B<-no_nonce>] 26[B<-no_nonce>]
23[B<-url responder_url>] 27[B<-url URL>]
24[B<-host host:n>] 28[B<-host host:n>]
25[B<-path>] 29[B<-path>]
26[B<-CApath file>] 30[B<-CApath dir>]
27[B<-CAfile file>] 31[B<-CAfile file>]
28[B<-VAfile file>] 32[B<-VAfile file>]
29[B<-verify_certs file>] 33[B<-validity_period n>]
34[B<-status_age n>]
30[B<-noverify>] 35[B<-noverify>]
36[B<-verify_other file>]
31[B<-trust_other>] 37[B<-trust_other>]
32[B<-no_intern>] 38[B<-no_intern>]
33[B<-no_sig_verify>] 39[B<-no_signature_verify>]
34[B<-no_cert_verify>] 40[B<-no_cert_verify>]
35[B<-no_chain>] 41[B<-no_chain>]
36[B<-no_cert_checks>] 42[B<-no_cert_checks>]
37[B<-validity_period nsec>] 43[B<-port num>]
38[B<-status_age nsec>] 44[B<-index file>]
45[B<-CA file>]
46[B<-rsigner file>]
47[B<-rkey file>]
48[B<-rother file>]
49[B<-resp_no_certs>]
50[B<-nmin n>]
51[B<-ndays n>]
52[B<-resp_key_id>]
53[B<-nrequest n>]
39 54
40=head1 DESCRIPTION 55=head1 DESCRIPTION
41 56
42B<WARNING: this documentation is preliminary and subject to change.>
43
44The Online Certificate Status Protocol (OCSP) enables applications to 57The Online Certificate Status Protocol (OCSP) enables applications to
45determine the (revocation) state of an identified certificate (RFC 2560). 58determine the (revocation) state of an identified certificate (RFC 2560).
46 59
@@ -83,6 +96,10 @@ the B<signkey> option is not present then the private key is read
83from the same file as the certificate. If neither option is specified then 96from the same file as the certificate. If neither option is specified then
84the OCSP request is not signed. 97the OCSP request is not signed.
85 98
99=item B<-sign_other filename>
100
101Additional certificates to include in the signed request.
102
86=item B<-nonce>, B<-no_nonce> 103=item B<-nonce>, B<-no_nonce>
87 104
88Add an OCSP nonce extension to a request or disable OCSP nonce addition. 105Add an OCSP nonce extension to a request or disable OCSP nonce addition.
@@ -120,7 +137,7 @@ or "/" by default.
120file or pathname containing trusted CA certificates. These are used to verify 137file or pathname containing trusted CA certificates. These are used to verify
121the signature on the OCSP response. 138the signature on the OCSP response.
122 139
123=item B<-verify_certs file> 140=item B<-verify_other file>
124 141
125file containing additional certificates to search when attempting to locate 142file containing additional certificates to search when attempting to locate
126the OCSP response signing certificate. Some responders omit the actual signer's 143the OCSP response signing certificate. Some responders omit the actual signer's
@@ -151,7 +168,7 @@ ignore certificates contained in the OCSP response when searching for the
151signers certificate. With this option the signers certificate must be specified 168signers certificate. With this option the signers certificate must be specified
152with either the B<-verify_certs> or B<-VAfile> options. 169with either the B<-verify_certs> or B<-VAfile> options.
153 170
154=item B<-no_sig_verify> 171=item B<-no_signature_verify>
155 172
156don't check the signature on the OCSP response. Since this option tolerates invalid 173don't check the signature on the OCSP response. Since this option tolerates invalid
157signatures on OCSP responses it will normally only be used for testing purposes. 174signatures on OCSP responses it will normally only be used for testing purposes.
diff --git a/src/lib/libssl/src/doc/apps/passwd.pod b/src/lib/libssl/src/doc/apps/passwd.pod
index 07d849c824..f44982549b 100644
--- a/src/lib/libssl/src/doc/apps/passwd.pod
+++ b/src/lib/libssl/src/doc/apps/passwd.pod
@@ -75,7 +75,7 @@ to each password hash.
75 75
76B<openssl passwd -crypt -salt xx password> prints B<xxj31ZMTZzkVA>. 76B<openssl passwd -crypt -salt xx password> prints B<xxj31ZMTZzkVA>.
77 77
78B<openssl passwd -1 -salt xxxxxxxx password> prints B<$1$xxxxxxxx$8XJIcl6ZXqBMCK0qFevqT1>. 78B<openssl passwd -1 -salt xxxxxxxx password> prints B<$1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.>.
79 79
80B<openssl passwd -apr1 -salt xxxxxxxx password> prints B<$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0>. 80B<openssl passwd -apr1 -salt xxxxxxxx password> prints B<$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0>.
81 81
diff --git a/src/lib/libssl/src/doc/apps/pkcs7.pod b/src/lib/libssl/src/doc/apps/pkcs7.pod
index 9871c0e0cd..a0a636328b 100644
--- a/src/lib/libssl/src/doc/apps/pkcs7.pod
+++ b/src/lib/libssl/src/doc/apps/pkcs7.pod
@@ -14,6 +14,7 @@ B<openssl> B<pkcs7>
14[B<-print_certs>] 14[B<-print_certs>]
15[B<-text>] 15[B<-text>]
16[B<-noout>] 16[B<-noout>]
17[B<-engine id>]
17 18
18=head1 DESCRIPTION 19=head1 DESCRIPTION
19 20
@@ -59,6 +60,13 @@ issuer names.
59don't output the encoded version of the PKCS#7 structure (or certificates 60don't output the encoded version of the PKCS#7 structure (or certificates
60is B<-print_certs> is set). 61is B<-print_certs> is set).
61 62
63=item B<-engine id>
64
65specifying an engine (by it's unique B<id> string) will cause B<req>
66to attempt to obtain a functional reference to the specified engine,
67thus initialising it if needed. The engine will then be set as the default
68for all available algorithms.
69
62=back 70=back
63 71
64=head1 EXAMPLES 72=head1 EXAMPLES
diff --git a/src/lib/libssl/src/doc/apps/pkcs8.pod b/src/lib/libssl/src/doc/apps/pkcs8.pod
index a56b2dd002..68ecd65b10 100644
--- a/src/lib/libssl/src/doc/apps/pkcs8.pod
+++ b/src/lib/libssl/src/doc/apps/pkcs8.pod
@@ -21,6 +21,7 @@ B<openssl> B<pkcs8>
21[B<-nsdb>] 21[B<-nsdb>]
22[B<-v2 alg>] 22[B<-v2 alg>]
23[B<-v1 alg>] 23[B<-v1 alg>]
24[B<-engine id>]
24 25
25=head1 DESCRIPTION 26=head1 DESCRIPTION
26 27
@@ -122,6 +123,13 @@ B<des>, B<des3> and B<rc2>. It is recommended that B<des3> is used.
122This option specifies a PKCS#5 v1.5 or PKCS#12 algorithm to use. A complete 123This option specifies a PKCS#5 v1.5 or PKCS#12 algorithm to use. A complete
123list of possible algorithms is included below. 124list of possible algorithms is included below.
124 125
126=item B<-engine id>
127
128specifying an engine (by it's unique B<id> string) will cause B<req>
129to attempt to obtain a functional reference to the specified engine,
130thus initialising it if needed. The engine will then be set as the default
131for all available algorithms.
132
125=back 133=back
126 134
127=head1 NOTES 135=head1 NOTES
diff --git a/src/lib/libssl/src/doc/apps/req.pod b/src/lib/libssl/src/doc/apps/req.pod
index 10e4e12a5c..e2b5d0d8ec 100644
--- a/src/lib/libssl/src/doc/apps/req.pod
+++ b/src/lib/libssl/src/doc/apps/req.pod
@@ -41,6 +41,7 @@ B<openssl> B<req>
41[B<-nameopt>] 41[B<-nameopt>]
42[B<-batch>] 42[B<-batch>]
43[B<-verbose>] 43[B<-verbose>]
44[B<-engine id>]
44 45
45=head1 DESCRIPTION 46=head1 DESCRIPTION
46 47
@@ -244,6 +245,13 @@ non-interactive mode.
244 245
245print extra details about the operations being performed. 246print extra details about the operations being performed.
246 247
248=item B<-engine id>
249
250specifying an engine (by it's unique B<id> string) will cause B<req>
251to attempt to obtain a functional reference to the specified engine,
252thus initialising it if needed. The engine will then be set as the default
253for all available algorithms.
254
247=back 255=back
248 256
249=head1 CONFIGURATION FILE FORMAT 257=head1 CONFIGURATION FILE FORMAT
@@ -406,7 +414,7 @@ be input by calling it "1.organizationName".
406The actual permitted field names are any object identifier short or 414The actual permitted field names are any object identifier short or
407long names. These are compiled into OpenSSL and include the usual 415long names. These are compiled into OpenSSL and include the usual
408values such as commonName, countryName, localityName, organizationName, 416values such as commonName, countryName, localityName, organizationName,
409organizationUnitName, stateOrPrivinceName. Additionally emailAddress 417organizationUnitName, stateOrProvinceName. Additionally emailAddress
410is include as well as name, surname, givenName initials and dnQualifier. 418is include as well as name, surname, givenName initials and dnQualifier.
411 419
412Additional object identifiers can be defined with the B<oid_file> or 420Additional object identifiers can be defined with the B<oid_file> or
@@ -512,13 +520,13 @@ Sample configuration containing all field values:
512 520
513The header and footer lines in the B<PEM> format are normally: 521The header and footer lines in the B<PEM> format are normally:
514 522
515 -----BEGIN CERTIFICATE REQUEST---- 523 -----BEGIN CERTIFICATE REQUEST-----
516 -----END CERTIFICATE REQUEST---- 524 -----END CERTIFICATE REQUEST-----
517 525
518some software (some versions of Netscape certificate server) instead needs: 526some software (some versions of Netscape certificate server) instead needs:
519 527
520 -----BEGIN NEW CERTIFICATE REQUEST---- 528 -----BEGIN NEW CERTIFICATE REQUEST-----
521 -----END NEW CERTIFICATE REQUEST---- 529 -----END NEW CERTIFICATE REQUEST-----
522 530
523which is produced with the B<-newhdr> option but is otherwise compatible. 531which is produced with the B<-newhdr> option but is otherwise compatible.
524Either form is accepted transparently on input. 532Either form is accepted transparently on input.
diff --git a/src/lib/libssl/src/doc/apps/rsa.pod b/src/lib/libssl/src/doc/apps/rsa.pod
index ef74f1adff..4d7640995e 100644
--- a/src/lib/libssl/src/doc/apps/rsa.pod
+++ b/src/lib/libssl/src/doc/apps/rsa.pod
@@ -24,6 +24,7 @@ B<openssl> B<rsa>
24[B<-check>] 24[B<-check>]
25[B<-pubin>] 25[B<-pubin>]
26[B<-pubout>] 26[B<-pubout>]
27[B<-engine id>]
27 28
28=head1 DESCRIPTION 29=head1 DESCRIPTION
29 30
@@ -117,6 +118,13 @@ by default a private key is output: with this option a public
117key will be output instead. This option is automatically set if 118key will be output instead. This option is automatically set if
118the input is a public key. 119the input is a public key.
119 120
121=item B<-engine id>
122
123specifying an engine (by it's unique B<id> string) will cause B<req>
124to attempt to obtain a functional reference to the specified engine,
125thus initialising it if needed. The engine will then be set as the default
126for all available algorithms.
127
120=back 128=back
121 129
122=head1 NOTES 130=head1 NOTES
diff --git a/src/lib/libssl/src/doc/apps/s_client.pod b/src/lib/libssl/src/doc/apps/s_client.pod
index 7fca9cbdbd..47dc93cb3f 100644
--- a/src/lib/libssl/src/doc/apps/s_client.pod
+++ b/src/lib/libssl/src/doc/apps/s_client.pod
@@ -33,6 +33,7 @@ B<openssl> B<s_client>
33[B<-no_tls1>] 33[B<-no_tls1>]
34[B<-bugs>] 34[B<-bugs>]
35[B<-cipher cipherlist>] 35[B<-cipher cipherlist>]
36[B<-starttls protocol>]
36[B<-engine id>] 37[B<-engine id>]
37[B<-rand file(s)>] 38[B<-rand file(s)>]
38 39
@@ -163,6 +164,12 @@ the server determines which cipher suite is used it should take the first
163supported cipher in the list sent by the client. See the B<ciphers> 164supported cipher in the list sent by the client. See the B<ciphers>
164command for more information. 165command for more information.
165 166
167=item B<-starttls protocol>
168
169send the protocol-specific message(s) to switch to TLS for communication.
170B<protocol> is a keyword for the intended protocol. Currently, the only
171supported keyword is "smtp".
172
166=item B<-engine id> 173=item B<-engine id>
167 174
168specifying an engine (by it's unique B<id> string) will cause B<s_client> 175specifying an engine (by it's unique B<id> string) will cause B<s_client>
diff --git a/src/lib/libssl/src/doc/apps/s_server.pod b/src/lib/libssl/src/doc/apps/s_server.pod
index 4b1e4260ef..1d21921e47 100644
--- a/src/lib/libssl/src/doc/apps/s_server.pod
+++ b/src/lib/libssl/src/doc/apps/s_server.pod
@@ -42,6 +42,7 @@ B<openssl> B<s_server>
42[B<-WWW>] 42[B<-WWW>]
43[B<-HTTP>] 43[B<-HTTP>]
44[B<-engine id>] 44[B<-engine id>]
45[B<-id_prefix arg>]
45[B<-rand file(s)>] 46[B<-rand file(s)>]
46 47
47=head1 DESCRIPTION 48=head1 DESCRIPTION
@@ -209,6 +210,13 @@ to attempt to obtain a functional reference to the specified engine,
209thus initialising it if needed. The engine will then be set as the default 210thus initialising it if needed. The engine will then be set as the default
210for all available algorithms. 211for all available algorithms.
211 212
213=item B<-id_prefix arg>
214
215generate SSL/TLS session IDs prefixed by B<arg>. This is mostly useful
216for testing any SSL/TLS code (eg. proxies) that wish to deal with multiple
217servers, when each of which might be generating a unique range of session
218IDs (eg. with a certain prefix).
219
212=item B<-rand file(s)> 220=item B<-rand file(s)>
213 221
214a file or files containing random data used to seed the random number 222a file or files containing random data used to seed the random number
diff --git a/src/lib/libssl/src/doc/apps/smime.pod b/src/lib/libssl/src/doc/apps/smime.pod
index fa5d23e8dc..2453dd2738 100644
--- a/src/lib/libssl/src/doc/apps/smime.pod
+++ b/src/lib/libssl/src/doc/apps/smime.pod
@@ -340,8 +340,8 @@ detached signature format. You can use this program to verify the
340signature by line wrapping the base64 encoded structure and surrounding 340signature by line wrapping the base64 encoded structure and surrounding
341it with: 341it with:
342 342
343 -----BEGIN PKCS7---- 343 -----BEGIN PKCS7-----
344 -----END PKCS7---- 344 -----END PKCS7-----
345 345
346and using the command, 346and using the command,
347 347
diff --git a/src/lib/libssl/src/doc/apps/speed.pod b/src/lib/libssl/src/doc/apps/speed.pod
index 8101851ec6..0dcdba873e 100644
--- a/src/lib/libssl/src/doc/apps/speed.pod
+++ b/src/lib/libssl/src/doc/apps/speed.pod
@@ -54,4 +54,6 @@ for all available algorithms.
54If any options are given, B<speed> tests those algorithms, otherwise all of 54If any options are given, B<speed> tests those algorithms, otherwise all of
55the above are tested. 55the above are tested.
56 56
57=back
58
57=cut 59=cut
diff --git a/src/lib/libssl/src/doc/apps/spkac.pod b/src/lib/libssl/src/doc/apps/spkac.pod
index bb84dfbe33..c3f1ff9c64 100644
--- a/src/lib/libssl/src/doc/apps/spkac.pod
+++ b/src/lib/libssl/src/doc/apps/spkac.pod
@@ -17,7 +17,7 @@ B<openssl> B<spkac>
17[B<-spksect section>] 17[B<-spksect section>]
18[B<-noout>] 18[B<-noout>]
19[B<-verify>] 19[B<-verify>]
20 20[B<-engine id>]
21 21
22=head1 DESCRIPTION 22=head1 DESCRIPTION
23 23
@@ -79,6 +79,12 @@ being created).
79 79
80verifies the digital signature on the supplied SPKAC. 80verifies the digital signature on the supplied SPKAC.
81 81
82=item B<-engine id>
83
84specifying an engine (by it's unique B<id> string) will cause B<req>
85to attempt to obtain a functional reference to the specified engine,
86thus initialising it if needed. The engine will then be set as the default
87for all available algorithms.
82 88
83=back 89=back
84 90
diff --git a/src/lib/libssl/src/doc/apps/x509.pod b/src/lib/libssl/src/doc/apps/x509.pod
index 4a17e338dd..50343cd685 100644
--- a/src/lib/libssl/src/doc/apps/x509.pod
+++ b/src/lib/libssl/src/doc/apps/x509.pod
@@ -50,6 +50,7 @@ B<openssl> B<x509>
50[B<-clrext>] 50[B<-clrext>]
51[B<-extfile filename>] 51[B<-extfile filename>]
52[B<-extensions section>] 52[B<-extensions section>]
53[B<-engine id>]
53 54
54=head1 DESCRIPTION 55=head1 DESCRIPTION
55 56
@@ -61,8 +62,9 @@ certificate trust settings.
61Since there are a large number of options they will split up into 62Since there are a large number of options they will split up into
62various sections. 63various sections.
63 64
65=head1 OPTIONS
64 66
65=head1 INPUT, OUTPUT AND GENERAL PURPOSE OPTIONS 67=head2 INPUT, OUTPUT AND GENERAL PURPOSE OPTIONS
66 68
67=over 4 69=over 4
68 70
@@ -97,13 +99,19 @@ digest, such as the B<-fingerprint>, B<-signkey> and B<-CA> options. If not
97specified then MD5 is used. If the key being used to sign with is a DSA key then 99specified then MD5 is used. If the key being used to sign with is a DSA key then
98this option has no effect: SHA1 is always used with DSA keys. 100this option has no effect: SHA1 is always used with DSA keys.
99 101
102=item B<-engine id>
103
104specifying an engine (by it's unique B<id> string) will cause B<req>
105to attempt to obtain a functional reference to the specified engine,
106thus initialising it if needed. The engine will then be set as the default
107for all available algorithms.
100 108
101=back 109=back
102 110
103=head1 DISPLAY OPTIONS 111=head2 DISPLAY OPTIONS
104 112
105Note: the B<-alias> and B<-purpose> options are also display options 113Note: the B<-alias> and B<-purpose> options are also display options
106but are described in the B<TRUST OPTIONS> section. 114but are described in the B<TRUST SETTINGS> section.
107 115
108=over 4 116=over 4
109 117
@@ -181,7 +189,7 @@ this outputs the certificate in the form of a C source file.
181 189
182=back 190=back
183 191
184=head1 TRUST SETTINGS 192=head2 TRUST SETTINGS
185 193
186Please note these options are currently experimental and may well change. 194Please note these options are currently experimental and may well change.
187 195
@@ -252,7 +260,7 @@ EXTENSIONS> section.
252 260
253=back 261=back
254 262
255=head1 SIGNING OPTIONS 263=head2 SIGNING OPTIONS
256 264
257The B<x509> utility can be used to sign certificates and requests: it 265The B<x509> utility can be used to sign certificates and requests: it
258can thus behave like a "mini CA". 266can thus behave like a "mini CA".
@@ -341,7 +349,7 @@ The default filename consists of the CA certificate file base name with
341".srl" appended. For example if the CA certificate file is called 349".srl" appended. For example if the CA certificate file is called
342"mycacert.pem" it expects to find a serial number file called "mycacert.srl". 350"mycacert.pem" it expects to find a serial number file called "mycacert.srl".
343 351
344=item B<-CAcreateserial filename> 352=item B<-CAcreateserial>
345 353
346with this option the CA serial number file is created if it does not exist: 354with this option the CA serial number file is created if it does not exist:
347it will contain the serial number "02" and the certificate being signed will 355it will contain the serial number "02" and the certificate being signed will
@@ -362,7 +370,7 @@ specified then the extensions should either be contained in the unnamed
362 370
363=back 371=back
364 372
365=head1 NAME OPTIONS 373=head2 NAME OPTIONS
366 374
367The B<nameopt> command line switch determines how the subject and issuer 375The B<nameopt> command line switch determines how the subject and issuer
368names are displayed. If no B<nameopt> switch is present the default "oneline" 376names are displayed. If no B<nameopt> switch is present the default "oneline"
@@ -499,7 +507,7 @@ name.
499 507
500=back 508=back
501 509
502=head1 TEXT OPTIONS 510=head2 TEXT OPTIONS
503 511
504As well as customising the name output format, it is also possible to 512As well as customising the name output format, it is also possible to
505customise the actual fields printed using the B<certopt> options when 513customise the actual fields printed using the B<certopt> options when
@@ -636,25 +644,25 @@ certificate extensions:
636Set a certificate to be trusted for SSL client use and change set its alias to 644Set a certificate to be trusted for SSL client use and change set its alias to
637"Steve's Class 1 CA" 645"Steve's Class 1 CA"
638 646
639 openssl x509 -in cert.pem -addtrust sslclient \ 647 openssl x509 -in cert.pem -addtrust clientAuth \
640 -alias "Steve's Class 1 CA" -out trust.pem 648 -setalias "Steve's Class 1 CA" -out trust.pem
641 649
642=head1 NOTES 650=head1 NOTES
643 651
644The PEM format uses the header and footer lines: 652The PEM format uses the header and footer lines:
645 653
646 -----BEGIN CERTIFICATE---- 654 -----BEGIN CERTIFICATE-----
647 -----END CERTIFICATE---- 655 -----END CERTIFICATE-----
648 656
649it will also handle files containing: 657it will also handle files containing:
650 658
651 -----BEGIN X509 CERTIFICATE---- 659 -----BEGIN X509 CERTIFICATE-----
652 -----END X509 CERTIFICATE---- 660 -----END X509 CERTIFICATE-----
653 661
654Trusted certificates have the lines 662Trusted certificates have the lines
655 663
656 -----BEGIN TRUSTED CERTIFICATE---- 664 -----BEGIN TRUSTED CERTIFICATE-----
657 -----END TRUSTED CERTIFICATE---- 665 -----END TRUSTED CERTIFICATE-----
658 666
659The conversion to UTF8 format used with the name options assumes that 667The conversion to UTF8 format used with the name options assumes that
660T61Strings use the ISO8859-1 character set. This is wrong but Netscape 668T61Strings use the ISO8859-1 character set. This is wrong but Netscape
diff --git a/src/lib/libssl/src/doc/c-indentation.el b/src/lib/libssl/src/doc/c-indentation.el
index 48ca3cf69b..cbf01cb172 100644
--- a/src/lib/libssl/src/doc/c-indentation.el
+++ b/src/lib/libssl/src/doc/c-indentation.el
@@ -13,12 +13,10 @@
13; 13;
14; Apparently statement blocks that are not introduced by a statement 14; Apparently statement blocks that are not introduced by a statement
15; such as "if" and that are not the body of a function cannot 15; such as "if" and that are not the body of a function cannot
16; be handled too well by CC mode with this indentation style. 16; be handled too well by CC mode with this indentation style,
17; The style defined below does not indent them at all. 17; so you have to indent them manually (you can use C-q tab).
18; To insert tabs manually, prefix them with ^Q (the "quoted-insert" 18;
19; command of Emacs). If you know a solution to this problem 19; For suggesting improvements, please send e-mail to bodo@openssl.org.
20; or find other problems with this indentation style definition,
21; please send e-mail to bodo@openssl.org.
22 20
23(c-add-style "eay" 21(c-add-style "eay"
24 '((c-basic-offset . 8) 22 '((c-basic-offset . 8)
diff --git a/src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod b/src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod
new file mode 100644
index 0000000000..51679bfcd9
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod
@@ -0,0 +1,43 @@
1=pod
2
3=head1 NAME
4
5ASN1_OBJECT_new, ASN1_OBJECT_free, - object allocation functions
6
7=head1 SYNOPSIS
8
9 ASN1_OBJECT *ASN1_OBJECT_new(void);
10 void ASN1_OBJECT_free(ASN1_OBJECT *a);
11
12=head1 DESCRIPTION
13
14The ASN1_OBJECT allocation routines, allocate and free an
15ASN1_OBJECT structure, which represents an ASN1 OBJECT IDENTIFIER.
16
17ASN1_OBJECT_new() allocates and initializes a ASN1_OBJECT structure.
18
19ASN1_OBJECT_free() frees up the B<ASN1_OBJECT> structure B<a>.
20
21=head1 NOTES
22
23Although ASN1_OBJECT_new() allocates a new ASN1_OBJECT structure it
24is almost never used in applications. The ASN1 object utility functions
25such as OBJ_nid2obj() are used instead.
26
27=head1 RETURN VALUES
28
29If the allocation fails, ASN1_OBJECT_new() returns B<NULL> and sets an error
30code that can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
31Otherwise it returns a pointer to the newly allocated structure.
32
33ASN1_OBJECT_free() returns no value.
34
35=head1 SEE ALSO
36
37L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_ASN1_OBJECT(3)|d2i_ASN1_OBJECT(3)>
38
39=head1 HISTORY
40
41ASN1_OBJECT_new() and ASN1_OBJECT_free() are available in all versions of SSLeay and OpenSSL.
42
43=cut
diff --git a/src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod b/src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod
new file mode 100644
index 0000000000..c4ec693f17
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod
@@ -0,0 +1,81 @@
1=pod
2
3=head1 NAME
4
5ASN1_STRING_dup, ASN1_STRING_cmp, ASN1_STRING_set, ASN1_STRING_length,
6ASN1_STRING_length_set, ASN1_STRING_type, ASN1_STRING_data -
7ASN1_STRING utility functions
8
9=head1 SYNOPSIS
10
11 int ASN1_STRING_length(ASN1_STRING *x);
12 unsigned char * ASN1_STRING_data(ASN1_STRING *x);
13
14 ASN1_STRING * ASN1_STRING_dup(ASN1_STRING *a);
15
16 int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b);
17
18 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
19
20 int ASN1_STRING_type(ASN1_STRING *x);
21
22 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
23
24=head1 DESCRIPTION
25
26These functions allow an B<ASN1_STRING> structure to be manipulated.
27
28ASN1_STRING_length() returns the length of the content of B<x>.
29
30ASN1_STRING_data() returns an internal pointer to the data of B<x>.
31Since this is an internal pointer it should B<not> be freed or
32modified in any way.
33
34ASN1_STRING_dup() returns a copy of the structure B<a>.
35
36ASN1_STRING_cmp() compares B<a> and B<b> returning 0 if the two
37are identical. The string types and content are compared.
38
39ASN1_STRING_set() sets the data of string B<str> to the buffer
40B<data> or length B<len>. The supplied data is copied. If B<len>
41is -1 then the length is determined by strlen(data).
42
43ASN1_STRING_type() returns the type of B<x>, using standard constants
44such as B<V_ASN1_OCTET_STRING>.
45
46ASN1_STRING_to_UTF8() converts the string B<in> to UTF8 format, the
47converted data is allocated in a buffer in B<*out>. The length of
48B<out> is returned or a negative error code. The buffer B<*out>
49should be free using OPENSSL_free().
50
51=head1 NOTES
52
53Almost all ASN1 types in OpenSSL are represented as an B<ASN1_STRING>
54structure. Other types such as B<ASN1_OCTET_STRING> are simply typedefed
55to B<ASN1_STRING> and the functions call the B<ASN1_STRING> equivalents.
56B<ASN1_STRING> is also used for some B<CHOICE> types which consist
57entirely of primitive string types such as B<DirectoryString> and
58B<Time>.
59
60These functions should B<not> be used to examine or modify B<ASN1_INTEGER>
61or B<ASN1_ENUMERATED> types: the relevant B<INTEGER> or B<ENUMERATED>
62utility functions should be used instead.
63
64In general it cannot be assumed that the data returned by ASN1_STRING_data()
65is null terminated or does not contain embedded nulls. The actual format
66of the data will depend on the actual string type itself: for example
67for and IA5String the data will be ASCII, for a BMPString two bytes per
68character in big endian format, UTF8String will be in UTF8 format.
69
70Similar care should be take to ensure the data is in the correct format
71when calling ASN1_STRING_set().
72
73=head1 RETURN VALUES
74
75=head1 SEE ALSO
76
77L<ERR_get_error(3)|ERR_get_error(3)>
78
79=head1 HISTORY
80
81=cut
diff --git a/src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod b/src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod
new file mode 100644
index 0000000000..5b1bbb7eb2
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod
@@ -0,0 +1,44 @@
1=pod
2
3=head1 NAME
4
5ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free -
6ASN1_STRING allocation functions
7
8=head1 SYNOPSIS
9
10 ASN1_STRING * ASN1_STRING_new(void);
11 ASN1_STRING * ASN1_STRING_type_new(int type);
12 void ASN1_STRING_free(ASN1_STRING *a);
13
14=head1 DESCRIPTION
15
16ASN1_STRING_new() returns an allocated B<ASN1_STRING> structure. Its type
17is undefined.
18
19ASN1_STRING_type_new() returns an allocated B<ASN1_STRING> structure of
20type B<type>.
21
22ASN1_STRING_free() frees up B<a>.
23
24=head1 NOTES
25
26Other string types call the B<ASN1_STRING> functions. For example
27ASN1_OCTET_STRING_new() calls ASN1_STRING_type(V_ASN1_OCTET_STRING).
28
29=head1 RETURN VALUES
30
31ASN1_STRING_new() and ASN1_STRING_type_new() return a valid
32ASN1_STRING structure or B<NULL> if an error occurred.
33
34ASN1_STRING_free() does not return a value.
35
36=head1 SEE ALSO
37
38L<ERR_get_error(3)|ERR_get_error(3)>
39
40=head1 HISTORY
41
42TBA
43
44=cut
diff --git a/src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod b/src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod
new file mode 100644
index 0000000000..fbf9a1f141
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod
@@ -0,0 +1,96 @@
1=pod
2
3=head1 NAME
4
5ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp - ASN1_STRING output routines.
6
7=head1 SYNOPSIS
8
9 #include <openssl/asn1.h>
10
11 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
12 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
13 int ASN1_STRING_print(BIO *out, ASN1_STRING *str);
14
15
16=head1 DESCRIPTION
17
18These functions output an B<ASN1_STRING> structure. B<ASN1_STRING> is used to
19represent all the ASN1 string types.
20
21ASN1_STRING_print_ex() outputs B<str> to B<out>, the format is determined by
22the options B<flags>. ASN1_STRING_print_ex_fp() is identical except it outputs
23to B<fp> instead.
24
25ASN1_STRING_print() prints B<str> to B<out> but using a different format to
26ASN1_STRING_print_ex(). It replaces unprintable characters (other than CR, LF)
27with '.'.
28
29=head1 NOTES
30
31ASN1_STRING_print() is a legacy function which should be avoided in new applications.
32
33Although there are a large number of options frequently B<ASN1_STRFLAGS_RFC2253> is
34suitable, or on UTF8 terminals B<ASN1_STRFLAGS_RFC2253 & ~ASN1_STRFLAGS_ESC_MSB>.
35
36The complete set of supported options for B<flags> is listed below.
37
38Various characters can be escaped. If B<ASN1_STRFLGS_ESC_2253> is set the characters
39determined by RFC2253 are escaped. If B<ASN1_STRFLGS_ESC_CTRL> is set control
40characters are escaped. If B<ASN1_STRFLGS_ESC_MSB> is set characters with the
41MSB set are escaped: this option should B<not> be used if the terminal correctly
42interprets UTF8 sequences.
43
44Escaping takes several forms.
45
46If the character being escaped is a 16 bit character then the form "\WXXXX" is used
47using exactly four characters for the hex representation. If it is 32 bits then
48"\UXXXXXXXX" is used using eight characters of its hex representation. These forms
49will only be used if UTF8 conversion is not set (see below).
50
51Printable characters are normally escaped using the backslash '\' character. If
52B<ASN1_STRFLGS_ESC_QUOTE> is set then the whole string is instead surrounded by
53double quote characters: this is arguably more readable than the backslash
54notation. Other characters use the "\XX" using exactly two characters of the hex
55representation.
56
57If B<ASN1_STRFLGS_UTF8_CONVERT> is set then characters are converted to UTF8
58format first. If the terminal supports the display of UTF8 sequences then this
59option will correctly display multi byte characters.
60
61If B<ASN1_STRFLGS_IGNORE_TYPE> is set then the string type is not interpreted at
62all: everything is assumed to be one byte per character. This is primarily for
63debugging purposes and can result in confusing output in multi character strings.
64
65If B<ASN1_STRFLGS_SHOW_TYPE> is set then the string type itself is printed out
66before its value (for example "BMPSTRING"), this actually uses ASN1_tag2str().
67
68The content of a string instead of being interpreted can be "dumped": this just
69outputs the value of the string using the form #XXXX using hex format for each
70octet.
71
72If B<ASN1_STRFLGS_DUMP_ALL> is set then any type is dumped.
73
74Normally non character string types (such as OCTET STRING) are assumed to be
75one byte per character, if B<ASN1_STRFLAGS_DUMP_UNKNOWN> is set then they will
76be dumped instead.
77
78When a type is dumped normally just the content octets are printed, if
79B<ASN1_STRFLGS_DUMP_DER> is set then the complete encoding is dumped
80instead (including tag and length octets).
81
82B<ASN1_STRFLGS_RFC2253> includes all the flags required by RFC2253. It is
83equivalent to:
84 ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB |
85 ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN ASN1_STRFLGS_DUMP_DER
86
87=head1 SEE ALSO
88
89L<X509_NAME_print_ex(3)|X509_NAME_print_ex(3)>,
90L<ASN1_tag2str(3)|ASN1_tag2str(3)>
91
92=head1 HISTORY
93
94TBA
95
96=cut
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod b/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod
index 4182f2c309..02439cea94 100644
--- a/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod
+++ b/src/lib/libssl/src/doc/crypto/BIO_f_cipher.pod
@@ -28,7 +28,7 @@ BIO_flush() on an encryption BIO that is being written through is
28used to signal that no more data is to be encrypted: this is used 28used to signal that no more data is to be encrypted: this is used
29to flush and possibly pad the final block through the BIO. 29to flush and possibly pad the final block through the BIO.
30 30
31BIO_set_cipher() sets the cipher of BIO <b> to B<cipher> using key B<key> 31BIO_set_cipher() sets the cipher of BIO B<b> to B<cipher> using key B<key>
32and IV B<iv>. B<enc> should be set to 1 for encryption and zero for 32and IV B<iv>. B<enc> should be set to 1 for encryption and zero for
33decryption. 33decryption.
34 34
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod b/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod
index 55e4b730b9..7b63e4621b 100644
--- a/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod
+++ b/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod
@@ -2,7 +2,7 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5BIO_s_accept, BIO_set_nbio, BIO_set_accept_port, BIO_get_accept_port, 5BIO_s_accept, BIO_set_accept_port, BIO_get_accept_port,
6BIO_set_nbio_accept, BIO_set_accept_bios, BIO_set_bind_mode, 6BIO_set_nbio_accept, BIO_set_accept_bios, BIO_set_bind_mode,
7BIO_get_bind_mode, BIO_do_accept - accept BIO 7BIO_get_bind_mode, BIO_do_accept - accept BIO
8 8
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_bio.pod b/src/lib/libssl/src/doc/crypto/BIO_s_bio.pod
index 95ae802e47..8d0a55a025 100644
--- a/src/lib/libssl/src/doc/crypto/BIO_s_bio.pod
+++ b/src/lib/libssl/src/doc/crypto/BIO_s_bio.pod
@@ -76,7 +76,9 @@ BIO_get_write_buf_size() returns the size of the write buffer.
76BIO_new_bio_pair() combines the calls to BIO_new(), BIO_make_bio_pair() and 76BIO_new_bio_pair() combines the calls to BIO_new(), BIO_make_bio_pair() and
77BIO_set_write_buf_size() to create a connected pair of BIOs B<bio1>, B<bio2> 77BIO_set_write_buf_size() to create a connected pair of BIOs B<bio1>, B<bio2>
78with write buffer sizes B<writebuf1> and B<writebuf2>. If either size is 78with write buffer sizes B<writebuf1> and B<writebuf2>. If either size is
79zero then the default size is used. 79zero then the default size is used. BIO_new_bio_pair() does not check whether
80B<bio1> or B<bio2> do point to some other BIO, the values are overwritten,
81BIO_free() is not called.
80 82
81BIO_get_write_guarantee() and BIO_ctrl_get_write_guarantee() return the maximum 83BIO_get_write_guarantee() and BIO_ctrl_get_write_guarantee() return the maximum
82length of data that can be currently written to the BIO. Writes larger than this 84length of data that can be currently written to the BIO. Writes larger than this
@@ -118,9 +120,59 @@ the application then waits for data to be available on the underlying transport
118before flushing the write buffer it will never succeed because the request was 120before flushing the write buffer it will never succeed because the request was
119never sent! 121never sent!
120 122
123=head1 RETURN VALUES
124
125BIO_new_bio_pair() returns 1 on success, with the new BIOs available in
126B<bio1> and B<bio2>, or 0 on failure, with NULL pointers stored into the
127locations for B<bio1> and B<bio2>. Check the error stack for more information.
128
129[XXXXX: More return values need to be added here]
130
121=head1 EXAMPLE 131=head1 EXAMPLE
122 132
123TBA 133The BIO pair can be used to have full control over the network access of an
134application. The application can call select() on the socket as required
135without having to go through the SSL-interface.
136
137 BIO *internal_bio, *network_bio;
138 ...
139 BIO_new_bio_pair(internal_bio, 0, network_bio, 0);
140 SSL_set_bio(ssl, internal_bio, internal_bio);
141 SSL_operations();
142 ...
143
144 application | TLS-engine
145 | |
146 +----------> SSL_operations()
147 | /\ ||
148 | || \/
149 | BIO-pair (internal_bio)
150 +----------< BIO-pair (network_bio)
151 | |
152 socket |
153
154 ...
155 SSL_free(ssl); /* implicitly frees internal_bio */
156 BIO_free(network_bio);
157 ...
158
159As the BIO pair will only buffer the data and never directly access the
160connection, it behaves non-blocking and will return as soon as the write
161buffer is full or the read buffer is drained. Then the application has to
162flush the write buffer and/or fill the read buffer.
163
164Use the BIO_ctrl_pending(), to find out whether data is buffered in the BIO
165and must be transfered to the network. Use BIO_ctrl_get_read_request() to
166find out, how many bytes must be written into the buffer before the
167SSL_operation() can successfully be continued.
168
169=head1 WARNING
170
171As the data is buffered, SSL_operation() may return with a ERROR_SSL_WANT_READ
172condition, but there is still data in the write buffer. An application must
173not rely on the error value of SSL_operation() but must assure that the
174write buffer is always flushed first. Otherwise a deadlock may occur as
175the peer might be waiting for the data before being able to continue.
124 176
125=head1 SEE ALSO 177=head1 SEE ALSO
126 178
diff --git a/src/lib/libssl/src/doc/crypto/BN_CTX_new.pod b/src/lib/libssl/src/doc/crypto/BN_CTX_new.pod
index c94d8c610d..ad8d07db89 100644
--- a/src/lib/libssl/src/doc/crypto/BN_CTX_new.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_CTX_new.pod
@@ -42,7 +42,7 @@ BN_CTX_init() and BN_CTX_free() have no return values.
42 42
43=head1 SEE ALSO 43=head1 SEE ALSO
44 44
45L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<BN_add(3)|BN_add(3)>, 45L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_add(3)|BN_add(3)>,
46L<BN_CTX_start(3)|BN_CTX_start(3)> 46L<BN_CTX_start(3)|BN_CTX_start(3)>
47 47
48=head1 HISTORY 48=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/BN_add.pod b/src/lib/libssl/src/doc/crypto/BN_add.pod
index a99fe33808..88c7a799ee 100644
--- a/src/lib/libssl/src/doc/crypto/BN_add.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_add.pod
@@ -111,7 +111,7 @@ The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
111 111
112=head1 SEE ALSO 112=head1 SEE ALSO
113 113
114L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<BN_CTX_new(3)|BN_CTX_new(3)>, 114L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_CTX_new(3)|BN_CTX_new(3)>,
115L<BN_add_word(3)|BN_add_word(3)>, L<BN_set_bit(3)|BN_set_bit(3)> 115L<BN_add_word(3)|BN_add_word(3)>, L<BN_set_bit(3)|BN_set_bit(3)>
116 116
117=head1 HISTORY 117=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/BN_add_word.pod b/src/lib/libssl/src/doc/crypto/BN_add_word.pod
index 66bedfb924..94244adea4 100644
--- a/src/lib/libssl/src/doc/crypto/BN_add_word.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_add_word.pod
@@ -46,7 +46,7 @@ BN_mod_word() and BN_div_word() return B<a>%B<w>.
46 46
47=head1 SEE ALSO 47=head1 SEE ALSO
48 48
49L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<BN_add(3)|BN_add(3)> 49L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_add(3)|BN_add(3)>
50 50
51=head1 HISTORY 51=head1 HISTORY
52 52
diff --git a/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod b/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod
index b62d1af0ff..a4b17ca60a 100644
--- a/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_bn2bin.pod
@@ -80,7 +80,7 @@ The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
80 80
81=head1 SEE ALSO 81=head1 SEE ALSO
82 82
83L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<BN_zero(3)|BN_zero(3)>, 83L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_zero(3)|BN_zero(3)>,
84L<ASN1_INTEGER_to_BN(3)|ASN1_INTEGER_to_BN(3)>, 84L<ASN1_INTEGER_to_BN(3)|ASN1_INTEGER_to_BN(3)>,
85L<BN_num_bytes(3)|BN_num_bytes(3)> 85L<BN_num_bytes(3)|BN_num_bytes(3)>
86 86
diff --git a/src/lib/libssl/src/doc/crypto/BN_copy.pod b/src/lib/libssl/src/doc/crypto/BN_copy.pod
index 8ad25e7834..388dd7df26 100644
--- a/src/lib/libssl/src/doc/crypto/BN_copy.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_copy.pod
@@ -25,7 +25,7 @@ by L<ERR_get_error(3)|ERR_get_error(3)>.
25 25
26=head1 SEE ALSO 26=head1 SEE ALSO
27 27
28L<bn(3)|bn(3)>, L<err(3)|err(3)> 28L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>
29 29
30=head1 HISTORY 30=head1 HISTORY
31 31
diff --git a/src/lib/libssl/src/doc/crypto/BN_generate_prime.pod b/src/lib/libssl/src/doc/crypto/BN_generate_prime.pod
index 638f6514ee..7dccacbc1e 100644
--- a/src/lib/libssl/src/doc/crypto/BN_generate_prime.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_generate_prime.pod
@@ -70,7 +70,7 @@ If B<do_trial_division == 0>, this test is skipped.
70 70
71Both BN_is_prime() and BN_is_prime_fasttest() perform a Miller-Rabin 71Both BN_is_prime() and BN_is_prime_fasttest() perform a Miller-Rabin
72probabilistic primality test with B<checks> iterations. If 72probabilistic primality test with B<checks> iterations. If
73B<checks == BN_prime_check>, a number of iterations is used that 73B<checks == BN_prime_checks>, a number of iterations is used that
74yields a false positive rate of at most 2^-80 for random input. 74yields a false positive rate of at most 2^-80 for random input.
75 75
76If B<callback> is not B<NULL>, B<callback(1, j, cb_arg)> is called 76If B<callback> is not B<NULL>, B<callback(1, j, cb_arg)> is called
@@ -90,7 +90,7 @@ The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
90 90
91=head1 SEE ALSO 91=head1 SEE ALSO
92 92
93L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)> 93L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>
94 94
95=head1 HISTORY 95=head1 HISTORY
96 96
diff --git a/src/lib/libssl/src/doc/crypto/BN_mod_inverse.pod b/src/lib/libssl/src/doc/crypto/BN_mod_inverse.pod
index 49e62daf9f..3ea3975c74 100644
--- a/src/lib/libssl/src/doc/crypto/BN_mod_inverse.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_mod_inverse.pod
@@ -27,7 +27,7 @@ NULL on error. The error codes can be obtained by L<ERR_get_error(3)|ERR_get_err
27 27
28=head1 SEE ALSO 28=head1 SEE ALSO
29 29
30L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<BN_add(3)|BN_add(3)> 30L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_add(3)|BN_add(3)>
31 31
32=head1 HISTORY 32=head1 HISTORY
33 33
diff --git a/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod b/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod
index ed4af7a214..6b16351b92 100644
--- a/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_mod_mul_montgomery.pod
@@ -87,7 +87,7 @@ outside the expected range.
87 87
88=head1 SEE ALSO 88=head1 SEE ALSO
89 89
90L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<BN_add(3)|BN_add(3)>, 90L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_add(3)|BN_add(3)>,
91L<BN_CTX_new(3)|BN_CTX_new(3)> 91L<BN_CTX_new(3)|BN_CTX_new(3)>
92 92
93=head1 HISTORY 93=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod b/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod
index a28925f8a9..74a216ddc2 100644
--- a/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_mod_mul_reciprocal.pod
@@ -69,7 +69,7 @@ The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
69 69
70=head1 SEE ALSO 70=head1 SEE ALSO
71 71
72L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<BN_add(3)|BN_add(3)>, 72L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_add(3)|BN_add(3)>,
73L<BN_CTX_new(3)|BN_CTX_new(3)> 73L<BN_CTX_new(3)|BN_CTX_new(3)>
74 74
75=head1 HISTORY 75=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/BN_new.pod b/src/lib/libssl/src/doc/crypto/BN_new.pod
index c1394ff2a3..3033789c51 100644
--- a/src/lib/libssl/src/doc/crypto/BN_new.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_new.pod
@@ -42,7 +42,7 @@ values.
42 42
43=head1 SEE ALSO 43=head1 SEE ALSO
44 44
45L<bn(3)|bn(3)>, L<err(3)|err(3)> 45L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>
46 46
47=head1 HISTORY 47=head1 HISTORY
48 48
diff --git a/src/lib/libssl/src/doc/crypto/BN_rand.pod b/src/lib/libssl/src/doc/crypto/BN_rand.pod
index 9cec238f9e..81f93c2eb3 100644
--- a/src/lib/libssl/src/doc/crypto/BN_rand.pod
+++ b/src/lib/libssl/src/doc/crypto/BN_rand.pod
@@ -45,7 +45,7 @@ The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
45 45
46=head1 SEE ALSO 46=head1 SEE ALSO
47 47
48L<bn(3)|bn(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, 48L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
49L<RAND_add(3)|RAND_add(3)>, L<RAND_bytes(3)|RAND_bytes(3)> 49L<RAND_add(3)|RAND_add(3)>, L<RAND_bytes(3)|RAND_bytes(3)>
50 50
51=head1 HISTORY 51=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/DH_generate_key.pod b/src/lib/libssl/src/doc/crypto/DH_generate_key.pod
index 920995b2e5..81f09fdf45 100644
--- a/src/lib/libssl/src/doc/crypto/DH_generate_key.pod
+++ b/src/lib/libssl/src/doc/crypto/DH_generate_key.pod
@@ -40,7 +40,7 @@ The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
40 40
41=head1 SEE ALSO 41=head1 SEE ALSO
42 42
43L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, L<DH_size(3)|DH_size(3)> 43L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<DH_size(3)|DH_size(3)>
44 44
45=head1 HISTORY 45=head1 HISTORY
46 46
diff --git a/src/lib/libssl/src/doc/crypto/DH_generate_parameters.pod b/src/lib/libssl/src/doc/crypto/DH_generate_parameters.pod
index a7d0c75f0c..9081e9ea7c 100644
--- a/src/lib/libssl/src/doc/crypto/DH_generate_parameters.pod
+++ b/src/lib/libssl/src/doc/crypto/DH_generate_parameters.pod
@@ -59,7 +59,8 @@ a usable generator.
59 59
60=head1 SEE ALSO 60=head1 SEE ALSO
61 61
62L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, L<DH_free(3)|DH_free(3)> 62L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
63L<DH_free(3)|DH_free(3)>
63 64
64=head1 HISTORY 65=head1 HISTORY
65 66
diff --git a/src/lib/libssl/src/doc/crypto/DH_new.pod b/src/lib/libssl/src/doc/crypto/DH_new.pod
index 64624b9d15..60c930093e 100644
--- a/src/lib/libssl/src/doc/crypto/DH_new.pod
+++ b/src/lib/libssl/src/doc/crypto/DH_new.pod
@@ -29,7 +29,7 @@ DH_free() returns no value.
29 29
30=head1 SEE ALSO 30=head1 SEE ALSO
31 31
32L<dh(3)|dh(3)>, L<err(3)|err(3)>, 32L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>,
33L<DH_generate_parameters(3)|DH_generate_parameters(3)>, 33L<DH_generate_parameters(3)|DH_generate_parameters(3)>,
34L<DH_generate_key(3)|DH_generate_key(3)> 34L<DH_generate_key(3)|DH_generate_key(3)>
35 35
diff --git a/src/lib/libssl/src/doc/crypto/DSA_SIG_new.pod b/src/lib/libssl/src/doc/crypto/DSA_SIG_new.pod
index 671655554a..3ac6140038 100644
--- a/src/lib/libssl/src/doc/crypto/DSA_SIG_new.pod
+++ b/src/lib/libssl/src/doc/crypto/DSA_SIG_new.pod
@@ -30,7 +30,8 @@ DSA_SIG_free() returns no value.
30 30
31=head1 SEE ALSO 31=head1 SEE ALSO
32 32
33L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, L<DSA_do_sign(3)|DSA_do_sign(3)> 33L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>,
34L<DSA_do_sign(3)|DSA_do_sign(3)>
34 35
35=head1 HISTORY 36=head1 HISTORY
36 37
diff --git a/src/lib/libssl/src/doc/crypto/DSA_do_sign.pod b/src/lib/libssl/src/doc/crypto/DSA_do_sign.pod
index a24fd5714e..5dfc733b20 100644
--- a/src/lib/libssl/src/doc/crypto/DSA_do_sign.pod
+++ b/src/lib/libssl/src/doc/crypto/DSA_do_sign.pod
@@ -36,7 +36,7 @@ L<ERR_get_error(3)|ERR_get_error(3)>.
36 36
37=head1 SEE ALSO 37=head1 SEE ALSO
38 38
39L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, 39L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
40L<DSA_SIG_new(3)|DSA_SIG_new(3)>, 40L<DSA_SIG_new(3)|DSA_SIG_new(3)>,
41L<DSA_sign(3)|DSA_sign(3)> 41L<DSA_sign(3)|DSA_sign(3)>
42 42
diff --git a/src/lib/libssl/src/doc/crypto/DSA_dup_DH.pod b/src/lib/libssl/src/doc/crypto/DSA_dup_DH.pod
index fdfe125ab0..7f6f0d1115 100644
--- a/src/lib/libssl/src/doc/crypto/DSA_dup_DH.pod
+++ b/src/lib/libssl/src/doc/crypto/DSA_dup_DH.pod
@@ -27,7 +27,7 @@ Be careful to avoid small subgroup attacks when using this.
27 27
28=head1 SEE ALSO 28=head1 SEE ALSO
29 29
30L<dh(3)|dh(3)>, L<dsa(3)|dsa(3)>, L<err(3)|err(3)> 30L<dh(3)|dh(3)>, L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>
31 31
32=head1 HISTORY 32=head1 HISTORY
33 33
diff --git a/src/lib/libssl/src/doc/crypto/DSA_generate_key.pod b/src/lib/libssl/src/doc/crypto/DSA_generate_key.pod
index 52890db5be..af83ccfaa1 100644
--- a/src/lib/libssl/src/doc/crypto/DSA_generate_key.pod
+++ b/src/lib/libssl/src/doc/crypto/DSA_generate_key.pod
@@ -24,7 +24,8 @@ The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
24 24
25=head1 SEE ALSO 25=head1 SEE ALSO
26 26
27L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, L<DSA_generate_parameters(3)|DSA_generate_parameters(3)> 27L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
28L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>
28 29
29=head1 HISTORY 30=head1 HISTORY
30 31
diff --git a/src/lib/libssl/src/doc/crypto/DSA_generate_parameters.pod b/src/lib/libssl/src/doc/crypto/DSA_generate_parameters.pod
index 43f60b0eb9..be7c924ff8 100644
--- a/src/lib/libssl/src/doc/crypto/DSA_generate_parameters.pod
+++ b/src/lib/libssl/src/doc/crypto/DSA_generate_parameters.pod
@@ -90,7 +90,7 @@ Seed lengths E<gt> 20 are not supported.
90 90
91=head1 SEE ALSO 91=head1 SEE ALSO
92 92
93L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, 93L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
94L<DSA_free(3)|DSA_free(3)> 94L<DSA_free(3)|DSA_free(3)>
95 95
96=head1 HISTORY 96=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/DSA_new.pod b/src/lib/libssl/src/doc/crypto/DSA_new.pod
index 546146d9de..48e9b82a09 100644
--- a/src/lib/libssl/src/doc/crypto/DSA_new.pod
+++ b/src/lib/libssl/src/doc/crypto/DSA_new.pod
@@ -31,7 +31,7 @@ DSA_free() returns no value.
31 31
32=head1 SEE ALSO 32=head1 SEE ALSO
33 33
34L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, 34L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>,
35L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>, 35L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>,
36L<DSA_generate_key(3)|DSA_generate_key(3)> 36L<DSA_generate_key(3)|DSA_generate_key(3)>
37 37
diff --git a/src/lib/libssl/src/doc/crypto/DSA_sign.pod b/src/lib/libssl/src/doc/crypto/DSA_sign.pod
index f6e60a8ca3..97389e8ec8 100644
--- a/src/lib/libssl/src/doc/crypto/DSA_sign.pod
+++ b/src/lib/libssl/src/doc/crypto/DSA_sign.pod
@@ -55,7 +55,7 @@ Standard, DSS), ANSI X9.30
55 55
56=head1 SEE ALSO 56=head1 SEE ALSO
57 57
58L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, 58L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>,
59L<DSA_do_sign(3)|DSA_do_sign(3)> 59L<DSA_do_sign(3)|DSA_do_sign(3)>
60 60
61=head1 HISTORY 61=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/ERR_get_error.pod b/src/lib/libssl/src/doc/crypto/ERR_get_error.pod
index 9fdedbcb91..34443045fc 100644
--- a/src/lib/libssl/src/doc/crypto/ERR_get_error.pod
+++ b/src/lib/libssl/src/doc/crypto/ERR_get_error.pod
@@ -5,7 +5,7 @@
5ERR_get_error, ERR_peek_error, ERR_peek_last_error, 5ERR_get_error, ERR_peek_error, ERR_peek_last_error,
6ERR_get_error_line, ERR_peek_error_line, ERR_peek_last_error_line, 6ERR_get_error_line, ERR_peek_error_line, ERR_peek_last_error_line,
7ERR_get_error_line_data, ERR_peek_error_line_data, 7ERR_get_error_line_data, ERR_peek_error_line_data,
8ERR_peek_error_line_data - obtain error code and data 8ERR_peek_last_error_line_data - obtain error code and data
9 9
10=head1 SYNOPSIS 10=head1 SYNOPSIS
11 11
diff --git a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod
index 75cceb1ca2..daf57e5895 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod
@@ -419,7 +419,7 @@ Encrypt a string using blowfish:
419 EVP_CIPHER_CTX ctx; 419 EVP_CIPHER_CTX ctx;
420 FILE *out; 420 FILE *out;
421 EVP_CIPHER_CTX_init(&ctx); 421 EVP_CIPHER_CTX_init(&ctx);
422 EVP_EncryptInit_ex(&ctx, NULL, EVP_bf_cbc(), key, iv); 422 EVP_EncryptInit_ex(&ctx, EVP_bf_cbc(), NULL, key, iv);
423 423
424 if(!EVP_EncryptUpdate(&ctx, outbuf, &outlen, intext, strlen(intext))) 424 if(!EVP_EncryptUpdate(&ctx, outbuf, &outlen, intext, strlen(intext)))
425 { 425 {
diff --git a/src/lib/libssl/src/doc/crypto/EVP_PKEY_new.pod b/src/lib/libssl/src/doc/crypto/EVP_PKEY_new.pod
new file mode 100644
index 0000000000..10687e458d
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/EVP_PKEY_new.pod
@@ -0,0 +1,47 @@
1=pod
2
3=head1 NAME
4
5EVP_PKEY_new, EVP_PKEY_free - private key allocation functions.
6
7=head1 SYNOPSIS
8
9 #include <openssl/evp.h>
10
11 EVP_PKEY *EVP_PKEY_new(void);
12 void EVP_PKEY_free(EVP_PKEY *key);
13
14
15=head1 DESCRIPTION
16
17The EVP_PKEY_new() function allocates an empty B<EVP_PKEY>
18structure which is used by OpenSSL to store private keys.
19
20EVP_PKEY_free() frees up the private key B<key>.
21
22=head1 NOTES
23
24The B<EVP_PKEY> structure is used by various OpenSSL functions
25which require a general private key without reference to any
26particular algorithm.
27
28The structure returned by EVP_PKEY_new() is empty. To add a
29private key to this empty structure the functions described in
30L<EVP_PKEY_set1_RSA(3)|EVP_PKEY_set1_RSA(3)> should be used.
31
32=head1 RETURN VALUES
33
34EVP_PKEY_new() returns either the newly allocated B<EVP_PKEY>
35structure of B<NULL> if an error occurred.
36
37EVP_PKEY_free() does not return a value.
38
39=head1 SEE ALSO
40
41L<EVP_PKEY_set1_RSA(3)|EVP_PKEY_set1_RSA(3)>
42
43=head1 HISTORY
44
45TBA
46
47=cut
diff --git a/src/lib/libssl/src/doc/crypto/EVP_PKEY_set1_RSA.pod b/src/lib/libssl/src/doc/crypto/EVP_PKEY_set1_RSA.pod
new file mode 100644
index 0000000000..2db692e271
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/EVP_PKEY_set1_RSA.pod
@@ -0,0 +1,80 @@
1=pod
2
3=head1 NAME
4
5EVP_PKEY_set1_RSA, EVP_PKEY_set1_DSA, EVP_PKEY_set1_DH, EVP_PKEY_set1_EC_KEY,
6EVP_PKEY_get1_RSA, EVP_PKEY_get1_DSA, EVP_PKEY_get1_DH, EVP_PKEY_get1_EC_KEY,
7EVP_PKEY_assign_RSA, EVP_PKEY_assign_DSA, EVP_PKEY_assign_DH, EVP_PKEY_assign_EC_KEY,
8EVP_PKEY_type - EVP_PKEY assignment functions.
9
10=head1 SYNOPSIS
11
12 #include <openssl/evp.h>
13
14 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,RSA *key);
15 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,DSA *key);
16 int EVP_PKEY_set1_DH(EVP_PKEY *pkey,DH *key);
17 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,EC_KEY *key);
18
19 RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
20 DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
21 DH *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
22 EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
23
24 int EVP_PKEY_assign_RSA(EVP_PKEY *pkey,RSA *key);
25 int EVP_PKEY_assign_DSA(EVP_PKEY *pkey,DSA *key);
26 int EVP_PKEY_assign_DH(EVP_PKEY *pkey,DH *key);
27 int EVP_PKEY_assign_EC_KEY(EVP_PKEY *pkey,EC_KEY *key);
28
29 int EVP_PKEY_type(int type);
30
31=head1 DESCRIPTION
32
33EVP_PKEY_set1_RSA(), EVP_PKEY_set1_DSA(), EVP_PKEY_set1_DH() and
34EVP_PKEY_set1_EC_KEY() set the key referenced by B<pkey> to B<key>.
35
36EVP_PKEY_get1_RSA(), EVP_PKEY_get1_DSA(), EVP_PKEY_get1_DH() and
37EVP_PKEY_get1_EC_KEY() return the referenced key in B<pkey> or
38B<NULL> if the key is not of the correct type.
39
40EVP_PKEY_assign_RSA() EVP_PKEY_assign_DSA(), EVP_PKEY_assign_DH()
41and EVP_PKEY_assign_EC_KEY() also set the referenced key to B<key>
42however these use the supplied B<key> internally and so B<key>
43will be freed when the parent B<pkey> is freed.
44
45EVP_PKEY_type() returns the type of key corresponding to the value
46B<type>. The type of a key can be obtained with
47EVP_PKEY_type(pkey->type). The return value will be EVP_PKEY_RSA,
48EVP_PKEY_DSA, EVP_PKEY_DH or EVP_PKEY_EC for the corresponding
49key types or NID_undef if the key type is unassigned.
50
51=head1 NOTES
52
53In accordance with the OpenSSL naming convention the key obtained
54from or assigned to the B<pkey> using the B<1> functions must be
55freed as well as B<pkey>.
56
57EVP_PKEY_assign_RSA() EVP_PKEY_assign_DSA(), EVP_PKEY_assign_DH()
58EVP_PKEY_assign_EC_KEY() are implemented as macros.
59
60=head1 RETURN VALUES
61
62EVP_PKEY_set1_RSA(), EVP_PKEY_set1_DSA(), EVP_PKEY_set1_DH() and
63EVP_PKEY_set1_EC_KEY() return 1 for success or 0 for failure.
64
65EVP_PKEY_get1_RSA(), EVP_PKEY_get1_DSA(), EVP_PKEY_get1_DH() and
66EVP_PKEY_get1_EC_KEY() return the referenced key or B<NULL> if
67an error occurred.
68
69EVP_PKEY_assign_RSA() EVP_PKEY_assign_DSA(), EVP_PKEY_assign_DH()
70and EVP_PKEY_assign_EC_KEY() return 1 for success and 0 for failure.
71
72=head1 SEE ALSO
73
74L<EVP_PKEY_new(3)|EVP_PKEY_new(3)>
75
76=head1 HISTORY
77
78TBA
79
80=cut
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
index 25ef07f7c7..b5e477e294 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
+++ b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
@@ -18,22 +18,28 @@ EVP_SealInit, EVP_SealUpdate, EVP_SealFinal - EVP envelope encryption
18=head1 DESCRIPTION 18=head1 DESCRIPTION
19 19
20The EVP envelope routines are a high level interface to envelope 20The EVP envelope routines are a high level interface to envelope
21encryption. They generate a random key and then "envelope" it by 21encryption. They generate a random key and IV (if required) then
22using public key encryption. Data can then be encrypted using this 22"envelope" it by using public key encryption. Data can then be
23key. 23encrypted using this key.
24 24
25EVP_SealInit() initializes a cipher context B<ctx> for encryption 25EVP_SealInit() initializes a cipher context B<ctx> for encryption
26with cipher B<type> using a random secret key and IV supplied in 26with cipher B<type> using a random secret key and IV. B<type> is normally
27the B<iv> parameter. B<type> is normally supplied by a function such 27supplied by a function such as EVP_des_cbc(). The secret key is encrypted
28as EVP_des_cbc(). The secret key is encrypted using one or more public 28using one or more public keys, this allows the same encrypted data to be
29keys, this allows the same encrypted data to be decrypted using any 29decrypted using any of the corresponding private keys. B<ek> is an array of
30of the corresponding private keys. B<ek> is an array of buffers where 30buffers where the public key encrypted secret key will be written, each buffer
31the public key encrypted secret key will be written, each buffer must 31must contain enough room for the corresponding encrypted key: that is
32contain enough room for the corresponding encrypted key: that is
33B<ek[i]> must have room for B<EVP_PKEY_size(pubk[i])> bytes. The actual 32B<ek[i]> must have room for B<EVP_PKEY_size(pubk[i])> bytes. The actual
34size of each encrypted secret key is written to the array B<ekl>. B<pubk> is 33size of each encrypted secret key is written to the array B<ekl>. B<pubk> is
35an array of B<npubk> public keys. 34an array of B<npubk> public keys.
36 35
36The B<iv> parameter is a buffer where the generated IV is written to. It must
37contain enough room for the corresponding cipher's IV, as determined by (for
38example) EVP_CIPHER_iv_length(type).
39
40If the cipher does not require an IV then the B<iv> parameter is ignored
41and can be B<NULL>.
42
37EVP_SealUpdate() and EVP_SealFinal() have exactly the same properties 43EVP_SealUpdate() and EVP_SealFinal() have exactly the same properties
38as the EVP_EncryptUpdate() and EVP_EncryptFinal() routines, as 44as the EVP_EncryptUpdate() and EVP_EncryptFinal() routines, as
39documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual 45documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual
diff --git a/src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod b/src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod
new file mode 100644
index 0000000000..7dcc07923f
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod
@@ -0,0 +1,149 @@
1=pod
2
3=head1 NAME
4
5OBJ_nid2obj, OBJ_nid2ln, OBJ_nid2sn, OBJ_obj2nid, OBJ_txt2nid, OBJ_ln2nid, OBJ_sn2nid,
6OBJ_cmp, OBJ_dup, OBJ_txt2obj, OBJ_obj2txt, OBJ_create, OBJ_cleanup - ASN1 object utility
7functions
8
9=head1 SYNOPSIS
10
11 ASN1_OBJECT * OBJ_nid2obj(int n);
12 const char * OBJ_nid2ln(int n);
13 const char * OBJ_nid2sn(int n);
14
15 int OBJ_obj2nid(const ASN1_OBJECT *o);
16 int OBJ_ln2nid(const char *ln);
17 int OBJ_sn2nid(const char *sn);
18
19 int OBJ_txt2nid(const char *s);
20
21 ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name);
22 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
23
24 int OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b);
25 ASN1_OBJECT * OBJ_dup(const ASN1_OBJECT *o);
26
27 int OBJ_create(const char *oid,const char *sn,const char *ln);
28 void OBJ_cleanup(void);
29
30=head1 DESCRIPTION
31
32The ASN1 object utility functions process ASN1_OBJECT structures which are
33a representation of the ASN1 OBJECT IDENTIFIER (OID) type.
34
35OBJ_nid2obj(), OBJ_nid2ln() and OBJ_nid2sn() convert the NID B<n> to
36an ASN1_OBJECT structure, its long name and its short name respectively,
37or B<NULL> is an error occurred.
38
39OBJ_obj2nid(), OBJ_ln2nid(), OBJ_sn2nid() return the corresponding NID
40for the object B<o>, the long name <ln> or the short name <sn> respectively
41or NID_undef if an error occurred.
42
43OBJ_txt2nid() returns NID corresponding to text string <s>. B<s> can be
44a long name, a short name or the numerical respresentation of an object.
45
46OBJ_txt2obj() converts the text string B<s> into an ASN1_OBJECT structure.
47If B<no_name> is 0 then long names and short names will be interpreted
48as well as numerical forms. If B<no_name> is 1 only the numerical form
49is acceptable.
50
51OBJ_obj2txt() converts the B<ASN1_OBJECT> B<a> into a textual representation.
52The representation is written as a null terminated string to B<buf>
53at most B<buf_len> bytes are written, truncating the result if necessary.
54The total amount of space required is returned. If B<no_name> is 0 then
55if the object has a long or short name then that will be used, otherwise
56the numerical form will be used. If B<no_name> is 1 then the numerical
57form will always be used.
58
59OBJ_cmp() compares B<a> to B<b>. If the two are identical 0 is returned.
60
61OBJ_dup() returns a copy of B<o>.
62
63OBJ_create() adds a new object to the internal table. B<oid> is the
64numerical form of the object, B<sn> the short name and B<ln> the
65long name. A new NID is returned for the created object.
66
67OBJ_cleanup() cleans up OpenSSLs internal object table: this should
68be called before an application exits if any new objects were added
69using OBJ_create().
70
71=head1 NOTES
72
73Objects in OpenSSL can have a short name, a long name and a numerical
74identifier (NID) associated with them. A standard set of objects is
75represented in an internal table. The appropriate values are defined
76in the header file B<objects.h>.
77
78For example the OID for commonName has the following definitions:
79
80 #define SN_commonName "CN"
81 #define LN_commonName "commonName"
82 #define NID_commonName 13
83
84New objects can be added by calling OBJ_create().
85
86Table objects have certain advantages over other objects: for example
87their NIDs can be used in a C language switch statement. They are
88also static constant structures which are shared: that is there
89is only a single constant structure for each table object.
90
91Objects which are not in the table have the NID value NID_undef.
92
93Objects do not need to be in the internal tables to be processed,
94the functions OBJ_txt2obj() and OBJ_obj2txt() can process the numerical
95form of an OID.
96
97=head1 EXAMPLES
98
99Create an object for B<commonName>:
100
101 ASN1_OBJECT *o;
102 o = OBJ_nid2obj(NID_commonName);
103
104Check if an object is B<commonName>
105
106 if (OBJ_obj2nid(obj) == NID_commonName)
107 /* Do something */
108
109Create a new NID and initialize an object from it:
110
111 int new_nid;
112 ASN1_OBJECT *obj;
113 new_nid = OBJ_create("1.2.3.4", "NewOID", "New Object Identifier");
114
115 obj = OBJ_nid2obj(new_nid);
116
117Create a new object directly:
118
119 obj = OBJ_txt2obj("1.2.3.4", 1);
120
121=head1 BUGS
122
123OBJ_obj2txt() is awkward and messy to use: it doesn't follow the
124convention of other OpenSSL functions where the buffer can be set
125to B<NULL> to determine the amount of data that should be written.
126Instead B<buf> must point to a valid buffer and B<buf_len> should
127be set to a positive value. A buffer length of 80 should be more
128than enough to handle any OID encountered in practice.
129
130=head1 RETURN VALUES
131
132OBJ_nid2obj() returns an B<ASN1_OBJECT> structure or B<NULL> is an
133error occurred.
134
135OBJ_nid2ln() and OBJ_nid2sn() returns a valid string or B<NULL>
136on error.
137
138OBJ_obj2nid(), OBJ_ln2nid(), OBJ_sn2nid() and OBJ_txt2nid() return
139a NID or B<NID_undef> on error.
140
141=head1 SEE ALSO
142
143L<ERR_get_error(3)|ERR_get_error(3)>
144
145=head1 HISTORY
146
147TBA
148
149=cut
diff --git a/src/lib/libssl/src/doc/crypto/PKCS12_create.pod b/src/lib/libssl/src/doc/crypto/PKCS12_create.pod
new file mode 100644
index 0000000000..48f3bb8cb8
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/PKCS12_create.pod
@@ -0,0 +1,57 @@
1=pod
2
3=head1 NAME
4
5PKCS12_create - create a PKCS#12 structure
6
7=head1 SYNOPSIS
8
9 #include <openssl/pkcs12.h>
10
11 PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, STACK_OF(X509) *ca,
12 int nid_key, int nid_cert, int iter, int mac_iter, int keytype);
13
14=head1 DESCRIPTION
15
16PKCS12_create() creates a PKCS#12 structure.
17
18B<pass> is the passphrase to use. B<name> is the B<friendlyName> to use for
19the supplied certifictate and key. B<pkey> is the private key to include in
20the structure and B<cert> its corresponding certificates. B<ca>, if not B<NULL>
21is an optional set of certificates to also include in the structure.
22
23B<nid_key> and B<nid_cert> are the encryption algorithms that should be used
24for the key and certificate respectively. B<iter> is the encryption algorithm
25iteration count to use and B<mac_iter> is the MAC iteration count to use.
26B<keytype> is the type of key.
27
28=head1 NOTES
29
30The parameters B<nid_key>, B<nid_cert>, B<iter>, B<mac_iter> and B<keytype>
31can all be set to zero and sensible defaults will be used.
32
33These defaults are: 40 bit RC2 encryption for certificates, triple DES
34encryption for private keys, a key iteration count of PKCS12_DEFAULT_ITER
35(currently 2048) and a MAC iteration count of 1.
36
37The default MAC iteration count is 1 in order to retain compatibility with
38old software which did not interpret MAC iteration counts. If such compatibility
39is not required then B<mac_iter> should be set to PKCS12_DEFAULT_ITER.
40
41B<keytype> adds a flag to the store private key. This is a non standard extension
42that is only currently interpreted by MSIE. If set to zero the flag is omitted,
43if set to B<KEY_SIG> the key can be used for signing only, if set to B<KEY_EX>
44it can be used for signing and encryption. This option was useful for old
45export grade software which could use signing only keys of arbitrary size but
46had restrictions on the permissible sizes of keys which could be used for
47encryption.
48
49=head1 SEE ALSO
50
51L<d2i_PKCS12(3)|d2i_PKCS12(3)>
52
53=head1 HISTORY
54
55PKCS12_create was added in OpenSSL 0.9.3
56
57=cut
diff --git a/src/lib/libssl/src/doc/crypto/PKCS12_parse.pod b/src/lib/libssl/src/doc/crypto/PKCS12_parse.pod
new file mode 100644
index 0000000000..51344f883a
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/PKCS12_parse.pod
@@ -0,0 +1,50 @@
1=pod
2
3=head1 NAME
4
5PKCS12_parse - parse a PKCS#12 structure
6
7=head1 SYNOPSIS
8
9 #include <openssl/pkcs12.h>
10
11int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca);
12
13=head1 DESCRIPTION
14
15PKCS12_parse() parses a PKCS12 structure.
16
17B<p12> is the B<PKCS12> structure to parse. B<pass> is the passphrase to use.
18If successful the private key will be written to B<*pkey>, the corresponding
19certificate to B<*cert> and any additional certificates to B<*ca>.
20
21=head1 NOTES
22
23The parameters B<pkey> and B<cert> cannot be B<NULL>. B<ca> can be <NULL>
24in which case additional certificates will be discarded. B<*ca> can also
25be a valid STACK in which case additional certificates are appended to
26B<*ca>. If B<*ca> is B<NULL> a new STACK will be allocated.
27
28The B<friendlyName> and B<localKeyID> attributes (if present) on each certificate
29will be stored in the B<alias> and B<keyid> attributes of the B<X509> structure.
30
31=head1 BUGS
32
33Only a single private key and corresponding certificate is returned by this function.
34More complex PKCS#12 files with multiple private keys will only return the first
35match.
36
37Only B<friendlyName> and B<localKeyID> attributes are currently stored in certificates.
38Other attributes are discarded.
39
40Attributes currently cannot be store in the private key B<EVP_PKEY> structure.
41
42=head1 SEE ALSO
43
44L<d2i_PKCS12(3)|d2i_PKCS12(3)>
45
46=head1 HISTORY
47
48PKCS12_parse was added in OpenSSL 0.9.3
49
50=cut
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod b/src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod
new file mode 100644
index 0000000000..b0ca067b89
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod
@@ -0,0 +1,53 @@
1=pod
2
3=head1 NAME
4
5PKCS7_decrypt - decrypt content from a PKCS#7 envelopedData structure
6
7=head1 SYNOPSIS
8
9int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags);
10
11=head1 DESCRIPTION
12
13PKCS7_decrypt() extracts and decrypts the content from a PKCS#7 envelopedData
14structure. B<pkey> is the private key of the recipient, B<cert> is the
15recipients certificate, B<data> is a BIO to write the content to and
16B<flags> is an optional set of flags.
17
18=head1 NOTES
19
20OpenSSL_add_all_algorithms() (or equivalent) should be called before using this
21function or errors about unknown algorithms will occur.
22
23Although the recipients certificate is not needed to decrypt the data it is needed
24to locate the appropriate (of possible several) recipients in the PKCS#7 structure.
25
26The following flags can be passed in the B<flags> parameter.
27
28If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are deleted
29from the content. If the content is not of type B<text/plain> then an error is
30returned.
31
32=head1 RETURN VALUES
33
34PKCS7_decrypt() returns either 1 for success or 0 for failure.
35The error can be obtained from ERR_get_error(3)
36
37=head1 BUGS
38
39PKCS7_decrypt() must be passed the correct recipient key and certificate. It would
40be better if it could look up the correct key and certificate from a database.
41
42The lack of single pass processing and need to hold all data in memory as
43mentioned in PKCS7_sign() also applies to PKCS7_verify().
44
45=head1 SEE ALSO
46
47L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_encrypt(3)|PKCS7_encrypt(3)>
48
49=head1 HISTORY
50
51PKCS7_decrypt() was added to OpenSSL 0.9.5
52
53=cut
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod b/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod
new file mode 100644
index 0000000000..1a507b22a2
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod
@@ -0,0 +1,65 @@
1=pod
2
3=head1 NAME
4
5PKCS7_encrypt - create a PKCS#7 envelopedData structure
6
7=head1 SYNOPSIS
8
9PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, int flags);
10
11=head1 DESCRIPTION
12
13PKCS7_encrypt() creates and returns a PKCS#7 envelopedData structure. B<certs>
14is a list of recipient certificates. B<in> is the content to be encrypted.
15B<cipher> is the symmetric cipher to use. B<flags> is an optional set of flags.
16
17=head1 NOTES
18
19Only RSA keys are supported in PKCS#7 and envelopedData so the recipient certificates
20supplied to this function must all contain RSA public keys, though they do not have to
21be signed using the RSA algorithm.
22
23EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use because
24most clients will support it.
25
26Some old "export grade" clients may only support weak encryption using 40 or 64 bit
27RC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc() respectively.
28
29The algorithm passed in the B<cipher> parameter must support ASN1 encoding of its
30parameters.
31
32Many browsers implement a "sign and encrypt" option which is simply an S/MIME
33envelopedData containing an S/MIME signed message. This can be readily produced
34by storing the S/MIME signed message in a memory BIO and passing it to
35PKCS7_encrypt().
36
37The following flags can be passed in the B<flags> parameter.
38
39If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are prepended
40to the data.
41
42Normally the supplied content is translated into MIME canonical format (as required
43by the S/MIME specifications) if B<PKCS7_BINARY> is set no translation occurs. This
44option should be used if the supplied data is in binary format otherwise the translation
45will corrupt it. If B<PKCS7_BINARY> is set then B<PKCS7_TEXT> is ignored.
46
47=head1 RETURN VALUES
48
49PKCS7_encrypt() returns either a valid PKCS7 structure or NULL if an error occurred.
50The error can be obtained from ERR_get_error(3).
51
52=head1 BUGS
53
54The lack of single pass processing and need to hold all data in memory as
55mentioned in PKCS7_sign() also applies to PKCS7_verify().
56
57=head1 SEE ALSO
58
59L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_decrypt(3)|PKCS7_decrypt(3)>
60
61=head1 HISTORY
62
63PKCS7_decrypt() was added to OpenSSL 0.9.5
64
65=cut
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_sign.pod b/src/lib/libssl/src/doc/crypto/PKCS7_sign.pod
new file mode 100644
index 0000000000..fc7e649b34
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/PKCS7_sign.pod
@@ -0,0 +1,85 @@
1=pod
2
3=head1 NAME
4
5PKCS7_sign - create a PKCS#7 signedData structure
6
7=head1 SYNOPSIS
8
9PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, int flags);
10
11=head1 DESCRIPTION
12
13PKCS7_sign() creates and returns a PKCS#7 signedData structure. B<signcert>
14is the certificate to sign with, B<pkey> is the corresponsding private key.
15B<certs> is an optional additional set of certificates to include in the
16PKCS#7 structure (for example any intermediate CAs in the chain).
17
18The data to be signed is read from BIO B<data>.
19
20B<flags> is an optional set of flags.
21
22=head1 NOTES
23
24Any of the following flags (ored together) can be passed in the B<flags> parameter.
25
26Many S/MIME clients expect the signed content to include valid MIME headers. If
27the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are prepended
28to the data.
29
30If B<PKCS7_NOCERTS> is set the signer's certificate will not be included in the
31PKCS7 structure, the signer's certificate must still be supplied in the B<signcert>
32parameter though. This can reduce the size of the signature if the signers certificate
33can be obtained by other means: for example a previously signed message.
34
35The data being signed is included in the PKCS7 structure, unless B<PKCS7_DETACHED>
36is set in which case it is omitted. This is used for PKCS7 detached signatures
37which are used in S/MIME plaintext signed messages for example.
38
39Normally the supplied content is translated into MIME canonical format (as required
40by the S/MIME specifications) if B<PKCS7_BINARY> is set no translation occurs. This
41option should be used if the supplied data is in binary format otherwise the translation
42will corrupt it.
43
44The signedData structure includes several PKCS#7 autenticatedAttributes including
45the signing time, the PKCS#7 content type and the supported list of ciphers in
46an SMIMECapabilities attribute. If B<PKCS7_NOATTR> is set then no authenticatedAttributes
47will be used. If B<PKCS7_NOSMIMECAP> is set then just the SMIMECapabilities are
48omitted.
49
50If present the SMIMECapabilities attribute indicates support for the following
51algorithms: triple DES, 128 bit RC2, 64 bit RC2, DES and 40 bit RC2. If any
52of these algorithms is disabled then it will not be included.
53
54=head1 BUGS
55
56PKCS7_sign() is somewhat limited. It does not support multiple signers, some
57advanced attributes such as counter signatures are not supported.
58
59The SHA1 digest algorithm is currently always used.
60
61When the signed data is not detached it will be stored in memory within the
62B<PKCS7> structure. This effectively limits the size of messages which can be
63signed due to memory restraints. There should be a way to sign data without
64having to hold it all in memory, this would however require fairly major
65revisions of the OpenSSL ASN1 code.
66
67Clear text signing does not store the content in memory but the way PKCS7_sign()
68operates means that two passes of the data must typically be made: one to compute
69the signatures and a second to output the data along with the signature. There
70should be a way to process the data with only a single pass.
71
72=head1 RETURN VALUES
73
74PKCS7_sign() returns either a valid PKCS7 structure or NULL if an error occurred.
75The error can be obtained from ERR_get_error(3).
76
77=head1 SEE ALSO
78
79L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_verify(3)|PKCS7_verify(3)>
80
81=head1 HISTORY
82
83PKCS7_sign() was added to OpenSSL 0.9.5
84
85=cut
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_verify.pod b/src/lib/libssl/src/doc/crypto/PKCS7_verify.pod
new file mode 100644
index 0000000000..07c9fdad40
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/PKCS7_verify.pod
@@ -0,0 +1,116 @@
1=pod
2
3=head1 NAME
4
5PKCS7_verify - verify a PKCS#7 signedData structure
6
7=head1 SYNOPSIS
8
9int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, int flags);
10
11int PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
12
13=head1 DESCRIPTION
14
15PKCS7_verify() verifies a PKCS#7 signedData structure. B<p7> is the PKCS7
16structure to verify. B<certs> is a set of certificates in which to search for
17the signer's certificate. B<store> is a trusted certficate store (used for
18chain verification). B<indata> is the signed data if the content is not
19present in B<p7> (that is it is detached). The content is written to B<out>
20if it is not NULL.
21
22B<flags> is an optional set of flags, which can be used to modify the verify
23operation.
24
25PKCS7_get0_signers() retrieves the signer's certificates from B<p7>, it does
26B<not> check their validity or whether any signatures are valid. The B<certs>
27and B<flags> parameters have the same meanings as in PKCS7_verify().
28
29=head1 VERIFY PROCESS
30
31Normally the verify process proceeds as follows.
32
33Initially some sanity checks are performed on B<p7>. The type of B<p7> must
34be signedData. There must be at least one signature on the data and if
35the content is detached B<indata> cannot be B<NULL>.
36
37An attempt is made to locate all the signer's certificates, first looking in
38the B<certs> parameter (if it is not B<NULL>) and then looking in any certificates
39contained in the B<p7> structure itself. If any signer's certificates cannot be
40located the operation fails.
41
42Each signer's certificate is chain verified using the B<smimesign> purpose and
43the supplied trusted certificate store. Any internal certificates in the message
44are used as untrusted CAs. If any chain verify fails an error code is returned.
45
46Finally the signed content is read (and written to B<out> is it is not NULL) and
47the signature's checked.
48
49If all signature's verify correctly then the function is successful.
50
51Any of the following flags (ored together) can be passed in the B<flags> parameter
52to change the default verify behaviour. Only the flag B<PKCS7_NOINTERN> is
53meaningful to PKCS7_get0_signers().
54
55If B<PKCS7_NOINTERN> is set the certificates in the message itself are not
56searched when locating the signer's certificate. This means that all the signers
57certificates must be in the B<certs> parameter.
58
59If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are deleted
60from the content. If the content is not of type B<text/plain> then an error is
61returned.
62
63If B<PKCS7_NOVERIFY> is set the signer's certificates are not chain verified.
64
65If B<PKCS7_NOCHAIN> is set then the certificates contained in the message are
66not used as untrusted CAs. This means that the whole verify chain (apart from
67the signer's certificate) must be contained in the trusted store.
68
69If B<PKCS7_NOSIGS> is set then the signatures on the data are not checked.
70
71=head1 NOTES
72
73One application of B<PKCS7_NOINTERN> is to only accept messages signed by
74a small number of certificates. The acceptable certificates would be passed
75in the B<certs> parameter. In this case if the signer is not one of the
76certificates supplied in B<certs> then the verify will fail because the
77signer cannot be found.
78
79Care should be taken when modifying the default verify behaviour, for example
80setting B<PKCS7_NOVERIFY|PKCS7_NOSIGS> will totally disable all verification
81and any signed message will be considered valid. This combination is however
82useful if one merely wishes to write the content to B<out> and its validity
83is not considered important.
84
85Chain verification should arguably be performed using the signing time rather
86than the current time. However since the signing time is supplied by the
87signer it cannot be trusted without additional evidence (such as a trusted
88timestamp).
89
90=head1 RETURN VALUES
91
92PKCS7_verify() returns 1 for a successful verification and zero or a negative
93value if an error occurs.
94
95PKCS7_get0_signers() returns all signers or B<NULL> if an error occurred.
96
97The error can be obtained from L<ERR_get_error(3)|ERR_get_error(3)>
98
99=head1 BUGS
100
101The trusted certificate store is not searched for the signers certificate,
102this is primarily due to the inadequacies of the current B<X509_STORE>
103functionality.
104
105The lack of single pass processing and need to hold all data in memory as
106mentioned in PKCS7_sign() also applies to PKCS7_verify().
107
108=head1 SEE ALSO
109
110L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_sign(3)|PKCS7_sign(3)>
111
112=head1 HISTORY
113
114PKCS7_verify() was added to OpenSSL 0.9.5
115
116=cut
diff --git a/src/lib/libssl/src/doc/crypto/RAND_bytes.pod b/src/lib/libssl/src/doc/crypto/RAND_bytes.pod
index b6ebd50527..ce6329ce54 100644
--- a/src/lib/libssl/src/doc/crypto/RAND_bytes.pod
+++ b/src/lib/libssl/src/doc/crypto/RAND_bytes.pod
@@ -35,7 +35,8 @@ method.
35 35
36=head1 SEE ALSO 36=head1 SEE ALSO
37 37
38L<rand(3)|rand(3)>, L<err(3)|err(3)>, L<RAND_add(3)|RAND_add(3)> 38L<rand(3)|rand(3)>, L<ERR_get_error(3)|ERR_get_error(3)>,
39L<RAND_add(3)|RAND_add(3)>
39 40
40=head1 HISTORY 41=head1 HISTORY
41 42
diff --git a/src/lib/libssl/src/doc/crypto/RSA_check_key.pod b/src/lib/libssl/src/doc/crypto/RSA_check_key.pod
index 3d824a07f5..a5198f3db5 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_check_key.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_check_key.pod
@@ -58,7 +58,7 @@ provide their own verifiers.
58 58
59=head1 SEE ALSO 59=head1 SEE ALSO
60 60
61L<rsa(3)|rsa(3)>, L<err(3)|err(3)> 61L<rsa(3)|rsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>
62 62
63=head1 HISTORY 63=head1 HISTORY
64 64
diff --git a/src/lib/libssl/src/doc/crypto/RSA_generate_key.pod b/src/lib/libssl/src/doc/crypto/RSA_generate_key.pod
index 8714f7179d..52dbb14a53 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_generate_key.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_generate_key.pod
@@ -59,7 +59,8 @@ RSA_generate_key() goes into an infinite loop for illegal input values.
59 59
60=head1 SEE ALSO 60=head1 SEE ALSO
61 61
62L<err(3)|err(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<RSA_free(3)|RSA_free(3)> 62L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>,
63L<RSA_free(3)|RSA_free(3)>
63 64
64=head1 HISTORY 65=head1 HISTORY
65 66
diff --git a/src/lib/libssl/src/doc/crypto/RSA_new.pod b/src/lib/libssl/src/doc/crypto/RSA_new.pod
index f0d996c40f..3d15b92824 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_new.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_new.pod
@@ -30,7 +30,8 @@ RSA_free() returns no value.
30 30
31=head1 SEE ALSO 31=head1 SEE ALSO
32 32
33L<err(3)|err(3)>, L<rsa(3)|rsa(3)>, L<RSA_generate_key(3)|RSA_generate_key(3)>, 33L<ERR_get_error(3)|ERR_get_error(3)>, L<rsa(3)|rsa(3)>,
34L<RSA_generate_key(3)|RSA_generate_key(3)>,
34L<RSA_new_method(3)|RSA_new_method(3)> 35L<RSA_new_method(3)|RSA_new_method(3)>
35 36
36=head1 HISTORY 37=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/RSA_print.pod b/src/lib/libssl/src/doc/crypto/RSA_print.pod
index 67876facc5..e28d107d1c 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_print.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_print.pod
@@ -2,9 +2,9 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5RSA_print, RSA_print_fp, DHparams_print, DHparams_print_fp, DSA_print, 5RSA_print, RSA_print_fp,
6DSA_print_fp, DHparams_print, DHparams_print_fp - print cryptographic 6DSAparams_print, DSAparams_print_fp, DSA_print, DSA_print_fp,
7parameters 7DHparams_print, DHparams_print_fp - print cryptographic parameters
8 8
9=head1 SYNOPSIS 9=head1 SYNOPSIS
10 10
diff --git a/src/lib/libssl/src/doc/crypto/RSA_private_encrypt.pod b/src/lib/libssl/src/doc/crypto/RSA_private_encrypt.pod
index 6861a98a10..746a80c79e 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_private_encrypt.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_private_encrypt.pod
@@ -59,7 +59,8 @@ obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
59 59
60=head1 SEE ALSO 60=head1 SEE ALSO
61 61
62L<err(3)|err(3)>, L<rsa(3)|rsa(3)>, L<RSA_sign(3)|RSA_sign(3)>, L<RSA_verify(3)|RSA_verify(3)> 62L<ERR_get_error(3)|ERR_get_error(3)>, L<rsa(3)|rsa(3)>,
63L<RSA_sign(3)|RSA_sign(3)>, L<RSA_verify(3)|RSA_verify(3)>
63 64
64=head1 HISTORY 65=head1 HISTORY
65 66
diff --git a/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod b/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod
index e20dfcb551..d53e19d2b7 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod
@@ -72,7 +72,8 @@ SSL, PKCS #1 v2.0
72 72
73=head1 SEE ALSO 73=head1 SEE ALSO
74 74
75L<err(3)|err(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<RSA_size(3)|RSA_size(3)> 75L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>,
76L<RSA_size(3)|RSA_size(3)>
76 77
77=head1 HISTORY 78=head1 HISTORY
78 79
diff --git a/src/lib/libssl/src/doc/crypto/RSA_set_method.pod b/src/lib/libssl/src/doc/crypto/RSA_set_method.pod
index 0687c2242a..0a305f6b14 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_set_method.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_set_method.pod
@@ -3,13 +3,12 @@
3=head1 NAME 3=head1 NAME
4 4
5RSA_set_default_method, RSA_get_default_method, RSA_set_method, 5RSA_set_default_method, RSA_get_default_method, RSA_set_method,
6RSA_get_method, RSA_PKCS1_SSLeay, 6RSA_get_method, RSA_PKCS1_SSLeay, RSA_null_method, RSA_flags,
7RSA_null_method, RSA_flags, RSA_new_method - select RSA method 7RSA_new_method - select RSA method
8 8
9=head1 SYNOPSIS 9=head1 SYNOPSIS
10 10
11 #include <openssl/rsa.h> 11 #include <openssl/rsa.h>
12 #include <openssl/engine.h>
13 12
14 void RSA_set_default_method(const RSA_METHOD *meth); 13 void RSA_set_default_method(const RSA_METHOD *meth);
15 14
@@ -25,7 +24,7 @@ RSA_null_method, RSA_flags, RSA_new_method - select RSA method
25 24
26 int RSA_flags(const RSA *rsa); 25 int RSA_flags(const RSA *rsa);
27 26
28 RSA *RSA_new_method(ENGINE *engine); 27 RSA *RSA_new_method(RSA_METHOD *method);
29 28
30=head1 DESCRIPTION 29=head1 DESCRIPTION
31 30
@@ -70,6 +69,12 @@ B<engine> will be used for the RSA operations. If B<engine> is NULL, the
70default ENGINE for RSA operations is used, and if no default ENGINE is set, 69default ENGINE for RSA operations is used, and if no default ENGINE is set,
71the RSA_METHOD controlled by RSA_set_default_method() is used. 70the RSA_METHOD controlled by RSA_set_default_method() is used.
72 71
72RSA_flags() returns the B<flags> that are set for B<rsa>'s current method.
73
74RSA_new_method() allocates and initializes an B<RSA> structure so that
75B<method> will be used for the RSA operations. If B<method> is B<NULL>,
76the default method is used.
77
73=head1 THE RSA_METHOD STRUCTURE 78=head1 THE RSA_METHOD STRUCTURE
74 79
75 typedef struct rsa_meth_st 80 typedef struct rsa_meth_st
diff --git a/src/lib/libssl/src/doc/crypto/RSA_sign.pod b/src/lib/libssl/src/doc/crypto/RSA_sign.pod
index f0bf6eea1b..71688a665e 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_sign.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_sign.pod
@@ -50,8 +50,8 @@ SSL, PKCS #1 v2.0
50 50
51=head1 SEE ALSO 51=head1 SEE ALSO
52 52
53L<err(3)|err(3)>, L<objects(3)|objects(3)>, L<rsa(3)|rsa(3)>, 53L<ERR_get_error(3)|ERR_get_error(3)>, L<objects(3)|objects(3)>,
54L<RSA_private_encrypt(3)|RSA_private_encrypt(3)>, 54L<rsa(3)|rsa(3)>, L<RSA_private_encrypt(3)|RSA_private_encrypt(3)>,
55L<RSA_public_decrypt(3)|RSA_public_decrypt(3)> 55L<RSA_public_decrypt(3)|RSA_public_decrypt(3)>
56 56
57=head1 HISTORY 57=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod b/src/lib/libssl/src/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod
index df9ceb339a..e70380bbfc 100644
--- a/src/lib/libssl/src/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod
+++ b/src/lib/libssl/src/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod
@@ -47,8 +47,8 @@ These functions serve no recognizable purpose.
47 47
48=head1 SEE ALSO 48=head1 SEE ALSO
49 49
50L<err(3)|err(3)>, L<objects(3)|objects(3)>, L<rand(3)|rand(3)>, 50L<ERR_get_error(3)|ERR_get_error(3)>, L<objects(3)|objects(3)>,
51L<rsa(3)|rsa(3)>, L<RSA_sign(3)|RSA_sign(3)>, 51L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<RSA_sign(3)|RSA_sign(3)>,
52L<RSA_verify(3)|RSA_verify(3)> 52L<RSA_verify(3)|RSA_verify(3)>
53 53
54=head1 HISTORY 54=head1 HISTORY
diff --git a/src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod b/src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod
new file mode 100644
index 0000000000..ffafa37887
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod
@@ -0,0 +1,71 @@
1=pod
2
3=head1 NAME
4
5SMIME_read_PKCS7 - parse S/MIME message.
6
7=head1 SYNOPSIS
8
9PKCS7 *SMIME_read_PKCS7(BIO *in, BIO **bcont);
10
11=head1 DESCRIPTION
12
13SMIME_read_PKCS7() parses a message in S/MIME format.
14
15B<in> is a BIO to read the message from.
16
17If cleartext signing is used then the content is saved in
18a memory bio which is written to B<*bcont>, otherwise
19B<*bcont> is set to B<NULL>.
20
21The parsed PKCS#7 structure is returned or B<NULL> if an
22error occurred.
23
24=head1 NOTES
25
26If B<*bcont> is not B<NULL> then the message is clear text
27signed. B<*bcont> can then be passed to PKCS7_verify() with
28the B<PKCS7_DETACHED> flag set.
29
30Otherwise the type of the returned structure can be determined
31using PKCS7_type().
32
33To support future functionality if B<bcont> is not B<NULL>
34B<*bcont> should be initialized to B<NULL>. For example:
35
36 BIO *cont = NULL;
37 PKCS7 *p7;
38
39 p7 = SMIME_read_PKCS7(in, &cont);
40
41=head1 BUGS
42
43The MIME parser used by SMIME_read_PKCS7() is somewhat primitive.
44While it will handle most S/MIME messages more complex compound
45formats may not work.
46
47The parser assumes that the PKCS7 structure is always base64
48encoded and will not handle the case where it is in binary format
49or uses quoted printable format.
50
51The use of a memory BIO to hold the signed content limits the size
52of message which can be processed due to memory restraints: a
53streaming single pass option should be available.
54
55=head1 RETURN VALUES
56
57SMIME_read_PKCS7() returns a valid B<PKCS7> structure or B<NULL>
58is an error occurred. The error can be obtained from ERR_get_error(3).
59
60=head1 SEE ALSO
61
62L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_type(3)|PKCS7_type(3)>
63L<SMIME_read_PKCS7(3)|SMIME_read_PKCS7(3)>, L<PKCS7_sign(3)|PKCS7_sign(3)>,
64L<PKCS7_verify(3)|PKCS7_verify(3)>, L<PKCS7_encrypt(3)|PKCS7_encrypt(3)>
65L<PKCS7_decrypt(3)|PKCS7_decrypt(3)>
66
67=head1 HISTORY
68
69SMIME_read_PKCS7() was added to OpenSSL 0.9.5
70
71=cut
diff --git a/src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod b/src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod
new file mode 100644
index 0000000000..2cfad2e049
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod
@@ -0,0 +1,59 @@
1=pod
2
3=head1 NAME
4
5SMIME_write_PKCS7 - convert PKCS#7 structure to S/MIME format.
6
7=head1 SYNOPSIS
8
9int SMIME_write_PKCS7(BIO *out, PKCS7 *p7, BIO *data, int flags);
10
11=head1 DESCRIPTION
12
13SMIME_write_PKCS7() adds the appropriate MIME headers to a PKCS#7
14structure to produce an S/MIME message.
15
16B<out> is the BIO to write the data to. B<p7> is the appropriate
17B<PKCS7> structure. If cleartext signing (B<multipart/signed>) is
18being used then the signed data must be supplied in the B<data>
19argument. B<flags> is an optional set of flags.
20
21=head1 NOTES
22
23The following flags can be passed in the B<flags> parameter.
24
25If B<PKCS7_DETACHED> is set then cleartext signing will be used,
26this option only makes sense for signedData where B<PKCS7_DETACHED>
27is also set when PKCS7_sign() is also called.
28
29If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain>
30are added to the content, this only makes sense if B<PKCS7_DETACHED>
31is also set.
32
33If cleartext signing is being used then the data must be read twice:
34once to compute the signature in PKCS7_sign() and once to output the
35S/MIME message.
36
37=head1 BUGS
38
39SMIME_write_PKCS7() always base64 encodes PKCS#7 structures, there
40should be an option to disable this.
41
42There should really be a way to produce cleartext signing using only
43a single pass of the data.
44
45=head1 RETURN VALUES
46
47SMIME_write_PKCS7() returns 1 for success or 0 for failure.
48
49=head1 SEE ALSO
50
51L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_sign(3)|PKCS7_sign(3)>,
52L<PKCS7_verify(3)|PKCS7_verify(3)>, L<PKCS7_encrypt(3)|PKCS7_encrypt(3)>
53L<PKCS7_decrypt(3)|PKCS7_decrypt(3)>
54
55=head1 HISTORY
56
57SMIME_write_PKCS7() was added to OpenSSL 0.9.5
58
59=cut
diff --git a/src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod b/src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod
new file mode 100644
index 0000000000..d287c18564
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod
@@ -0,0 +1,72 @@
1=pod
2
3=head1 NAME
4
5X509_NAME_ENTRY_get_object, X509_NAME_ENTRY_get_data,
6X509_NAME_ENTRY_set_object, X509_NAME_ENTRY_set_data,
7X509_NAME_ENTRY_create_by_txt, X509_NAME_ENTRY_create_by_NID,
8X509_NAME_ENTRY_create_by_OBJ - X509_NAME_ENTRY utility functions
9
10=head1 SYNOPSIS
11
12ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
13ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
14
15int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
16int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, unsigned char *bytes, int len);
17
18X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, char *field, int type, unsigned char *bytes, int len);
19X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,unsigned char *bytes, int len);
20X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type,unsigned char *bytes, int len);
21
22=head1 DESCRIPTION
23
24X509_NAME_ENTRY_get_object() retrieves the field name of B<ne> in
25and B<ASN1_OBJECT> structure.
26
27X509_NAME_ENTRY_get_data() retrieves the field value of B<ne> in
28and B<ASN1_STRING> structure.
29
30X509_NAME_ENTRY_set_object() sets the field name of B<ne> to B<obj>.
31
32X509_NAME_ENTRY_set_data() sets the field value of B<ne> to string type
33B<type> and value determined by B<bytes> and B<len>.
34
35X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID()
36and X509_NAME_ENTRY_create_by_OBJ() create and return an
37B<X509_NAME_ENTRY> structure.
38
39=head1 NOTES
40
41X509_NAME_ENTRY_get_object() and X509_NAME_ENTRY_get_data() can be
42used to examine an B<X509_NAME_ENTRY> function as returned by
43X509_NAME_get_entry() for example.
44
45X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID(),
46and X509_NAME_ENTRY_create_by_OBJ() create and return an
47
48X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_OBJ(),
49X509_NAME_ENTRY_create_by_NID() and X509_NAME_ENTRY_set_data()
50are seldom used in practice because B<X509_NAME_ENTRY> structures
51are almost always part of B<X509_NAME> structures and the
52corresponding B<X509_NAME> functions are typically used to
53create and add new entries in a single operation.
54
55The arguments of these functions support similar options to the similarly
56named ones of the corresponding B<X509_NAME> functions such as
57X509_NAME_add_entry_by_txt(). So for example B<type> can be set to
58B<MBSTRING_ASC> but in the case of X509_set_data() the field name must be
59set first so the relevant field information can be looked up internally.
60
61=head1 RETURN VALUES
62
63=head1 SEE ALSO
64
65L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509_NAME(3)|d2i_X509_NAME(3)>,
66L<OBJ_nid2obj(3),OBJ_nid2obj(3)>
67
68=head1 HISTORY
69
70TBA
71
72=cut
diff --git a/src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod b/src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod
new file mode 100644
index 0000000000..4472a1c5cf
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod
@@ -0,0 +1,110 @@
1=pod
2
3=head1 NAME
4
5X509_NAME_add_entry_by_txt, X509_NAME_add_entry_by_OBJ, X509_NAME_add_entry_by_NID,
6X509_NAME_add_entry, X509_NAME_delete_entry - X509_NAME modification functions
7
8=head1 SYNOPSIS
9
10int X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, int type, unsigned char *bytes, int len, int loc, int set);
11int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, unsigned char *bytes, int len, int loc, int set);
12int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, unsigned char *bytes, int len, int loc, int set);
13int X509_NAME_add_entry(X509_NAME *name,X509_NAME_ENTRY *ne, int loc, int set);
14X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
15
16=head1 DESCRIPTION
17
18X509_NAME_add_entry_by_txt(), X509_NAME_add_entry_by_OBJ() and
19X509_NAME_add_entry_by_NID() add a field whose name is defined
20by a string B<field>, an object B<obj> or a NID B<nid> respectively.
21The field value to be added is in B<bytes> of length B<len>. If
22B<len> is -1 then the field length is calculated internally using
23strlen(bytes).
24
25The type of field is determined by B<type> which can either be a
26definition of the type of B<bytes> (such as B<MBSTRING_ASC>) or a
27standard ASN1 type (such as B<V_ASN1_IA5STRING>). The new entry is
28added to a position determined by B<loc> and B<set>.
29
30X509_NAME_add_entry() adds a copy of B<X509_NAME_ENTRY> structure B<ne>
31to B<name>. The new entry is added to a position determined by B<loc>
32and B<set>. Since a copy of B<ne> is added B<ne> must be freed up after
33the call.
34
35X509_NAME_delete_entry() deletes an entry from B<name> at position
36B<loc>. The deleted entry is returned and must be freed up.
37
38=head1 NOTES
39
40The use of string types such as B<MBSTRING_ASC> or B<MBSTRING_UTF8>
41is strongly recommened for the B<type> parameter. This allows the
42internal code to correctly determine the type of the field and to
43apply length checks according to the relevant standards. This is
44done using ASN1_STRING_set_by_NID().
45
46If instead an ASN1 type is used no checks are performed and the
47supplied data in B<bytes> is used directly.
48
49In X509_NAME_add_entry_by_txt() the B<field> string represents
50the field name using OBJ_txt2obj(field, 0).
51
52The B<loc> and B<set> parameters determine where a new entry should
53be added. For almost all applications B<loc> can be set to -1 and B<set>
54to 0. This adds a new entry to the end of B<name> as a single valued
55RelativeDistinguishedName (RDN).
56
57B<loc> actually determines the index where the new entry is inserted:
58if it is -1 it is appended.
59
60B<set> determines how the new type is added. If it is zero a
61new RDN is created.
62
63If B<set> is -1 or 1 it is added to the previous or next RDN
64structure respectively. This will then be a multivalued RDN:
65since multivalues RDNs are very seldom used B<set> is almost
66always set to zero.
67
68=head1 EXAMPLES
69
70Create an B<X509_NAME> structure:
71
72"C=UK, O=Disorganized Organization, CN=Joe Bloggs"
73
74 X509_NAME *nm;
75 nm = X509_NAME_new();
76 if (nm == NULL)
77 /* Some error */
78 if (!X509_NAME_add_entry_by_txt(nm, MBSTRING_ASC,
79 "C", "UK", -1, -1, 0))
80 /* Error */
81 if (!X509_NAME_add_entry_by_txt(nm, MBSTRING_ASC,
82 "O", "Disorganized Organization", -1, -1, 0))
83 /* Error */
84 if (!X509_NAME_add_entry_by_txt(nm, MBSTRING_ASC,
85 "CN", "Joe Bloggs", -1, -1, 0))
86 /* Error */
87
88=head1 RETURN VALUES
89
90X509_NAME_add_entry_by_txt(), X509_NAME_add_entry_by_OBJ(),
91X509_NAME_add_entry_by_NID() and X509_NAME_add_entry() return 1 for
92success of 0 if an error occurred.
93
94X509_NAME_delete_entry() returns either the deleted B<X509_NAME_ENTRY>
95structure of B<NULL> if an error occurred.
96
97=head1 BUGS
98
99B<type> can still be set to B<V_ASN1_APP_CHOOSE> to use a
100different algorithm to determine field types. Since this form does
101not understand multicharacter types, performs no length checks and
102can result in invalid field types its use is strongly discouraged.
103
104=head1 SEE ALSO
105
106L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509_NAME(3)|d2i_X509_NAME(3)>
107
108=head1 HISTORY
109
110=cut
diff --git a/src/lib/libssl/src/doc/crypto/X509_NAME_get_index_by_NID.pod b/src/lib/libssl/src/doc/crypto/X509_NAME_get_index_by_NID.pod
new file mode 100644
index 0000000000..333323d734
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/X509_NAME_get_index_by_NID.pod
@@ -0,0 +1,106 @@
1=pod
2
3=head1 NAME
4
5X509_NAME_get_index_by_NID, X509_NAME_get_index_by_OBJ, X509_NAME_get_entry,
6X509_NAME_entry_count, X509_NAME_get_text_by_NID, X509_NAME_get_text_by_OBJ -
7X509_NAME lookup and enumeration functions
8
9=head1 SYNOPSIS
10
11int X509_NAME_get_index_by_NID(X509_NAME *name,int nid,int lastpos);
12int X509_NAME_get_index_by_OBJ(X509_NAME *name,ASN1_OBJECT *obj, int lastpos);
13
14int X509_NAME_entry_count(X509_NAME *name);
15X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
16
17int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf,int len);
18int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf,int len);
19
20=head1 DESCRIPTION
21
22These functions allow an B<X509_NAME> structure to be examined. The
23B<X509_NAME> structure is the same as the B<Name> type defined in
24RFC2459 (and elsewhere) and used for example in certificate subject
25and issuer names.
26
27X509_NAME_get_index_by_NID() and X509_NAME_get_index_by_OBJ() retrieve
28the next index matching B<nid> or B<obj> after B<lastpos>. B<lastpos>
29should initially be set to -1. If there are no more entries -1 is returned.
30
31X509_NAME_entry_count() returns the total number of entries in B<name>.
32
33X509_NAME_get_entry() retrieves the B<X509_NAME_ENTRY> from B<name>
34corresponding to index B<loc>. Acceptable values for B<loc> run from
350 to (X509_NAME_entry_count(name) - 1). The value returned is an
36internal pointer which must not be freed.
37
38X509_NAME_get_text_by_NID(), X509_NAME_get_text_by_OBJ() retrieve
39the "text" from the first entry in B<name> which matches B<nid> or
40B<obj>, if no such entry exists -1 is returned. At most B<len> bytes
41will be written and the text written to B<buf> will be null
42terminated. The length of the output string written is returned
43excluding the terminating null. If B<buf> is <NULL> then the amount
44of space needed in B<buf> (excluding the final null) is returned.
45
46=head1 NOTES
47
48X509_NAME_get_text_by_NID() and X509_NAME_get_text_by_OBJ() are
49legacy functions which have various limitations which make them
50of minimal use in practice. They can only find the first matching
51entry and will copy the contents of the field verbatim: this can
52be highly confusing if the target is a muticharacter string type
53like a BMPString or a UTF8String.
54
55For a more general solution X509_NAME_get_index_by_NID() or
56X509_NAME_get_index_by_OBJ() should be used followed by
57X509_NAME_get_entry() on any matching indices and then the
58various B<X509_NAME_ENTRY> utility functions on the result.
59
60=head1 EXAMPLES
61
62Process all entries:
63
64 int i;
65 X509_NAME_ENTRY *e;
66
67 for (i = 0; i < X509_NAME_entry_count(nm); i++)
68 {
69 e = X509_NAME_get_entry(nm, i);
70 /* Do something with e */
71 }
72
73Process all commonName entries:
74
75 int loc;
76 X509_NAME_ENTRY *e;
77
78 loc = -1;
79 for (;;)
80 {
81 lastpos = X509_NAME_get_index_by_NID(nm, NID_commonName, lastpos);
82 if (lastpos == -1)
83 break;
84 e = X509_NAME_get_entry(nm, lastpos);
85 /* Do something with e */
86 }
87
88=head1 RETURN VALUES
89
90X509_NAME_get_index_by_NID() and X509_NAME_get_index_by_OBJ()
91return the index of the next matching entry or -1 if not found.
92
93X509_NAME_entry_count() returns the total number of entries.
94
95X509_NAME_get_entry() returns an B<X509_NAME> pointer to the
96requested entry or B<NULL> if the index is invalid.
97
98=head1 SEE ALSO
99
100L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509_NAME(3)|d2i_X509_NAME(3)>
101
102=head1 HISTORY
103
104TBA
105
106=cut
diff --git a/src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod b/src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod
new file mode 100644
index 0000000000..907c04f684
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod
@@ -0,0 +1,105 @@
1=pod
2
3=head1 NAME
4
5X509_NAME_print_ex, X509_NAME_print_ex_fp, X509_NAME_print,
6X509_NAME_oneline - X509_NAME printing routines.
7
8=head1 SYNOPSIS
9
10 #include <openssl/x509.h>
11
12 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags);
13 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags);
14 char * X509_NAME_oneline(X509_NAME *a,char *buf,int size);
15 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
16
17=head1 DESCRIPTION
18
19X509_NAME_print_ex() prints a human readable version of B<nm> to BIO B<out>. Each
20line (for multiline formats) is indented by B<indent> spaces. The output format
21can be extensively customised by use of the B<flags> parameter.
22
23X509_NAME_print_ex_fp() is identical to X509_NAME_print_ex() except the output is
24written to FILE pointer B<fp>.
25
26X509_NAME_oneline() prints an ASCII version of B<a> to B<buf>. At most B<size>
27bytes will be written. If B<buf> is B<NULL> then a buffer is dynamically allocated
28and returned, otherwise B<buf> is returned.
29
30X509_NAME_print() prints out B<name> to B<bp> indenting each line by B<obase>
31characters. Multiple lines are used if the output (including indent) exceeds
3280 characters.
33
34=head1 NOTES
35
36The functions X509_NAME_oneline() and X509_NAME_print() are legacy functions which
37produce a non standard output form, they don't handle multi character fields and
38have various quirks and inconsistencies. Their use is strongly discouraged in new
39applications.
40
41Although there are a large number of possible flags for most purposes
42B<XN_FLAG_ONELINE>, B<XN_FLAG_MULTILINE> or B<XN_FLAG_RFC2253> will suffice.
43As noted on the L<ASN1_STRING_print_ex(3)|ASN1_STRING_print_ex(3)> manual page
44for UTF8 terminals the B<ASN1_STRFLAGS_ESC_MSB> should be unset: so for example
45B<XN_FLAG_ONELINE & ~ASN1_STRFLAGS_ESC_MSB> would be used.
46
47The complete set of the flags supported by X509_NAME_print_ex() is listed below.
48
49Several options can be ored together.
50
51The options B<XN_FLAG_SEP_COMMA_PLUS>, B<XN_FLAG_SEP_CPLUS_SPC>,
52B<XN_FLAG_SEP_SPLUS_SPC> and B<XN_FLAG_SEP_MULTILINE> determine the field separators
53to use. Two distinct separators are used between distinct RelativeDistinguishedName
54components and separate values in the same RDN for a multi-valued RDN. Multi-valued
55RDNs are currently very rare so the second separator will hardly ever be used.
56
57B<XN_FLAG_SEP_COMMA_PLUS> uses comma and plus as separators. B<XN_FLAG_SEP_CPLUS_SPC>
58uses comma and plus with spaces: this is more readable that plain comma and plus.
59B<XN_FLAG_SEP_SPLUS_SPC> uses spaced semicolon and plus. B<XN_FLAG_SEP_MULTILINE> uses
60spaced newline and plus respectively.
61
62If B<XN_FLAG_DN_REV> is set the whole DN is printed in reversed order.
63
64The fields B<XN_FLAG_FN_SN>, B<XN_FLAG_FN_LN>, B<XN_FLAG_FN_OID>,
65B<XN_FLAG_FN_NONE> determine how a field name is displayed. It will
66use the short name (e.g. CN) the long name (e.g. commonName) always
67use OID numerical form (normally OIDs are only used if the field name is not
68recognised) and no field name respectively.
69
70If B<XN_FLAG_SPC_EQ> is set then spaces will be placed around the '=' character
71separating field names and values.
72
73If B<XN_FLAG_DUMP_UNKNOWN_FIELDS> is set then the encoding of unknown fields is
74printed instead of the values.
75
76If B<XN_FLAG_FN_ALIGN> is set then field names are padded to 20 characters: this
77is only of use for multiline format.
78
79Additionally all the options supported by ASN1_STRING_print_ex() can be used to
80control how each field value is displayed.
81
82In addition a number options can be set for commonly used formats.
83
84B<XN_FLAG_RFC2253> sets options which produce an output compatible with RFC2253 it
85is equivalent to:
86 B<ASN1_STRFLGS_RFC2253 | XN_FLAG_SEP_COMMA_PLUS | XN_FLAG_DN_REV | XN_FLAG_FN_SN | XN_FLAG_DUMP_UNKNOWN_FIELDS>
87
88
89B<XN_FLAG_ONELINE> is a more readable one line format it is the same as:
90 B<ASN1_STRFLGS_RFC2253 | ASN1_STRFLGS_ESC_QUOTE | XN_FLAG_SEP_CPLUS_SPC | XN_FLAG_SPC_EQ | XN_FLAG_FN_SN>
91
92B<XN_FLAG_MULTILINE> is a multiline format is is the same as:
93 B<ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | XN_FLAG_SEP_MULTILINE | XN_FLAG_SPC_EQ | XN_FLAG_FN_LN | XN_FLAG_FN_ALIGN>
94
95B<XN_FLAG_COMPAT> uses a format identical to X509_NAME_print(): in fact it calls X509_NAME_print() internally.
96
97=head1 SEE ALSO
98
99L<ASN1_STRING_print_ex(3)|ASN1_STRING_print_ex(3)>
100
101=head1 HISTORY
102
103TBA
104
105=cut
diff --git a/src/lib/libssl/src/doc/crypto/X509_new.pod b/src/lib/libssl/src/doc/crypto/X509_new.pod
new file mode 100644
index 0000000000..fd5fc65ce1
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/X509_new.pod
@@ -0,0 +1,37 @@
1=pod
2
3=head1 NAME
4
5X509_new, X509_free - X509 certificate ASN1 allocation functions
6
7=head1 SYNOPSIS
8
9 X509 *X509_new(void);
10 void X509_free(X509 *a);
11
12=head1 DESCRIPTION
13
14The X509 ASN1 allocation routines, allocate and free an
15X509 structure, which represents an X509 certificate.
16
17X509_new() allocates and initializes a X509 structure.
18
19X509_free() frees up the B<X509> structure B<a>.
20
21=head1 RETURN VALUES
22
23If the allocation fails, X509_new() returns B<NULL> and sets an error
24code that can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
25Otherwise it returns a pointer to the newly allocated structure.
26
27X509_free() returns no value.
28
29=head1 SEE ALSO
30
31L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509(3)|d2i_X509(3)>
32
33=head1 HISTORY
34
35X509_new() and X509_free() are available in all versions of SSLeay and OpenSSL.
36
37=cut
diff --git a/src/lib/libssl/src/doc/crypto/crypto.pod b/src/lib/libssl/src/doc/crypto/crypto.pod
index c12eec1409..7a527992bb 100644
--- a/src/lib/libssl/src/doc/crypto/crypto.pod
+++ b/src/lib/libssl/src/doc/crypto/crypto.pod
@@ -62,6 +62,22 @@ L<txt_db(3)|txt_db(3)>
62 62
63=back 63=back
64 64
65=head1 NOTES
66
67Some of the newer functions follow a naming convention using the numbers
68B<0> and B<1>. For example the functions:
69
70 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
71 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
72
73The B<0> version uses the supplied structure pointer directly
74in the parent and it will be freed up when the parent is freed.
75In the above example B<crl> would be freed but B<rev> would not.
76
77The B<1> function uses a copy of the supplied structure pointer
78(or in some cases increases its link count) in the parent and
79so both (B<x> and B<obj> above) should be freed up.
80
65=head1 SEE ALSO 81=head1 SEE ALSO
66 82
67L<openssl(1)|openssl(1)>, L<ssl(3)|ssl(3)> 83L<openssl(1)|openssl(1)>, L<ssl(3)|ssl(3)>
diff --git a/src/lib/libssl/src/doc/crypto/d2i_ASN1_OBJECT.pod b/src/lib/libssl/src/doc/crypto/d2i_ASN1_OBJECT.pod
new file mode 100644
index 0000000000..45bb18492c
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_ASN1_OBJECT.pod
@@ -0,0 +1,29 @@
1=pod
2
3=head1 NAME
4
5d2i_ASN1_OBJECT, i2d_ASN1_OBJECT - ASN1 OBJECT IDENTIFIER functions
6
7=head1 SYNOPSIS
8
9 #include <openssl/objects.h>
10
11 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp, long length);
12 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
13
14=head1 DESCRIPTION
15
16These functions decode and encode an ASN1 OBJECT IDENTIFIER.
17
18Othewise these behave in a similar way to d2i_X509() and i2d_X509()
19described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
20
21=head1 SEE ALSO
22
23L<d2i_X509(3)|d2i_X509(3)>
24
25=head1 HISTORY
26
27TBA
28
29=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_DHparams.pod b/src/lib/libssl/src/doc/crypto/d2i_DHparams.pod
index a6d1743d39..1e98aebeca 100644
--- a/src/lib/libssl/src/doc/crypto/d2i_DHparams.pod
+++ b/src/lib/libssl/src/doc/crypto/d2i_DHparams.pod
@@ -2,7 +2,7 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5d2i_DHparams, i2d_DHparams - ... 5d2i_DHparams, i2d_DHparams - PKCS#3 DH parameter functions.
6 6
7=head1 SYNOPSIS 7=head1 SYNOPSIS
8 8
@@ -13,18 +13,18 @@ d2i_DHparams, i2d_DHparams - ...
13 13
14=head1 DESCRIPTION 14=head1 DESCRIPTION
15 15
16... 16These functions decode and encode PKCS#3 DH parameters using the
17DHparameter structure described in PKCS#3.
17 18
18=head1 RETURN VALUES 19Othewise these behave in a similar way to d2i_X509() and i2d_X509()
19 20described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
20...
21 21
22=head1 SEE ALSO 22=head1 SEE ALSO
23 23
24... 24L<d2i_X509(3)|d2i_X509(3)>
25 25
26=head1 HISTORY 26=head1 HISTORY
27 27
28... 28TBA
29 29
30=cut 30=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_DSAPublicKey.pod b/src/lib/libssl/src/doc/crypto/d2i_DSAPublicKey.pod
new file mode 100644
index 0000000000..6ebd30427b
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_DSAPublicKey.pod
@@ -0,0 +1,82 @@
1=pod
2
3=head1 NAME
4
5d2i_DSAPublicKey, i2d_DSAPublicKey, d2i_DSAPrivateKey, i2d_DSAPrivateKey,
6d2i_DSA_PUBKEY, i2d_DSA_PUBKEY, d2i_DSA_SIG, i2d_DSA_SIG - DSA key encoding
7and parsing functions.
8
9=head1 SYNOPSIS
10
11 #include <openssl/dsa.h>
12
13 DSA * d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
14
15 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
16
17 DSA * d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
18
19 int i2d_DSA_PUBKEY(const DSA *a, unsigned char **pp);
20
21 DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
22
23 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
24
25 DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
26
27 int i2d_DSAparams(const DSA *a, unsigned char **pp);
28
29 DSA * d2i_DSA_SIG(DSA_SIG **a, const unsigned char **pp, long length);
30
31 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
32
33=head1 DESCRIPTION
34
35d2i_DSAPublicKey() and i2d_DSAPublicKey() decode and encode the DSA public key
36components structure.
37
38d2i_DSA_PUKEY() and i2d_DSA_PUKEY() decode and encode an DSA public key using a
39SubjectPublicKeyInfo (certificate public key) structure.
40
41d2i_DSAPrivateKey(), i2d_DSAPrivateKey() decode and encode the DSA private key
42components.
43
44d2i_DSAparams(), i2d_DSAparams() decode and encode the DSA parameters using
45a B<Dss-Parms> structure as defined in RFC2459.
46
47d2i_DSA_SIG(), i2d_DSA_SIG() decode and encode a DSA signature using a
48B<Dss-Sig-Value> structure as defined in RFC2459.
49
50The usage of all of these functions is similar to the d2i_X509() and
51i2d_X509() described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
52
53=head1 NOTES
54
55The B<DSA> structure passed to the private key encoding functions should have
56all the private key components present.
57
58The data encoded by the private key functions is unencrypted and therefore
59offers no private key security.
60
61The B<DSA_PUBKEY> functions should be used in preference to the B<DSAPublicKey>
62functions when encoding public keys because they use a standard format.
63
64The B<DSAPublicKey> functions use an non standard format the actual data encoded
65depends on the value of the B<write_params> field of the B<a> key parameter.
66If B<write_params> is zero then only the B<pub_key> field is encoded as an
67B<INTEGER>. If B<write_params> is 1 then a B<SEQUENCE> consisting of the
68B<p>, B<q>, B<g> and B<pub_key> respectively fields are encoded.
69
70The B<DSAPrivateKey> functions also use a non standard structure consiting
71consisting of a SEQUENCE containing the B<p>, B<q>, B<g> and B<pub_key> and
72B<priv_key> fields respectively.
73
74=head1 SEE ALSO
75
76L<d2i_X509(3)|d2i_X509(3)>
77
78=head1 HISTORY
79
80TBA
81
82=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_PKCS8PrivateKey.pod b/src/lib/libssl/src/doc/crypto/d2i_PKCS8PrivateKey.pod
new file mode 100644
index 0000000000..a54b779088
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_PKCS8PrivateKey.pod
@@ -0,0 +1,56 @@
1=pod
2
3=head1 NAME
4
5d2i_PKCS8PrivateKey_bio, d2i_PKCS8PrivateKey_fp,
6i2d_PKCS8PrivateKey_bio, i2d_PKCS8PrivateKey_fp,
7i2d_PKCS8PrivateKey_nid_bio, i2d_PKCS8PrivateKey_nid_fp - PKCS#8 format private key functions
8
9=head1 SYNOPSIS
10
11 #include <openssl/evp.h>
12
13 EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u);
14 EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u);
15
16 int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
17 char *kstr, int klen,
18 pem_password_cb *cb, void *u);
19
20 int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
21 char *kstr, int klen,
22 pem_password_cb *cb, void *u);
23
24 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,
25 char *kstr, int klen,
26 pem_password_cb *cb, void *u);
27
28 int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,
29 char *kstr, int klen,
30 pem_password_cb *cb, void *u);
31
32=head1 DESCRIPTION
33
34The PKCS#8 functions encode and decode private keys in PKCS#8 format using both
35PKCS#5 v1.5 and PKCS#5 v2.0 password based encryption algorithms.
36
37Other than the use of DER as opposed to PEM these functions are identical to the
38corresponding B<PEM> function as described in the L<pem(3)|pem(3)> manual page.
39
40=head1 NOTES
41
42Before using these functions L<OpenSSL_add_all_algorithms(3)|OpenSSL_add_all_algorithms(3)>
43should be called to initialize the internal algorithm lookup tables otherwise errors about
44unknown algorithms will occur if an attempt is made to decrypt a private key.
45
46These functions are currently the only way to store encrypted private keys using DER format.
47
48Currently all the functions use BIOs or FILE pointers, there are no functions which
49work directly on memory: this can be readily worked around by converting the buffers
50to memory BIOs, see L<BIO_s_mem(3)|BIO_s_mem(3)> for details.
51
52=head1 SEE ALSO
53
54L<pem(3)|pem(3)>
55
56=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod b/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod
index ff4d0d57db..7c71bcbf3d 100644
--- a/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod
+++ b/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod
@@ -2,7 +2,9 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5d2i_RSAPublicKey, i2d_RSAPublicKey, d2i_RSAPrivateKey, i2d_RSAPrivateKey, i2d_Netscape_RSA, d2i_Netscape_RSA - ... 5d2i_RSAPublicKey, i2d_RSAPublicKey, d2i_RSAPrivateKey, i2d_RSAPrivateKey,
6d2i_RSA_PUBKEY, i2d_RSA_PUBKEY, i2d_Netscape_RSA,
7d2i_Netscape_RSA - RSA public and private key encoding functions.
6 8
7=head1 SYNOPSIS 9=head1 SYNOPSIS
8 10
@@ -12,6 +14,10 @@ d2i_RSAPublicKey, i2d_RSAPublicKey, d2i_RSAPrivateKey, i2d_RSAPrivateKey, i2d_Ne
12 14
13 int i2d_RSAPublicKey(RSA *a, unsigned char **pp); 15 int i2d_RSAPublicKey(RSA *a, unsigned char **pp);
14 16
17 RSA * d2i_RSA_PUBKEY(RSA **a, unsigned char **pp, long length);
18
19 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
20
15 RSA * d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length); 21 RSA * d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length);
16 22
17 int i2d_RSAPrivateKey(RSA *a, unsigned char **pp); 23 int i2d_RSAPrivateKey(RSA *a, unsigned char **pp);
@@ -22,18 +28,39 @@ d2i_RSAPublicKey, i2d_RSAPublicKey, d2i_RSAPrivateKey, i2d_RSAPrivateKey, i2d_Ne
22 28
23=head1 DESCRIPTION 29=head1 DESCRIPTION
24 30
25... 31d2i_RSAPublicKey() and i2d_RSAPublicKey() decode and encode a PKCS#1 RSAPublicKey
32structure.
33
34d2i_RSA_PUKEY() and i2d_RSA_PUKEY() decode and encode an RSA public key using a
35SubjectPublicKeyInfo (certificate public key) structure.
36
37d2i_RSAPrivateKey(), i2d_RSAPrivateKey() decode and encode a PKCS#1 RSAPrivateKey
38structure.
39
40d2i_Netscape_RSA(), i2d_Netscape_RSA() decode and encode an RSA private key in
41NET format.
42
43The usage of all of these functions is similar to the d2i_X509() and
44i2d_X509() described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
45
46=head1 NOTES
47
48The B<RSA> structure passed to the private key encoding functions should have
49all the PKCS#1 private key components present.
26 50
27=head1 RETURN VALUES 51The data encoded by the private key functions is unencrypted and therefore
52offers no private key security.
28 53
29... 54The NET format functions are present to provide compatibility with certain very
55old software. This format has some severe security weaknesses and should be
56avoided if possible.
30 57
31=head1 SEE ALSO 58=head1 SEE ALSO
32 59
33... 60L<d2i_X509(3)|d2i_X509(3)>
34 61
35=head1 HISTORY 62=head1 HISTORY
36 63
37... 64TBA
38 65
39=cut 66=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509.pod b/src/lib/libssl/src/doc/crypto/d2i_X509.pod
new file mode 100644
index 0000000000..5e3c3d0985
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_X509.pod
@@ -0,0 +1,231 @@
1=pod
2
3=head1 NAME
4
5d2i_X509, i2d_X509, d2i_X509_bio, d2i_X509_fp, i2d_X509_bio,
6i2d_X509_fp - X509 encode and decode functions
7
8=head1 SYNOPSIS
9
10 #include <openssl/x509.h>
11
12 X509 *d2i_X509(X509 **px, unsigned char **in, int len);
13 int i2d_X509(X509 *x, unsigned char **out);
14
15 X509 *d2i_X509_bio(BIO *bp, X509 **x);
16 X509 *d2i_X509_fp(FILE *fp, X509 **x);
17
18 int i2d_X509_bio(X509 *x, BIO *bp);
19 int i2d_X509_fp(X509 *x, FILE *fp);
20
21=head1 DESCRIPTION
22
23The X509 encode and decode routines encode and parse an
24B<X509> structure, which represents an X509 certificate.
25
26d2i_X509() attempts to decode B<len> bytes at B<*out>. If
27successful a pointer to the B<X509> structure is returned. If an error
28occurred then B<NULL> is returned. If B<px> is not B<NULL> then the
29returned structure is written to B<*px>. If B<*px> is not B<NULL>
30then it is assumed that B<*px> contains a valid B<X509>
31structure and an attempt is made to reuse it. If the call is
32successful B<*out> is incremented to the byte following the
33parsed data.
34
35i2d_X509() encodes the structure pointed to by B<x> into DER format.
36If B<out> is not B<NULL> is writes the DER encoded data to the buffer
37at B<*out>, and increments it to point after the data just written.
38If the return value is negative an error occurred, otherwise it
39returns the length of the encoded data.
40
41For OpenSSL 0.9.7 and later if B<*out> is B<NULL> memory will be
42allocated for a buffer and the encoded data written to it. In this
43case B<*out> is not incremented and it points to the start of the
44data just written.
45
46d2i_X509_bio() is similar to d2i_X509() except it attempts
47to parse data from BIO B<bp>.
48
49d2i_X509_fp() is similar to d2i_X509() except it attempts
50to parse data from FILE pointer B<fp>.
51
52i2d_X509_bio() is similar to i2d_X509() except it writes
53the encoding of the structure B<x> to BIO B<bp> and it
54returns 1 for success and 0 for failure.
55
56i2d_X509_fp() is similar to i2d_X509() except it writes
57the encoding of the structure B<x> to BIO B<bp> and it
58returns 1 for success and 0 for failure.
59
60=head1 NOTES
61
62The letters B<i> and B<d> in for example B<i2d_X509> stand for
63"internal" (that is an internal C structure) and "DER". So that
64B<i2d_X509> converts from internal to DER.
65
66The functions can also understand B<BER> forms.
67
68The actual X509 structure passed to i2d_X509() must be a valid
69populated B<X509> structure it can B<not> simply be fed with an
70empty structure such as that returned by X509_new().
71
72The encoded data is in binary form and may contain embedded zeroes.
73Therefore any FILE pointers or BIOs should be opened in binary mode.
74Functions such as B<strlen()> will B<not> return the correct length
75of the encoded structure.
76
77The ways that B<*in> and B<*out> are incremented after the operation
78can trap the unwary. See the B<WARNINGS> section for some common
79errors.
80
81The reason for the auto increment behaviour is to reflect a typical
82usage of ASN1 functions: after one structure is encoded or decoded
83another will processed after it.
84
85=head1 EXAMPLES
86
87Allocate and encode the DER encoding of an X509 structure:
88
89 int len;
90 unsigned char *buf, *p;
91
92 len = i2d_X509(x, NULL);
93
94 buf = OPENSSL_malloc(len);
95
96 if (buf == NULL)
97 /* error */
98
99 p = buf;
100
101 i2d_X509(x, &p);
102
103If you are using OpenSSL 0.9.7 or later then this can be
104simplified to:
105
106
107 int len;
108 unsigned char *buf;
109
110 buf = NULL;
111
112 len = i2d_X509(x, &buf);
113
114 if (len < 0)
115 /* error */
116
117Attempt to decode a buffer:
118
119 X509 *x;
120
121 unsigned char *buf, *p;
122
123 int len;
124
125 /* Something to setup buf and len */
126
127 p = buf;
128
129 x = d2i_X509(NULL, &p, len);
130
131 if (x == NULL)
132 /* Some error */
133
134Alternative technique:
135
136 X509 *x;
137
138 unsigned char *buf, *p;
139
140 int len;
141
142 /* Something to setup buf and len */
143
144 p = buf;
145
146 x = NULL;
147
148 if(!d2i_X509(&x, &p, len))
149 /* Some error */
150
151
152=head1 WARNINGS
153
154The use of temporary variable is mandatory. A common
155mistake is to attempt to use a buffer directly as follows:
156
157 int len;
158 unsigned char *buf;
159
160 len = i2d_X509(x, NULL);
161
162 buf = OPENSSL_malloc(len);
163
164 if (buf == NULL)
165 /* error */
166
167 i2d_X509(x, &buf);
168
169 /* Other stuff ... */
170
171 OPENSSL_free(buf);
172
173This code will result in B<buf> apparently containing garbage because
174it was incremented after the call to point after the data just written.
175Also B<buf> will no longer contain the pointer allocated by B<OPENSSL_malloc()>
176and the subsequent call to B<OPENSSL_free()> may well crash.
177
178The auto allocation feature (setting buf to NULL) only works on OpenSSL
1790.9.7 and later. Attempts to use it on earlier versions will typically
180cause a segmentation violation.
181
182Another trap to avoid is misuse of the B<xp> argument to B<d2i_X509()>:
183
184 X509 *x;
185
186 if (!d2i_X509(&x, &p, len))
187 /* Some error */
188
189This will probably crash somewhere in B<d2i_X509()>. The reason for this
190is that the variable B<x> is uninitialized and an attempt will be made to
191interpret its (invalid) value as an B<X509> structure, typically causing
192a segmentation violation. If B<x> is set to NULL first then this will not
193happen.
194
195=head1 BUGS
196
197In some versions of OpenSSL the "reuse" behaviour of d2i_X509() when
198B<*px> is valid is broken and some parts of the reused structure may
199persist if they are not present in the new one. As a result the use
200of this "reuse" behaviour is strongly discouraged.
201
202i2d_X509() will not return an error in many versions of OpenSSL,
203if mandatory fields are not initialized due to a programming error
204then the encoded structure may contain invalid data or omit the
205fields entirely and will not be parsed by d2i_X509(). This may be
206fixed in future so code should not assume that i2d_X509() will
207always succeed.
208
209=head1 RETURN VALUES
210
211d2i_X509(), d2i_X509_bio() and d2i_X509_fp() return a valid B<X509> structure
212or B<NULL> if an error occurs. The error code that can be obtained by
213L<ERR_get_error(3)|ERR_get_error(3)>.
214
215i2d_X509(), i2d_X509_bio() and i2d_X509_fp() return a the number of bytes
216successfully encoded or a negative value if an error occurs. The error code
217can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
218
219i2d_X509_bio() and i2d_X509_fp() returns 1 for success and 0 if an error
220occurs The error code can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
221
222=head1 SEE ALSO
223
224L<ERR_get_error(3)|ERR_get_error(3)>
225
226=head1 HISTORY
227
228d2i_X509, i2d_X509, d2i_X509_bio, d2i_X509_fp, i2d_X509_bio and i2d_X509_fp
229are available in all versions of SSLeay and OpenSSL.
230
231=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509_ALGOR.pod b/src/lib/libssl/src/doc/crypto/d2i_X509_ALGOR.pod
new file mode 100644
index 0000000000..9e5cd92ca7
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_X509_ALGOR.pod
@@ -0,0 +1,30 @@
1=pod
2
3=head1 NAME
4
5d2i_X509_ALGOR, i2d_X509_ALGOR - AlgorithmIdentifier functions.
6
7=head1 SYNOPSIS
8
9 #include <openssl/x509.h>
10
11 X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, unsigned char **pp, long length);
12 int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **pp);
13
14=head1 DESCRIPTION
15
16These functions decode and encode an B<X509_ALGOR> structure which is
17equivalent to the B<AlgorithmIdentifier> structure.
18
19Othewise these behave in a similar way to d2i_X509() and i2d_X509()
20described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
21
22=head1 SEE ALSO
23
24L<d2i_X509(3)|d2i_X509(3)>
25
26=head1 HISTORY
27
28TBA
29
30=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod b/src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod
new file mode 100644
index 0000000000..06c5b23c09
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod
@@ -0,0 +1,37 @@
1=pod
2
3=head1 NAME
4
5d2i_X509_CRL, i2d_X509_CRL, d2i_X509_CRL_bio, d2i_509_CRL_fp,
6i2d_X509_CRL_bio, i2d_X509_CRL_fp - PKCS#10 certificate request functions.
7
8=head1 SYNOPSIS
9
10 #include <openssl/x509.h>
11
12 X509_CRL *d2i_X509_CRL(X509_CRL **a, unsigned char **pp, long length);
13 int i2d_X509_CRL(X509_CRL *a, unsigned char **pp);
14
15 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **x);
16 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **x);
17
18 int i2d_X509_CRL_bio(X509_CRL *x, BIO *bp);
19 int i2d_X509_CRL_fp(X509_CRL *x, FILE *fp);
20
21=head1 DESCRIPTION
22
23These functions decode and encode an X509 CRL (certificate revocation
24list).
25
26Othewise the functions behave in a similar way to d2i_X509() and i2d_X509()
27described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
28
29=head1 SEE ALSO
30
31L<d2i_X509(3)|d2i_X509(3)>
32
33=head1 HISTORY
34
35TBA
36
37=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509_NAME.pod b/src/lib/libssl/src/doc/crypto/d2i_X509_NAME.pod
new file mode 100644
index 0000000000..343ffe1519
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_X509_NAME.pod
@@ -0,0 +1,31 @@
1=pod
2
3=head1 NAME
4
5d2i_X509_NAME, i2d_X509_NAME - X509_NAME encoding functions
6
7=head1 SYNOPSIS
8
9 #include <openssl/x509.h>
10
11 X509_NAME *d2i_X509_NAME(X509_NAME **a, unsigned char **pp, long length);
12 int i2d_X509_NAME(X509_NAME *a, unsigned char **pp);
13
14=head1 DESCRIPTION
15
16These functions decode and encode an B<X509_NAME> structure which is the
17the same as the B<Name> type defined in RFC2459 (and elsewhere) and used
18for example in certificate subject and issuer names.
19
20Othewise the functions behave in a similar way to d2i_X509() and i2d_X509()
21described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
22
23=head1 SEE ALSO
24
25L<d2i_X509(3)|d2i_X509(3)>
26
27=head1 HISTORY
28
29TBA
30
31=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod b/src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod
new file mode 100644
index 0000000000..be4ad68257
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod
@@ -0,0 +1,36 @@
1=pod
2
3=head1 NAME
4
5d2i_X509_REQ, i2d_X509_REQ, d2i_X509_REQ_bio, d2i_X509_REQ_fp,
6i2d_X509_REQ_bio, i2d_X509_REQ_fp - PKCS#10 certificate request functions.
7
8=head1 SYNOPSIS
9
10 #include <openssl/x509.h>
11
12 X509_REQ *d2i_X509_REQ(X509_REQ **a, unsigned char **pp, long length);
13 int i2d_X509_REQ(X509_REQ *a, unsigned char **pp);
14
15 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **x);
16 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **x);
17
18 int i2d_X509_REQ_bio(X509_REQ *x, BIO *bp);
19 int i2d_X509_REQ_fp(X509_REQ *x, FILE *fp);
20
21=head1 DESCRIPTION
22
23These functions decode and encode a PKCS#10 certificate request.
24
25Othewise these behave in a similar way to d2i_X509() and i2d_X509()
26described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
27
28=head1 SEE ALSO
29
30L<d2i_X509(3)|d2i_X509(3)>
31
32=head1 HISTORY
33
34TBA
35
36=cut
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509_SIG.pod b/src/lib/libssl/src/doc/crypto/d2i_X509_SIG.pod
new file mode 100644
index 0000000000..e48fd79a51
--- /dev/null
+++ b/src/lib/libssl/src/doc/crypto/d2i_X509_SIG.pod
@@ -0,0 +1,30 @@
1=pod
2
3=head1 NAME
4
5d2i_X509_SIG, i2d_X509_SIG - DigestInfo functions.
6
7=head1 SYNOPSIS
8
9 #include <openssl/x509.h>
10
11 X509_SIG *d2i_X509_SIG(X509_SIG **a, unsigned char **pp, long length);
12 int i2d_X509_SIG(X509_SIG *a, unsigned char **pp);
13
14=head1 DESCRIPTION
15
16These functions decode and encode an X509_SIG structure which is
17equivalent to the B<DigestInfo> structure defined in PKCS#1 and PKCS#7.
18
19Othewise these behave in a similar way to d2i_X509() and i2d_X509()
20described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
21
22=head1 SEE ALSO
23
24L<d2i_X509(3)|d2i_X509(3)>
25
26=head1 HISTORY
27
28TBA
29
30=cut
diff --git a/src/lib/libssl/src/doc/crypto/engine.pod b/src/lib/libssl/src/doc/crypto/engine.pod
index 61e0264bb7..c77dad5562 100644
--- a/src/lib/libssl/src/doc/crypto/engine.pod
+++ b/src/lib/libssl/src/doc/crypto/engine.pod
@@ -187,7 +187,7 @@ tell which one you are dealing with at any given point in time (after all
187they are both simply (ENGINE *) pointers, the difference is in the way they 187they are both simply (ENGINE *) pointers, the difference is in the way they
188are used). 188are used).
189 189
190=head3 Structural references 190I<Structural references>
191 191
192This basic type of reference is typically used for creating new ENGINEs 192This basic type of reference is typically used for creating new ENGINEs
193dynamically, iterating across OpenSSL's internal linked-list of loaded 193dynamically, iterating across OpenSSL's internal linked-list of loaded
@@ -224,7 +224,7 @@ To clarify a particular function's handling of references, one should
224always consult that function's documentation "man" page, or failing that 224always consult that function's documentation "man" page, or failing that
225the openssl/engine.h header file includes some hints. 225the openssl/engine.h header file includes some hints.
226 226
227=head3 Functional references 227I<Functional references>
228 228
229As mentioned, functional references exist when the cryptographic 229As mentioned, functional references exist when the cryptographic
230functionality of an ENGINE is required to be available. A functional 230functionality of an ENGINE is required to be available. A functional
@@ -386,7 +386,7 @@ things, so we will simply illustrate the consequences as they apply to a
386couple of simple cases and leave developers to consider these and the 386couple of simple cases and leave developers to consider these and the
387source code to openssl's builtin utilities as guides. 387source code to openssl's builtin utilities as guides.
388 388
389=head3 Using a specific ENGINE implementation 389I<Using a specific ENGINE implementation>
390 390
391Here we'll assume an application has been configured by its user or admin 391Here we'll assume an application has been configured by its user or admin
392to want to use the "ACME" ENGINE if it is available in the version of 392to want to use the "ACME" ENGINE if it is available in the version of
@@ -418,7 +418,7 @@ illustrates how to approach this;
418 /* Release the structural reference from ENGINE_by_id() */ 418 /* Release the structural reference from ENGINE_by_id() */
419 ENGINE_free(e); 419 ENGINE_free(e);
420 420
421=head3 Automatically using builtin ENGINE implementations 421I<Automatically using builtin ENGINE implementations>
422 422
423Here we'll assume we want to load and register all ENGINE implementations 423Here we'll assume we want to load and register all ENGINE implementations
424bundled with OpenSSL, such that for any cryptographic algorithm required by 424bundled with OpenSSL, such that for any cryptographic algorithm required by
@@ -469,7 +469,7 @@ in same cases both. ENGINE implementations should provide indications of
469this in the descriptions attached to builtin control commands and/or in 469this in the descriptions attached to builtin control commands and/or in
470external product documentation. 470external product documentation.
471 471
472=head3 Issuing control commands to an ENGINE 472I<Issuing control commands to an ENGINE>
473 473
474Let's illustrate by example; a function for which the caller supplies the 474Let's illustrate by example; a function for which the caller supplies the
475name of the ENGINE it wishes to use, a table of string-pairs for use before 475name of the ENGINE it wishes to use, a table of string-pairs for use before
@@ -526,7 +526,7 @@ return success without doing anything. In this case we assume the user is
526only supplying commands specific to the given ENGINE so we set this to 526only supplying commands specific to the given ENGINE so we set this to
527FALSE. 527FALSE.
528 528
529=head3 Discovering supported control commands 529I<Discovering supported control commands>
530 530
531It is possible to discover at run-time the names, numerical-ids, descriptions 531It is possible to discover at run-time the names, numerical-ids, descriptions
532and input parameters of the control commands supported from a structural 532and input parameters of the control commands supported from a structural
diff --git a/src/lib/libssl/src/doc/openssl-shared.txt b/src/lib/libssl/src/doc/openssl-shared.txt
new file mode 100644
index 0000000000..5cf84a054f
--- /dev/null
+++ b/src/lib/libssl/src/doc/openssl-shared.txt
@@ -0,0 +1,32 @@
1The OpenSSL shared libraries are often installed in a directory like
2/usr/local/ssl/lib.
3
4If this directory is not in a standard system path for dynamic/shared
5libraries, then you will have problems linking and executing
6applications that use OpenSSL libraries UNLESS:
7
8* you link with static (archive) libraries. If you are truly
9 paranoid about security, you should use static libraries.
10* you use the GNU libtool code during linking
11 (http://www.gnu.org/software/libtool/libtool.html)
12* you use pkg-config during linking (this requires that
13 PKG_CONFIG_PATH includes the path to the OpenSSL shared
14 library directory), and make use of -R or -rpath.
15 (http://www.freedesktop.org/software/pkgconfig/)
16* you specify the system-wide link path via a command such
17 as crle(1) on Solaris systems.
18* you add the OpenSSL shared library directory to /etc/ld.so.conf
19 and run ldconfig(8) on Linux systems.
20* you define the LD_LIBRARY_PATH, LIBPATH, SHLIB_PATH (HP),
21 DYLD_LIBRARY_PATH (MacOS X) or PATH (Cygwin and DJGPP)
22 environment variable and add the OpenSSL shared library
23 directory to it.
24
25One common tool to check the dynamic dependencies of an executable
26or dynamic library is ldd(1) on most UNIX systems.
27
28See any operating system documentation and manpages about shared
29libraries for your version of UNIX. The following manpages may be
30helpful: ld(1), ld.so(1), ld.so.1(1) [Solaris], dld.sl(1) [HP],
31ldd(1), crle(1) [Solaris], pldd(1) [Solaris], ldconfig(8) [Linux],
32chatr(1) [HP].
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_add_session.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_add_session.pod
index af326c2f73..82676b26b2 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_add_session.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_add_session.pod
@@ -37,6 +37,14 @@ removed and replaced by the new session. If the session is actually
37identical (the SSL_SESSION object is identical), SSL_CTX_add_session() 37identical (the SSL_SESSION object is identical), SSL_CTX_add_session()
38is a no-op, and the return value is 0. 38is a no-op, and the return value is 0.
39 39
40If a server SSL_CTX is configured with the SSL_SESS_CACHE_NO_INTERNAL_STORE
41flag then the internal cache will not be populated automatically by new
42sessions negotiated by the SSL/TLS implementation, even though the internal
43cache will be searched automatically for session-resume requests (the
44latter can be surpressed by SSL_SESS_CACHE_NO_INTERNAL_LOOKUP). So the
45application can use SSL_CTX_add_session() directly to have full control
46over the sessions that can be resumed if desired.
47
40 48
41=head1 RETURN VALUES 49=head1 RETURN VALUES
42 50
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod
index 55e592f5f8..51d8676968 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_free.pod
@@ -20,12 +20,22 @@ It also calls the free()ing procedures for indirectly affected items, if
20applicable: the session cache, the list of ciphers, the list of Client CAs, 20applicable: the session cache, the list of ciphers, the list of Client CAs,
21the certificates and keys. 21the certificates and keys.
22 22
23=head1 WARNINGS
24
25If a session-remove callback is set (SSL_CTX_sess_set_remove_cb()), this
26callback will be called for each session being freed from B<ctx>'s
27session cache. This implies, that all corresponding sessions from an
28external session cache are removed as well. If this is not desired, the user
29should explicitly unset the callback by calling
30SSL_CTX_sess_set_remove_cb(B<ctx>, NULL) prior to calling SSL_CTX_free().
31
23=head1 RETURN VALUES 32=head1 RETURN VALUES
24 33
25SSL_CTX_free() does not provide diagnostic information. 34SSL_CTX_free() does not provide diagnostic information.
26 35
27=head1 SEE ALSO 36=head1 SEE ALSO
28 37
29L<SSL_CTX_new(3)|SSL_CTX_new(3)>, L<ssl(3)|ssl(3)> 38L<SSL_CTX_new(3)|SSL_CTX_new(3)>, L<ssl(3)|ssl(3)>,
39L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>
30 40
31=cut 41=cut
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_sess_set_get_cb.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_sess_set_get_cb.pod
index 7c0b2baf6c..b9d54a40a1 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_sess_set_get_cb.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_sess_set_get_cb.pod
@@ -60,10 +60,11 @@ B<sess>. If the callback returns B<0>, the session will be immediately
60removed again. 60removed again.
61 61
62The remove_session_cb() is called, whenever the SSL engine removes a session 62The remove_session_cb() is called, whenever the SSL engine removes a session
63from the internal cache. This happens if the session is removed because 63from the internal cache. This happens when the session is removed because
64it is expired or when a connection was not shutdown cleanly. The 64it is expired or when a connection was not shutdown cleanly. It also happens
65remove_session_cb() is passed the B<ctx> and the ssl session B<sess>. 65for all sessions in the internal session cache when
66It does not provide any feedback. 66L<SSL_CTX_free(3)|SSL_CTX_free(3)> is called. The remove_session_cb() is passed
67the B<ctx> and the ssl session B<sess>. It does not provide any feedback.
67 68
68The get_session_cb() is only called on SSL/TLS servers with the session id 69The get_session_cb() is only called on SSL/TLS servers with the session id
69proposed by the client. The get_session_cb() is always called, also when 70proposed by the client. The get_session_cb() is always called, also when
@@ -80,6 +81,7 @@ L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>.
80L<ssl(3)|ssl(3)>, L<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)>, 81L<ssl(3)|ssl(3)>, L<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)>,
81L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>, 82L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
82L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>, 83L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>,
83L<SSL_SESSION_free(3)|SSL_SESSION_free(3)> 84L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>,
85L<SSL_CTX_free(3)|SSL_CTX_free(3)>
84 86
85=cut 87=cut
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod
index f5e2ec3555..766f0c9200 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod
@@ -176,7 +176,7 @@ will send his list of preferences to the client and the client chooses.
176=item SSL_OP_NETSCAPE_CA_DN_BUG 176=item SSL_OP_NETSCAPE_CA_DN_BUG
177 177
178If we accept a netscape connection, demand a client cert, have a 178If we accept a netscape connection, demand a client cert, have a
179non-self-sighed CA which does not have it's CA in netscape, and the 179non-self-signed CA which does not have its CA in netscape, and the
180browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta 180browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta
181 181
182=item SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 182=item SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_cache_mode.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_cache_mode.pod
index 9aa6c6b2e3..c5d2f43dff 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_cache_mode.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_cache_mode.pod
@@ -26,12 +26,14 @@ SSL_CTX object is being maintained, the sessions are unique for each SSL_CTX
26object. 26object.
27 27
28In order to reuse a session, a client must send the session's id to the 28In order to reuse a session, a client must send the session's id to the
29server. It can only send exactly one id. The server then decides whether it 29server. It can only send exactly one id. The server then either
30agrees in reusing the session or starts the handshake for a new session. 30agrees to reuse the session or it starts a full handshake (to create a new
31session).
31 32
32A server will lookup up the session in its internal session storage. If 33A server will lookup up the session in its internal session storage. If the
33the session is not found in internal storage or internal storage is 34session is not found in internal storage or lookups for the internal storage
34deactivated, the server will try the external storage if available. 35have been deactivated (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP), the server will try
36the external storage if available.
35 37
36Since a client may try to reuse a session intended for use in a different 38Since a client may try to reuse a session intended for use in a different
37context, the session id context must be set by the server (see 39context, the session id context must be set by the server (see
@@ -57,9 +59,10 @@ function. This option is not activated by default.
57=item SSL_SESS_CACHE_SERVER 59=item SSL_SESS_CACHE_SERVER
58 60
59Server sessions are added to the session cache. When a client proposes a 61Server sessions are added to the session cache. When a client proposes a
60session to be reused, the session is looked up in the internal session cache. 62session to be reused, the server looks for the corresponding session in (first)
61If the session is found, the server will try to reuse the session. 63the internal session cache (unless SSL_SESS_CACHE_NO_INTERNAL_LOOKUP is set),
62This is the default. 64then (second) in the external cache if available. If the session is found, the
65server will try to reuse the session. This is the default.
63 66
64=item SSL_SESS_CACHE_BOTH 67=item SSL_SESS_CACHE_BOTH
65 68
@@ -77,12 +80,32 @@ explicitly by the application.
77 80
78=item SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 81=item SSL_SESS_CACHE_NO_INTERNAL_LOOKUP
79 82
80By setting this flag sessions are cached in the internal storage but 83By setting this flag, session-resume operations in an SSL/TLS server will not
81they are not looked up automatically. If an external session cache 84automatically look up sessions in the internal cache, even if sessions are
82is enabled, sessions are looked up in the external cache. As automatic 85automatically stored there. If external session caching callbacks are in use,
83lookup only applies for SSL/TLS servers, the flag has no effect on 86this flag guarantees that all lookups are directed to the external cache.
87As automatic lookup only applies for SSL/TLS servers, the flag has no effect on
84clients. 88clients.
85 89
90=item SSL_SESS_CACHE_NO_INTERNAL_STORE
91
92Depending on the presence of SSL_SESS_CACHE_CLIENT and/or SSL_SESS_CACHE_SERVER,
93sessions negotiated in an SSL/TLS handshake may be cached for possible reuse.
94Normally a new session is added to the internal cache as well as any external
95session caching (callback) that is configured for the SSL_CTX. This flag will
96prevent sessions being stored in the internal cache (though the application can
97add them manually using L<SSL_CTX_add_session(3)|SSL_CTX_add_session(3)>). Note:
98in any SSL/TLS servers where external caching is configured, any successful
99session lookups in the external cache (ie. for session-resume requests) would
100normally be copied into the local cache before processing continues - this flag
101prevents these additions to the internal cache as well.
102
103=item SSL_SESS_CACHE_NO_INTERNAL
104
105Enable both SSL_SESS_CACHE_NO_INTERNAL_LOOKUP and
106SSL_SESS_CACHE_NO_INTERNAL_STORE at the same time.
107
108
86=back 109=back
87 110
88The default mode is SSL_SESS_CACHE_SERVER. 111The default mode is SSL_SESS_CACHE_SERVER.
@@ -98,6 +121,7 @@ SSL_CTX_get_session_cache_mode() returns the currently set cache mode.
98 121
99L<ssl(3)|ssl(3)>, L<SSL_set_session(3)|SSL_set_session(3)>, 122L<ssl(3)|ssl(3)>, L<SSL_set_session(3)|SSL_set_session(3)>,
100L<SSL_session_reused(3)|SSL_session_reused(3)>, 123L<SSL_session_reused(3)|SSL_session_reused(3)>,
124L<SSL_CTX_add_session(3)|SSL_CTX_add_session(3)>,
101L<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>, 125L<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>,
102L<SSL_CTX_sess_set_cache_size(3)|SSL_CTX_sess_set_cache_size(3)>, 126L<SSL_CTX_sess_set_cache_size(3)|SSL_CTX_sess_set_cache_size(3)>,
103L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>, 127L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>,
@@ -105,4 +129,9 @@ L<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>,
105L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>, 129L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
106L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> 130L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>
107 131
132=head1 HISTORY
133
134SSL_SESS_CACHE_NO_INTERNAL_STORE and SSL_SESS_CACHE_NO_INTERNAL
135were introduced in OpenSSL 0.9.6h.
136
108=cut 137=cut
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod
index 5bb21ca535..d15b2a3a1a 100644
--- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod
+++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_verify.pod
@@ -235,7 +235,7 @@ L<SSL_get_ex_data_X509_STORE_CTX_idx(3)|SSL_get_ex_data_X509_STORE_CTX_idx(3)>).
235 * At this point, err contains the last verification error. We can use 235 * At this point, err contains the last verification error. We can use
236 * it for something special 236 * it for something special
237 */ 237 */
238 if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT) 238 if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT))
239 { 239 {
240 X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256); 240 X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
241 printf("issuer= %s\n", buf); 241 printf("issuer= %s\n", buf);
diff --git a/src/lib/libssl/src/doc/ssl/ssl.pod b/src/lib/libssl/src/doc/ssl/ssl.pod
index 1471e0312e..3dc5358ef6 100644
--- a/src/lib/libssl/src/doc/ssl/ssl.pod
+++ b/src/lib/libssl/src/doc/ssl/ssl.pod
@@ -351,7 +351,7 @@ appropriate size (using ???) and return it.
351 351
352long B<SSL_set_tmp_rsa_callback>(SSL *ssl, RSA *(*cb)(SSL *ssl, int export, int keylength)); 352long B<SSL_set_tmp_rsa_callback>(SSL *ssl, RSA *(*cb)(SSL *ssl, int export, int keylength));
353 353
354The same as L<"SSL_CTX_set_tmp_rsa_callback">, except it operates on an SSL 354The same as B<SSL_CTX_set_tmp_rsa_callback>, except it operates on an SSL
355session instead of a context. 355session instead of a context.
356 356
357=item void B<SSL_CTX_set_verify>(SSL_CTX *ctx, int mode, int (*cb);(void)) 357=item void B<SSL_CTX_set_verify>(SSL_CTX *ctx, int mode, int (*cb);(void))
diff --git a/src/lib/libssl/src/doc/standards.txt b/src/lib/libssl/src/doc/standards.txt
index 596d9001e6..edbe2f3a57 100644
--- a/src/lib/libssl/src/doc/standards.txt
+++ b/src/lib/libssl/src/doc/standards.txt
@@ -42,20 +42,9 @@ whole or at least great parts) in OpenSSL.
422268 A Description of the RC2(r) Encryption Algorithm. R. Rivest. 422268 A Description of the RC2(r) Encryption Algorithm. R. Rivest.
43 January 1998. (Format: TXT=19048 bytes) (Status: INFORMATIONAL) 43 January 1998. (Format: TXT=19048 bytes) (Status: INFORMATIONAL)
44 44
452314 PKCS 10: Certification Request Syntax Version 1.5. B. Kaliski.
46 March 1998. (Format: TXT=15814 bytes) (Status: INFORMATIONAL)
47
482315 PKCS 7: Cryptographic Message Syntax Version 1.5. B. Kaliski. 452315 PKCS 7: Cryptographic Message Syntax Version 1.5. B. Kaliski.
49 March 1998. (Format: TXT=69679 bytes) (Status: INFORMATIONAL) 46 March 1998. (Format: TXT=69679 bytes) (Status: INFORMATIONAL)
50 47
512437 PKCS #1: RSA Cryptography Specifications Version 2.0. B. Kaliski,
52 J. Staddon. October 1998. (Format: TXT=73529 bytes) (Obsoletes
53 RFC2313) (Status: INFORMATIONAL)
54
552459 Internet X.509 Public Key Infrastructure Certificate and CRL
56 Profile. R. Housley, W. Ford, W. Polk, D. Solo. January 1999.
57 (Format: TXT=278438 bytes) (Status: PROPOSED STANDARD)
58
59PKCS#8: Private-Key Information Syntax Standard 48PKCS#8: Private-Key Information Syntax Standard
60 49
61PKCS#12: Personal Information Exchange Syntax Standard, version 1.0. 50PKCS#12: Personal Information Exchange Syntax Standard, version 1.0.
@@ -65,6 +54,40 @@ PKCS#12: Personal Information Exchange Syntax Standard, version 1.0.
65 C. Adams. June 1999. (Format: TXT=43243 bytes) (Status: PROPOSED 54 C. Adams. June 1999. (Format: TXT=43243 bytes) (Status: PROPOSED
66 STANDARD) 55 STANDARD)
67 56
572712 Addition of Kerberos Cipher Suites to Transport Layer Security
58 (TLS). A. Medvinsky, M. Hur. October 1999. (Format: TXT=13763 bytes)
59 (Status: PROPOSED STANDARD)
60
612898 PKCS #5: Password-Based Cryptography Specification Version 2.0.
62 B. Kaliski. September 2000. (Format: TXT=68692 bytes) (Status:
63 INFORMATIONAL)
64
652986 PKCS #10: Certification Request Syntax Specification Version 1.7.
66 M. Nystrom, B. Kaliski. November 2000. (Format: TXT=27794 bytes)
67 (Obsoletes RFC2314) (Status: INFORMATIONAL)
68
693174 US Secure Hash Algorithm 1 (SHA1). D. Eastlake 3rd, P. Jones.
70 September 2001. (Format: TXT=35525 bytes) (Status: INFORMATIONAL)
71
723268 Advanced Encryption Standard (AES) Ciphersuites for Transport
73 Layer Security (TLS). P. Chown. June 2002. (Format: TXT=13530 bytes)
74 (Status: PROPOSED STANDARD)
75
763279 Algorithms and Identifiers for the Internet X.509 Public Key
77 Infrastructure Certificate and Certificate Revocation List (CRL)
78 Profile. L. Bassham, W. Polk, R. Housley. April 2002. (Format:
79 TXT=53833 bytes) (Status: PROPOSED STANDARD)
80
813280 Internet X.509 Public Key Infrastructure Certificate and
82 Certificate Revocation List (CRL) Profile. R. Housley, W. Polk, W.
83 Ford, D. Solo. April 2002. (Format: TXT=295556 bytes) (Obsoletes
84 RFC2459) (Status: PROPOSED STANDARD)
85
863447 Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography
87 Specifications Version 2.1. J. Jonsson, B. Kaliski. February 2003.
88 (Format: TXT=143173 bytes) (Obsoletes RFC2437) (Status:
89 INFORMATIONAL)
90
68 91
69Related: 92Related:
70-------- 93--------
@@ -90,23 +113,60 @@ STARTTLS documents.
90 Certification and Related Services. B. Kaliski. February 1993. 113 Certification and Related Services. B. Kaliski. February 1993.
91 (Format: TXT=17537 bytes) (Status: PROPOSED STANDARD) 114 (Format: TXT=17537 bytes) (Status: PROPOSED STANDARD)
92 115
932256 A Summary of the X.500(96) User Schema for use with LDAPv3. M. 1162025 The Simple Public-Key GSS-API Mechanism (SPKM). C. Adams. October
94 Wahl. December 1997. (Format: TXT=32377 bytes) (Status: PROPOSED 117 1996. (Format: TXT=101692 bytes) (Status: PROPOSED STANDARD)
95 STANDARD) 118
1192510 Internet X.509 Public Key Infrastructure Certificate Management
120 Protocols. C. Adams, S. Farrell. March 1999. (Format: TXT=158178
121 bytes) (Status: PROPOSED STANDARD)
122
1232511 Internet X.509 Certificate Request Message Format. M. Myers, C.
124 Adams, D. Solo, D. Kemp. March 1999. (Format: TXT=48278 bytes)
125 (Status: PROPOSED STANDARD)
126
1272527 Internet X.509 Public Key Infrastructure Certificate Policy and
128 Certification Practices Framework. S. Chokhani, W. Ford. March 1999.
129 (Format: TXT=91860 bytes) (Status: INFORMATIONAL)
96 130
972487 SMTP Service Extension for Secure SMTP over TLS. P. Hoffman. 1312538 Storing Certificates in the Domain Name System (DNS). D. Eastlake
98 January 1999. (Format: TXT=15120 bytes) (Status: PROPOSED STANDARD) 132 3rd, O. Gudmundsson. March 1999. (Format: TXT=19857 bytes) (Status:
133 PROPOSED STANDARD)
134
1352539 Storage of Diffie-Hellman Keys in the Domain Name System (DNS).
136 D. Eastlake 3rd. March 1999. (Format: TXT=21049 bytes) (Status:
137 PROPOSED STANDARD)
138
1392559 Internet X.509 Public Key Infrastructure Operational Protocols -
140 LDAPv2. S. Boeyen, T. Howes, P. Richard. April 1999. (Format:
141 TXT=22889 bytes) (Updates RFC1778) (Status: PROPOSED STANDARD)
99 142
1002585 Internet X.509 Public Key Infrastructure Operational Protocols: 1432585 Internet X.509 Public Key Infrastructure Operational Protocols:
101 FTP and HTTP. R. Housley, P. Hoffman. May 1999. (Format: TXT=14813 144 FTP and HTTP. R. Housley, P. Hoffman. May 1999. (Format: TXT=14813
102 bytes) (Status: PROPOSED STANDARD) 145 bytes) (Status: PROPOSED STANDARD)
103 146
1472587 Internet X.509 Public Key Infrastructure LDAPv2 Schema. S.
148 Boeyen, T. Howes, P. Richard. June 1999. (Format: TXT=15102 bytes)
149 (Status: PROPOSED STANDARD)
150
1042595 Using TLS with IMAP, POP3 and ACAP. C. Newman. June 1999. 1512595 Using TLS with IMAP, POP3 and ACAP. C. Newman. June 1999.
105 (Format: TXT=32440 bytes) (Status: PROPOSED STANDARD) 152 (Format: TXT=32440 bytes) (Status: PROPOSED STANDARD)
106 153
1072712 Addition of Kerberos Cipher Suites to Transport Layer Security 1542631 Diffie-Hellman Key Agreement Method. E. Rescorla. June 1999.
108 (TLS). A. Medvinsky, M. Hur. October 1999. (Format: TXT=13763 bytes) 155 (Format: TXT=25932 bytes) (Status: PROPOSED STANDARD)
109 (Status: PROPOSED STANDARD) 156
1572632 S/MIME Version 3 Certificate Handling. B. Ramsdell, Ed.. June
158 1999. (Format: TXT=27925 bytes) (Status: PROPOSED STANDARD)
159
1602716 PPP EAP TLS Authentication Protocol. B. Aboba, D. Simon. October
161 1999. (Format: TXT=50108 bytes) (Status: EXPERIMENTAL)
162
1632773 Encryption using KEA and SKIPJACK. R. Housley, P. Yee, W. Nace.
164 February 2000. (Format: TXT=20008 bytes) (Updates RFC0959) (Status:
165 EXPERIMENTAL)
166
1672797 Certificate Management Messages over CMS. M. Myers, X. Liu, J.
168 Schaad, J. Weinstein. April 2000. (Format: TXT=103357 bytes) (Status:
169 PROPOSED STANDARD)
110 170
1112817 Upgrading to TLS Within HTTP/1.1. R. Khare, S. Lawrence. May 1712817 Upgrading to TLS Within HTTP/1.1. R. Khare, S. Lawrence. May
112 2000. (Format: TXT=27598 bytes) (Updates RFC2616) (Status: PROPOSED 172 2000. (Format: TXT=27598 bytes) (Updates RFC2616) (Status: PROPOSED
@@ -115,6 +175,77 @@ STARTTLS documents.
1152818 HTTP Over TLS. E. Rescorla. May 2000. (Format: TXT=15170 bytes) 1752818 HTTP Over TLS. E. Rescorla. May 2000. (Format: TXT=15170 bytes)
116 (Status: INFORMATIONAL) 176 (Status: INFORMATIONAL)
117 177
1782876 Use of the KEA and SKIPJACK Algorithms in CMS. J. Pawling. July
179 2000. (Format: TXT=29265 bytes) (Status: INFORMATIONAL)
180
1812984 Use of the CAST-128 Encryption Algorithm in CMS. C. Adams.
182 October 2000. (Format: TXT=11591 bytes) (Status: PROPOSED STANDARD)
183
1842985 PKCS #9: Selected Object Classes and Attribute Types Version 2.0.
185 M. Nystrom, B. Kaliski. November 2000. (Format: TXT=70703 bytes)
186 (Status: INFORMATIONAL)
187
1883029 Internet X.509 Public Key Infrastructure Data Validation and
189 Certification Server Protocols. C. Adams, P. Sylvester, M. Zolotarev,
190 R. Zuccherato. February 2001. (Format: TXT=107347 bytes) (Status:
191 EXPERIMENTAL)
192
1933039 Internet X.509 Public Key Infrastructure Qualified Certificates
194 Profile. S. Santesson, W. Polk, P. Barzin, M. Nystrom. January 2001.
195 (Format: TXT=67619 bytes) (Status: PROPOSED STANDARD)
196
1973058 Use of the IDEA Encryption Algorithm in CMS. S. Teiwes, P.
198 Hartmann, D. Kuenzi. February 2001. (Format: TXT=17257 bytes)
199 (Status: INFORMATIONAL)
200
2013161 Internet X.509 Public Key Infrastructure Time-Stamp Protocol
202 (TSP). C. Adams, P. Cain, D. Pinkas, R. Zuccherato. August 2001.
203 (Format: TXT=54585 bytes) (Status: PROPOSED STANDARD)
204
2053185 Reuse of CMS Content Encryption Keys. S. Farrell, S. Turner.
206 October 2001. (Format: TXT=20404 bytes) (Status: PROPOSED STANDARD)
207
2083207 SMTP Service Extension for Secure SMTP over Transport Layer
209 Security. P. Hoffman. February 2002. (Format: TXT=18679 bytes)
210 (Obsoletes RFC2487) (Status: PROPOSED STANDARD)
211
2123217 Triple-DES and RC2 Key Wrapping. R. Housley. December 2001.
213 (Format: TXT=19855 bytes) (Status: INFORMATIONAL)
214
2153274 Compressed Data Content Type for Cryptographic Message Syntax
216 (CMS). P. Gutmann. June 2002. (Format: TXT=11276 bytes) (Status:
217 PROPOSED STANDARD)
218
2193278 Use of Elliptic Curve Cryptography (ECC) Algorithms in
220 Cryptographic Message Syntax (CMS). S. Blake-Wilson, D. Brown, P.
221 Lambert. April 2002. (Format: TXT=33779 bytes) (Status:
222 INFORMATIONAL)
223
2243281 An Internet Attribute Certificate Profile for Authorization. S.
225 Farrell, R. Housley. April 2002. (Format: TXT=90580 bytes) (Status:
226 PROPOSED STANDARD)
227
2283369 Cryptographic Message Syntax (CMS). R. Housley. August 2002.
229 (Format: TXT=113975 bytes) (Obsoletes RFC2630, RFC3211) (Status:
230 PROPOSED STANDARD)
231
2323370 Cryptographic Message Syntax (CMS) Algorithms. R. Housley. August
233 2002. (Format: TXT=51001 bytes) (Obsoletes RFC2630, RFC3211) (Status:
234 PROPOSED STANDARD)
235
2363377 Lightweight Directory Access Protocol (v3): Technical
237 Specification. J. Hodges, R. Morgan. September 2002. (Format:
238 TXT=9981 bytes) (Updates RFC2251, RFC2252, RFC2253, RFC2254, RFC2255,
239 RFC2256, RFC2829, RFC2830) (Status: PROPOSED STANDARD)
240
2413394 Advanced Encryption Standard (AES) Key Wrap Algorithm. J. Schaad,
242 R. Housley. September 2002. (Format: TXT=73072 bytes) (Status:
243 INFORMATIONAL)
244
2453436 Transport Layer Security over Stream Control Transmission
246 Protocol. A. Jungmaier, E. Rescorla, M. Tuexen. December 2002.
247 (Format: TXT=16333 bytes) (Status: PROPOSED STANDARD)
248
118 "Securing FTP with TLS", 01/27/2000, <draft-murray-auth-ftp-ssl-05.txt> 249 "Securing FTP with TLS", 01/27/2000, <draft-murray-auth-ftp-ssl-05.txt>
119 250
120 251
@@ -124,7 +255,3 @@ To be implemented:
124These are documents that describe things that are planed to be 255These are documents that describe things that are planed to be
125implemented in the hopefully short future. 256implemented in the hopefully short future.
126 257
1272712 Addition of Kerberos Cipher Suites to Transport Layer Security
128 (TLS). A. Medvinsky, M. Hur. October 1999. (Format: TXT=13763 bytes)
129 (Status: PROPOSED STANDARD)
130