diff options
Diffstat (limited to 'src/lib/libssl/src/doc')
71 files changed, 1438 insertions, 506 deletions
diff --git a/src/lib/libssl/src/doc/apps/asn1parse.pod b/src/lib/libssl/src/doc/apps/asn1parse.pod index 542d969066..f7bb926211 100644 --- a/src/lib/libssl/src/doc/apps/asn1parse.pod +++ b/src/lib/libssl/src/doc/apps/asn1parse.pod | |||
| @@ -72,11 +72,11 @@ option can be used multiple times to "drill down" into a nested structure. | |||
| 72 | =item B<-genstr string>, B<-genconf file> | 72 | =item B<-genstr string>, B<-genconf file> |
| 73 | 73 | ||
| 74 | generate encoded data based on B<string>, B<file> or both using | 74 | generate encoded data based on B<string>, B<file> or both using |
| 75 | ASN1_generate_nconf() format. If B<file> only is present then the string | 75 | L<ASN1_generate_nconf(3)|ASN1_generate_nconf(3)> format. If B<file> only is |
| 76 | is obtained from the default section using the name B<asn1>. The encoded | 76 | present then the string is obtained from the default section using the name |
| 77 | data is passed through the ASN1 parser and printed out as though it came | 77 | B<asn1>. The encoded data is passed through the ASN1 parser and printed out as |
| 78 | from a file, the contents can thus be examined and written to a file | 78 | though it came from a file, the contents can thus be examined and written to a |
| 79 | using the B<out> option. | 79 | file using the B<out> option. |
| 80 | 80 | ||
| 81 | =back | 81 | =back |
| 82 | 82 | ||
| @@ -168,4 +168,8 @@ Example config file: | |||
| 168 | There should be options to change the format of output lines. The output of some | 168 | There should be options to change the format of output lines. The output of some |
| 169 | ASN.1 types is not well handled (if at all). | 169 | ASN.1 types is not well handled (if at all). |
| 170 | 170 | ||
| 171 | =head1 SEE ALSO | ||
| 172 | |||
| 173 | L<ASN1_generate_nconf(3)|ASN1_generate_nconf(3)> | ||
| 174 | |||
| 171 | =cut | 175 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/ca.pod b/src/lib/libssl/src/doc/apps/ca.pod index 5618c2dc9d..9ff0cc3612 100644 --- a/src/lib/libssl/src/doc/apps/ca.pod +++ b/src/lib/libssl/src/doc/apps/ca.pod | |||
| @@ -205,7 +205,9 @@ the section of the configuration file containing certificate extensions | |||
| 205 | to be added when a certificate is issued (defaults to B<x509_extensions> | 205 | to be added when a certificate is issued (defaults to B<x509_extensions> |
| 206 | unless the B<-extfile> option is used). If no extension section is | 206 | unless the B<-extfile> option is used). If no extension section is |
| 207 | present then, a V1 certificate is created. If the extension section | 207 | present then, a V1 certificate is created. If the extension section |
| 208 | is present (even if it is empty), then a V3 certificate is created. | 208 | is present (even if it is empty), then a V3 certificate is created. See the:w |
| 209 | L<x509v3_config(5)|x509v3_config(5)> manual page for details of the | ||
| 210 | extension section format. | ||
| 209 | 211 | ||
| 210 | =item B<-extfile file> | 212 | =item B<-extfile file> |
| 211 | 213 | ||
| @@ -215,7 +217,7 @@ used). | |||
| 215 | 217 | ||
| 216 | =item B<-engine id> | 218 | =item B<-engine id> |
| 217 | 219 | ||
| 218 | specifying an engine (by it's unique B<id> string) will cause B<req> | 220 | specifying an engine (by its unique B<id> string) will cause B<ca> |
| 219 | to attempt to obtain a functional reference to the specified engine, | 221 | to attempt to obtain a functional reference to the specified engine, |
| 220 | thus initialising it if needed. The engine will then be set as the default | 222 | thus initialising it if needed. The engine will then be set as the default |
| 221 | for all available algorithms. | 223 | for all available algorithms. |
| @@ -299,7 +301,9 @@ include. If no CRL extension section is present then a V1 CRL is | |||
| 299 | created, if the CRL extension section is present (even if it is | 301 | created, if the CRL extension section is present (even if it is |
| 300 | empty) then a V2 CRL is created. The CRL extensions specified are | 302 | empty) then a V2 CRL is created. The CRL extensions specified are |
| 301 | CRL extensions and B<not> CRL entry extensions. It should be noted | 303 | CRL extensions and B<not> CRL entry extensions. It should be noted |
| 302 | that some software (for example Netscape) can't handle V2 CRLs. | 304 | that some software (for example Netscape) can't handle V2 CRLs. See |
| 305 | L<x509v3_config(5)|x509v3_config(5)> manual page for details of the | ||
| 306 | extension section format. | ||
| 303 | 307 | ||
| 304 | =back | 308 | =back |
| 305 | 309 | ||
| @@ -666,6 +670,6 @@ then even if a certificate is issued with CA:TRUE it will not be valid. | |||
| 666 | =head1 SEE ALSO | 670 | =head1 SEE ALSO |
| 667 | 671 | ||
| 668 | L<req(1)|req(1)>, L<spkac(1)|spkac(1)>, L<x509(1)|x509(1)>, L<CA.pl(1)|CA.pl(1)>, | 672 | L<req(1)|req(1)>, L<spkac(1)|spkac(1)>, L<x509(1)|x509(1)>, L<CA.pl(1)|CA.pl(1)>, |
| 669 | L<config(5)|config(5)> | 673 | L<config(5)|config(5)>, L<x509v3_config(5)|x509v3_config(5)> |
| 670 | 674 | ||
| 671 | =cut | 675 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/ciphers.pod b/src/lib/libssl/src/doc/apps/ciphers.pod index 694e433ef3..f44aa00a2f 100644 --- a/src/lib/libssl/src/doc/apps/ciphers.pod +++ b/src/lib/libssl/src/doc/apps/ciphers.pod | |||
| @@ -8,6 +8,7 @@ ciphers - SSL cipher display and cipher list tool. | |||
| 8 | 8 | ||
| 9 | B<openssl> B<ciphers> | 9 | B<openssl> B<ciphers> |
| 10 | [B<-v>] | 10 | [B<-v>] |
| 11 | [B<-V>] | ||
| 11 | [B<-ssl2>] | 12 | [B<-ssl2>] |
| 12 | [B<-ssl3>] | 13 | [B<-ssl3>] |
| 13 | [B<-tls1>] | 14 | [B<-tls1>] |
| @@ -15,7 +16,7 @@ B<openssl> B<ciphers> | |||
| 15 | 16 | ||
| 16 | =head1 DESCRIPTION | 17 | =head1 DESCRIPTION |
| 17 | 18 | ||
| 18 | The B<cipherlist> command converts OpenSSL cipher lists into ordered | 19 | The B<ciphers> command converts textual OpenSSL cipher lists into ordered |
| 19 | SSL cipher preference lists. It can be used as a test tool to determine | 20 | SSL cipher preference lists. It can be used as a test tool to determine |
| 20 | the appropriate cipherlist. | 21 | the appropriate cipherlist. |
| 21 | 22 | ||
| @@ -25,7 +26,7 @@ the appropriate cipherlist. | |||
| 25 | 26 | ||
| 26 | =item B<-v> | 27 | =item B<-v> |
| 27 | 28 | ||
| 28 | verbose option. List ciphers with a complete description of | 29 | Verbose option. List ciphers with a complete description of |
| 29 | protocol version (SSLv2 or SSLv3; the latter includes TLS), key exchange, | 30 | protocol version (SSLv2 or SSLv3; the latter includes TLS), key exchange, |
| 30 | authentication, encryption and mac algorithms used along with any key size | 31 | authentication, encryption and mac algorithms used along with any key size |
| 31 | restrictions and whether the algorithm is classed as an "export" cipher. | 32 | restrictions and whether the algorithm is classed as an "export" cipher. |
| @@ -33,6 +34,10 @@ Note that without the B<-v> option, ciphers may seem to appear twice | |||
| 33 | in a cipher list; this is when similar ciphers are available for | 34 | in a cipher list; this is when similar ciphers are available for |
| 34 | SSL v2 and for SSL v3/TLS v1. | 35 | SSL v2 and for SSL v3/TLS v1. |
| 35 | 36 | ||
| 37 | =item B<-V> | ||
| 38 | |||
| 39 | Like B<-V>, but include cipher suite codes in output (hex format). | ||
| 40 | |||
| 36 | =item B<-ssl3> | 41 | =item B<-ssl3> |
| 37 | 42 | ||
| 38 | only include SSL v3 ciphers. | 43 | only include SSL v3 ciphers. |
| @@ -104,8 +109,8 @@ The following is a list of all permitted cipher strings and their meanings. | |||
| 104 | 109 | ||
| 105 | =item B<DEFAULT> | 110 | =item B<DEFAULT> |
| 106 | 111 | ||
| 107 | the default cipher list. This is determined at compile time and is normally | 112 | the default cipher list. This is determined at compile time and, as of OpenSSL |
| 108 | B<AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH>. This must be the first cipher string | 113 | 1.0.0, is normally B<ALL:!aNULL:!eNULL>. This must be the first cipher string |
| 109 | specified. | 114 | specified. |
| 110 | 115 | ||
| 111 | =item B<COMPLEMENTOFDEFAULT> | 116 | =item B<COMPLEMENTOFDEFAULT> |
| @@ -116,7 +121,8 @@ not included by B<ALL> (use B<COMPLEMENTOFALL> if necessary). | |||
| 116 | 121 | ||
| 117 | =item B<ALL> | 122 | =item B<ALL> |
| 118 | 123 | ||
| 119 | all ciphers suites except the B<eNULL> ciphers which must be explicitly enabled. | 124 | all cipher suites except the B<eNULL> ciphers which must be explicitly enabled; |
| 125 | as of OpenSSL, the B<ALL> cipher suites are reasonably ordered by default | ||
| 120 | 126 | ||
| 121 | =item B<COMPLEMENTOFALL> | 127 | =item B<COMPLEMENTOFALL> |
| 122 | 128 | ||
| @@ -245,6 +251,33 @@ cipher suites using MD5. | |||
| 245 | 251 | ||
| 246 | cipher suites using SHA1. | 252 | cipher suites using SHA1. |
| 247 | 253 | ||
| 254 | =item B<aGOST> | ||
| 255 | |||
| 256 | cipher suites using GOST R 34.10 (either 2001 or 94) for authenticaction | ||
| 257 | (needs an engine supporting GOST algorithms). | ||
| 258 | |||
| 259 | =item B<aGOST01> | ||
| 260 | |||
| 261 | cipher suites using GOST R 34.10-2001 authentication. | ||
| 262 | |||
| 263 | =item B<aGOST94> | ||
| 264 | |||
| 265 | cipher suites using GOST R 34.10-94 authentication (note that R 34.10-94 | ||
| 266 | standard has been expired so use GOST R 34.10-2001) | ||
| 267 | |||
| 268 | =item B<kGOST> | ||
| 269 | |||
| 270 | cipher suites, using VKO 34.10 key exchange, specified in the RFC 4357. | ||
| 271 | |||
| 272 | =item B<GOST94> | ||
| 273 | |||
| 274 | cipher suites, using HMAC based on GOST R 34.11-94. | ||
| 275 | |||
| 276 | =item B<GOST89MAC> | ||
| 277 | |||
| 278 | cipher suites using GOST 28147-89 MAC B<instead of> HMAC. | ||
| 279 | |||
| 280 | |||
| 248 | =back | 281 | =back |
| 249 | 282 | ||
| 250 | =head1 CIPHER SUITE NAMES | 283 | =head1 CIPHER SUITE NAMES |
| @@ -370,6 +403,16 @@ e.g. DES-CBC3-SHA. In these cases, RSA authentication is used. | |||
| 370 | 403 | ||
| 371 | TLS_DH_anon_WITH_SEED_CBC_SHA ADH-SEED-SHA | 404 | TLS_DH_anon_WITH_SEED_CBC_SHA ADH-SEED-SHA |
| 372 | 405 | ||
| 406 | =head2 GOST ciphersuites from draft-chudov-cryptopro-cptls, extending TLS v1.0 | ||
| 407 | |||
| 408 | Note: these ciphers require an engine which including GOST cryptographic | ||
| 409 | algorithms, such as the B<ccgost> engine, included in the OpenSSL distribution. | ||
| 410 | |||
| 411 | TLS_GOSTR341094_WITH_28147_CNT_IMIT GOST94-GOST89-GOST89 | ||
| 412 | TLS_GOSTR341001_WITH_28147_CNT_IMIT GOST2001-GOST89-GOST89 | ||
| 413 | TLS_GOSTR341094_WITH_NULL_GOSTR3411 GOST94-NULL-GOST94 | ||
| 414 | TLS_GOSTR341001_WITH_NULL_GOSTR3411 GOST2001-NULL-GOST94 | ||
| 415 | |||
| 373 | =head2 Additional Export 1024 and other cipher suites | 416 | =head2 Additional Export 1024 and other cipher suites |
| 374 | 417 | ||
| 375 | Note: these ciphers can also be used in SSL v3. | 418 | Note: these ciphers can also be used in SSL v3. |
| @@ -428,7 +471,8 @@ L<s_client(1)|s_client(1)>, L<s_server(1)|s_server(1)>, L<ssl(3)|ssl(3)> | |||
| 428 | 471 | ||
| 429 | =head1 HISTORY | 472 | =head1 HISTORY |
| 430 | 473 | ||
| 431 | The B<COMPLENTOFALL> and B<COMPLEMENTOFDEFAULT> selection options were | 474 | The B<COMPLENTOFALL> and B<COMPLEMENTOFDEFAULT> selection options |
| 432 | added in version 0.9.7. | 475 | for cipherlist strings were added in OpenSSL 0.9.7. |
| 476 | The B<-V> option for the B<ciphers> command was added in OpenSSL 1.0.0. | ||
| 433 | 477 | ||
| 434 | =cut | 478 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/dgst.pod b/src/lib/libssl/src/doc/apps/dgst.pod index 908cd2a6d6..b035edf08e 100644 --- a/src/lib/libssl/src/doc/apps/dgst.pod +++ b/src/lib/libssl/src/doc/apps/dgst.pod | |||
| @@ -14,6 +14,7 @@ B<openssl> B<dgst> | |||
| 14 | [B<-binary>] | 14 | [B<-binary>] |
| 15 | [B<-out filename>] | 15 | [B<-out filename>] |
| 16 | [B<-sign filename>] | 16 | [B<-sign filename>] |
| 17 | [B<-keyform arg>] | ||
| 17 | [B<-passin arg>] | 18 | [B<-passin arg>] |
| 18 | [B<-verify filename>] | 19 | [B<-verify filename>] |
| 19 | [B<-prverify filename>] | 20 | [B<-prverify filename>] |
| @@ -61,6 +62,23 @@ filename to output to, or standard output by default. | |||
| 61 | 62 | ||
| 62 | digitally sign the digest using the private key in "filename". | 63 | digitally sign the digest using the private key in "filename". |
| 63 | 64 | ||
| 65 | =item B<-keyform arg> | ||
| 66 | |||
| 67 | Specifies the key format to sign digest with. Only PEM and ENGINE | ||
| 68 | formats are supported by the B<dgst> command. | ||
| 69 | |||
| 70 | =item B<-engine id> | ||
| 71 | |||
| 72 | Use engine B<id> for operations (including private key storage). | ||
| 73 | This engine is not used as source for digest algorithms, unless it is | ||
| 74 | also specified in the configuration file. | ||
| 75 | |||
| 76 | =item B<-sigopt nm:v> | ||
| 77 | |||
| 78 | Pass options to the signature algorithm during sign or verify operations. | ||
| 79 | Names and values of these options are algorithm-specific. | ||
| 80 | |||
| 81 | |||
| 64 | =item B<-passin arg> | 82 | =item B<-passin arg> |
| 65 | 83 | ||
| 66 | the private key password source. For more information about the format of B<arg> | 84 | the private key password source. For more information about the format of B<arg> |
| @@ -83,6 +101,35 @@ the actual signature to verify. | |||
| 83 | 101 | ||
| 84 | create a hashed MAC using "key". | 102 | create a hashed MAC using "key". |
| 85 | 103 | ||
| 104 | =item B<-mac alg> | ||
| 105 | |||
| 106 | create MAC (keyed Message Authentication Code). The most popular MAC | ||
| 107 | algorithm is HMAC (hash-based MAC), but there are other MAC algorithms | ||
| 108 | which are not based on hash, for instance B<gost-mac> algorithm, | ||
| 109 | supported by B<ccgost> engine. MAC keys and other options should be set | ||
| 110 | via B<-macopt> parameter. | ||
| 111 | |||
| 112 | =item B<-macopt nm:v> | ||
| 113 | |||
| 114 | Passes options to MAC algorithm, specified by B<-mac> key. | ||
| 115 | Following options are supported by both by B<HMAC> and B<gost-mac>: | ||
| 116 | |||
| 117 | =over 8 | ||
| 118 | |||
| 119 | =item B<key:string> | ||
| 120 | |||
| 121 | Specifies MAC key as alphnumeric string (use if key contain printable | ||
| 122 | characters only). String length must conform to any restrictions of | ||
| 123 | the MAC algorithm for example exactly 32 chars for gost-mac. | ||
| 124 | |||
| 125 | =item B<hexkey:string> | ||
| 126 | |||
| 127 | Specifies MAC key in hexadecimal form (two hex digits per byte). | ||
| 128 | Key length must conform to any restrictions of the MAC algorithm | ||
| 129 | for example exactly 32 chars for gost-mac. | ||
| 130 | |||
| 131 | =back | ||
| 132 | |||
| 86 | =item B<-rand file(s)> | 133 | =item B<-rand file(s)> |
| 87 | 134 | ||
| 88 | a file or files containing random data used to seed the random number | 135 | a file or files containing random data used to seed the random number |
diff --git a/src/lib/libssl/src/doc/apps/dhparam.pod b/src/lib/libssl/src/doc/apps/dhparam.pod index c31db95a47..9edb4ff4e1 100644 --- a/src/lib/libssl/src/doc/apps/dhparam.pod +++ b/src/lib/libssl/src/doc/apps/dhparam.pod | |||
| @@ -99,7 +99,7 @@ be loaded by calling the B<get_dh>I<numbits>B<()> function. | |||
| 99 | 99 | ||
| 100 | =item B<-engine id> | 100 | =item B<-engine id> |
| 101 | 101 | ||
| 102 | specifying an engine (by it's unique B<id> string) will cause B<req> | 102 | specifying an engine (by its unique B<id> string) will cause B<dhparam> |
| 103 | to attempt to obtain a functional reference to the specified engine, | 103 | to attempt to obtain a functional reference to the specified engine, |
| 104 | thus initialising it if needed. The engine will then be set as the default | 104 | thus initialising it if needed. The engine will then be set as the default |
| 105 | for all available algorithms. | 105 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/dsa.pod b/src/lib/libssl/src/doc/apps/dsa.pod index ed06b8806d..ddbc9327fa 100644 --- a/src/lib/libssl/src/doc/apps/dsa.pod +++ b/src/lib/libssl/src/doc/apps/dsa.pod | |||
| @@ -109,7 +109,7 @@ a public key. | |||
| 109 | 109 | ||
| 110 | =item B<-engine id> | 110 | =item B<-engine id> |
| 111 | 111 | ||
| 112 | specifying an engine (by it's unique B<id> string) will cause B<req> | 112 | specifying an engine (by its unique B<id> string) will cause B<dsa> |
| 113 | to attempt to obtain a functional reference to the specified engine, | 113 | to attempt to obtain a functional reference to the specified engine, |
| 114 | thus initialising it if needed. The engine will then be set as the default | 114 | thus initialising it if needed. The engine will then be set as the default |
| 115 | for all available algorithms. | 115 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/dsaparam.pod b/src/lib/libssl/src/doc/apps/dsaparam.pod index b9b1b93b42..ba5ec4d72c 100644 --- a/src/lib/libssl/src/doc/apps/dsaparam.pod +++ b/src/lib/libssl/src/doc/apps/dsaparam.pod | |||
| @@ -85,7 +85,7 @@ the input file (if any) is ignored. | |||
| 85 | 85 | ||
| 86 | =item B<-engine id> | 86 | =item B<-engine id> |
| 87 | 87 | ||
| 88 | specifying an engine (by it's unique B<id> string) will cause B<req> | 88 | specifying an engine (by its unique B<id> string) will cause B<dsaparam> |
| 89 | to attempt to obtain a functional reference to the specified engine, | 89 | to attempt to obtain a functional reference to the specified engine, |
| 90 | thus initialising it if needed. The engine will then be set as the default | 90 | thus initialising it if needed. The engine will then be set as the default |
| 91 | for all available algorithms. | 91 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/enc.pod b/src/lib/libssl/src/doc/apps/enc.pod index 4391c93360..3dee4ed992 100644 --- a/src/lib/libssl/src/doc/apps/enc.pod +++ b/src/lib/libssl/src/doc/apps/enc.pod | |||
| @@ -12,17 +12,24 @@ B<openssl enc -ciphername> | |||
| 12 | [B<-pass arg>] | 12 | [B<-pass arg>] |
| 13 | [B<-e>] | 13 | [B<-e>] |
| 14 | [B<-d>] | 14 | [B<-d>] |
| 15 | [B<-a>] | 15 | [B<-a/-base64>] |
| 16 | [B<-A>] | 16 | [B<-A>] |
| 17 | [B<-k password>] | 17 | [B<-k password>] |
| 18 | [B<-kfile filename>] | 18 | [B<-kfile filename>] |
| 19 | [B<-K key>] | 19 | [B<-K key>] |
| 20 | [B<-iv IV>] | 20 | [B<-iv IV>] |
| 21 | [B<-S salt>] | ||
| 22 | [B<-salt>] | ||
| 23 | [B<-nosalt>] | ||
| 24 | [B<-z>] | ||
| 25 | [B<-md>] | ||
| 21 | [B<-p>] | 26 | [B<-p>] |
| 22 | [B<-P>] | 27 | [B<-P>] |
| 23 | [B<-bufsize number>] | 28 | [B<-bufsize number>] |
| 24 | [B<-nopad>] | 29 | [B<-nopad>] |
| 25 | [B<-debug>] | 30 | [B<-debug>] |
| 31 | [B<-none>] | ||
| 32 | [B<-engine id>] | ||
| 26 | 33 | ||
| 27 | =head1 DESCRIPTION | 34 | =head1 DESCRIPTION |
| 28 | 35 | ||
| @@ -50,15 +57,13 @@ see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>. | |||
| 50 | 57 | ||
| 51 | =item B<-salt> | 58 | =item B<-salt> |
| 52 | 59 | ||
| 53 | use a salt in the key derivation routines. This option should B<ALWAYS> | 60 | use a salt in the key derivation routines. This is the default. |
| 54 | be used unless compatibility with previous versions of OpenSSL or SSLeay | ||
| 55 | is required. This option is only present on OpenSSL versions 0.9.5 or | ||
| 56 | above. | ||
| 57 | 61 | ||
| 58 | =item B<-nosalt> | 62 | =item B<-nosalt> |
| 59 | 63 | ||
| 60 | don't use a salt in the key derivation routines. This is the default for | 64 | don't use a salt in the key derivation routines. This option B<SHOULD NOT> be |
| 61 | compatibility with previous versions of OpenSSL and SSLeay. | 65 | used except for test purposes or compatibility with ancient versions of OpenSSL |
| 66 | and SSLeay. | ||
| 62 | 67 | ||
| 63 | =item B<-e> | 68 | =item B<-e> |
| 64 | 69 | ||
| @@ -74,6 +79,10 @@ base64 process the data. This means that if encryption is taking place | |||
| 74 | the data is base64 encoded after encryption. If decryption is set then | 79 | the data is base64 encoded after encryption. If decryption is set then |
| 75 | the input data is base64 decoded before being decrypted. | 80 | the input data is base64 decoded before being decrypted. |
| 76 | 81 | ||
| 82 | =item B<-base64> | ||
| 83 | |||
| 84 | same as B<-a> | ||
| 85 | |||
| 77 | =item B<-A> | 86 | =item B<-A> |
| 78 | 87 | ||
| 79 | if the B<-a> option is set then base64 process the data on one line. | 88 | if the B<-a> option is set then base64 process the data on one line. |
| @@ -89,10 +98,18 @@ read the password to derive the key from the first line of B<filename>. | |||
| 89 | This is for compatibility with previous versions of OpenSSL. Superseded by | 98 | This is for compatibility with previous versions of OpenSSL. Superseded by |
| 90 | the B<-pass> argument. | 99 | the B<-pass> argument. |
| 91 | 100 | ||
| 101 | =item B<-nosalt> | ||
| 102 | |||
| 103 | do not use a salt | ||
| 104 | |||
| 105 | =item B<-salt> | ||
| 106 | |||
| 107 | use salt (randomly generated or provide with B<-S> option) when | ||
| 108 | encrypting (this is the default). | ||
| 109 | |||
| 92 | =item B<-S salt> | 110 | =item B<-S salt> |
| 93 | 111 | ||
| 94 | the actual salt to use: this must be represented as a string comprised only | 112 | the actual salt to use: this must be represented as a string of hex digits. |
| 95 | of hex digits. | ||
| 96 | 113 | ||
| 97 | =item B<-K key> | 114 | =item B<-K key> |
| 98 | 115 | ||
| @@ -131,12 +148,34 @@ disable standard block padding | |||
| 131 | 148 | ||
| 132 | debug the BIOs used for I/O. | 149 | debug the BIOs used for I/O. |
| 133 | 150 | ||
| 151 | =item B<-z> | ||
| 152 | |||
| 153 | Compress or decompress clear text using zlib before encryption or after | ||
| 154 | decryption. This option exists only if OpenSSL with compiled with zlib | ||
| 155 | or zlib-dynamic option. | ||
| 156 | |||
| 157 | =item B<-none> | ||
| 158 | |||
| 159 | Use NULL cipher (no encryption or decryption of input). | ||
| 160 | |||
| 134 | =back | 161 | =back |
| 135 | 162 | ||
| 136 | =head1 NOTES | 163 | =head1 NOTES |
| 137 | 164 | ||
| 138 | The program can be called either as B<openssl ciphername> or | 165 | The program can be called either as B<openssl ciphername> or |
| 139 | B<openssl enc -ciphername>. | 166 | B<openssl enc -ciphername>. But the first form doesn't work with |
| 167 | engine-provided ciphers, because this form is processed before the | ||
| 168 | configuration file is read and any ENGINEs loaded. | ||
| 169 | |||
| 170 | Engines which provide entirely new encryption algorithms (such as ccgost | ||
| 171 | engine which provides gost89 algorithm) should be configured in the | ||
| 172 | configuration file. Engines, specified in the command line using -engine | ||
| 173 | options can only be used for hadrware-assisted implementations of | ||
| 174 | ciphers, which are supported by OpenSSL core or other engine, specified | ||
| 175 | in the configuration file. | ||
| 176 | |||
| 177 | When enc command lists supported ciphers, ciphers provided by engines, | ||
| 178 | specified in the configuration files are listed too. | ||
| 140 | 179 | ||
| 141 | A password will be prompted for to derive the key and IV if necessary. | 180 | A password will be prompted for to derive the key and IV if necessary. |
| 142 | 181 | ||
| @@ -169,6 +208,14 @@ Blowfish and RC5 algorithms use a 128 bit key. | |||
| 169 | 208 | ||
| 170 | =head1 SUPPORTED CIPHERS | 209 | =head1 SUPPORTED CIPHERS |
| 171 | 210 | ||
| 211 | Note that some of these ciphers can be disabled at compile time | ||
| 212 | and some are available only if an appropriate engine is configured | ||
| 213 | in the configuration file. The output of the B<enc> command run with | ||
| 214 | unsupported options (for example B<openssl enc -help>) includes a | ||
| 215 | list of ciphers, supported by your versesion of OpenSSL, including | ||
| 216 | ones provided by configured engines. | ||
| 217 | |||
| 218 | |||
| 172 | base64 Base 64 | 219 | base64 Base 64 |
| 173 | 220 | ||
| 174 | bf-cbc Blowfish in CBC mode | 221 | bf-cbc Blowfish in CBC mode |
| @@ -203,6 +250,9 @@ Blowfish and RC5 algorithms use a 128 bit key. | |||
| 203 | 250 | ||
| 204 | desx DESX algorithm. | 251 | desx DESX algorithm. |
| 205 | 252 | ||
| 253 | gost89 GOST 28147-89 in CFB mode (provided by ccgost engine) | ||
| 254 | gost89-cnt `GOST 28147-89 in CNT mode (provided by ccgost engine) | ||
| 255 | |||
| 206 | idea-cbc IDEA algorithm in CBC mode | 256 | idea-cbc IDEA algorithm in CBC mode |
| 207 | idea same as idea-cbc | 257 | idea same as idea-cbc |
| 208 | idea-cfb IDEA in CFB mode | 258 | idea-cfb IDEA in CFB mode |
diff --git a/src/lib/libssl/src/doc/apps/gendsa.pod b/src/lib/libssl/src/doc/apps/gendsa.pod index 2c56cc7888..8c7f114ca0 100644 --- a/src/lib/libssl/src/doc/apps/gendsa.pod +++ b/src/lib/libssl/src/doc/apps/gendsa.pod | |||
| @@ -40,7 +40,7 @@ all others. | |||
| 40 | 40 | ||
| 41 | =item B<-engine id> | 41 | =item B<-engine id> |
| 42 | 42 | ||
| 43 | specifying an engine (by it's unique B<id> string) will cause B<req> | 43 | specifying an engine (by its unique B<id> string) will cause B<gendsa> |
| 44 | to attempt to obtain a functional reference to the specified engine, | 44 | to attempt to obtain a functional reference to the specified engine, |
| 45 | thus initialising it if needed. The engine will then be set as the default | 45 | thus initialising it if needed. The engine will then be set as the default |
| 46 | for all available algorithms. | 46 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/genrsa.pod b/src/lib/libssl/src/doc/apps/genrsa.pod index 25af4d1475..7dcac2a779 100644 --- a/src/lib/libssl/src/doc/apps/genrsa.pod +++ b/src/lib/libssl/src/doc/apps/genrsa.pod | |||
| @@ -57,7 +57,7 @@ all others. | |||
| 57 | 57 | ||
| 58 | =item B<-engine id> | 58 | =item B<-engine id> |
| 59 | 59 | ||
| 60 | specifying an engine (by it's unique B<id> string) will cause B<req> | 60 | specifying an engine (by its unique B<id> string) will cause B<genrsa> |
| 61 | to attempt to obtain a functional reference to the specified engine, | 61 | to attempt to obtain a functional reference to the specified engine, |
| 62 | thus initialising it if needed. The engine will then be set as the default | 62 | thus initialising it if needed. The engine will then be set as the default |
| 63 | for all available algorithms. | 63 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/ocsp.pod b/src/lib/libssl/src/doc/apps/ocsp.pod index b58ddc1788..af2e12e418 100644 --- a/src/lib/libssl/src/doc/apps/ocsp.pod +++ b/src/lib/libssl/src/doc/apps/ocsp.pod | |||
| @@ -51,6 +51,7 @@ B<openssl> B<ocsp> | |||
| 51 | [B<-ndays n>] | 51 | [B<-ndays n>] |
| 52 | [B<-resp_key_id>] | 52 | [B<-resp_key_id>] |
| 53 | [B<-nrequest n>] | 53 | [B<-nrequest n>] |
| 54 | [B<-md5|-sha1|...>] | ||
| 54 | 55 | ||
| 55 | =head1 DESCRIPTION | 56 | =head1 DESCRIPTION |
| 56 | 57 | ||
| @@ -206,6 +207,11 @@ information is immediately available. In this case the age of the B<notBefore> f | |||
| 206 | is checked to see it is not older than B<age> seconds old. By default this additional | 207 | is checked to see it is not older than B<age> seconds old. By default this additional |
| 207 | check is not performed. | 208 | check is not performed. |
| 208 | 209 | ||
| 210 | =item B<-md5|-sha1|-sha256|-ripemod160|...> | ||
| 211 | |||
| 212 | this option sets digest algorithm to use for certificate identification | ||
| 213 | in the OCSP request. By default SHA-1 is used. | ||
| 214 | |||
| 209 | =back | 215 | =back |
| 210 | 216 | ||
| 211 | =head1 OCSP SERVER OPTIONS | 217 | =head1 OCSP SERVER OPTIONS |
diff --git a/src/lib/libssl/src/doc/apps/openssl.pod b/src/lib/libssl/src/doc/apps/openssl.pod index 964cdf0f02..738142e9ff 100644 --- a/src/lib/libssl/src/doc/apps/openssl.pod +++ b/src/lib/libssl/src/doc/apps/openssl.pod | |||
| @@ -12,7 +12,7 @@ I<command> | |||
| 12 | [ I<command_opts> ] | 12 | [ I<command_opts> ] |
| 13 | [ I<command_args> ] | 13 | [ I<command_args> ] |
| 14 | 14 | ||
| 15 | B<openssl> [ B<list-standard-commands> | B<list-message-digest-commands> | B<list-cipher-commands> ] | 15 | B<openssl> [ B<list-standard-commands> | B<list-message-digest-commands> | B<list-cipher-commands> | B<list-cipher-algorithms> | B<list-message-digest-algorithms> | B<list-public-key-algorithms>] |
| 16 | 16 | ||
| 17 | B<openssl> B<no->I<XXX> [ I<arbitrary options> ] | 17 | B<openssl> B<no->I<XXX> [ I<arbitrary options> ] |
| 18 | 18 | ||
| @@ -26,12 +26,14 @@ The B<openssl> program is a command line tool for using the various | |||
| 26 | cryptography functions of OpenSSL's B<crypto> library from the shell. | 26 | cryptography functions of OpenSSL's B<crypto> library from the shell. |
| 27 | It can be used for | 27 | It can be used for |
| 28 | 28 | ||
| 29 | o Creation of RSA, DH and DSA key parameters | 29 | o Creation and management of private keys, public keys and parameters |
| 30 | o Public key cryptographic operations | ||
| 30 | o Creation of X.509 certificates, CSRs and CRLs | 31 | o Creation of X.509 certificates, CSRs and CRLs |
| 31 | o Calculation of Message Digests | 32 | o Calculation of Message Digests |
| 32 | o Encryption and Decryption with Ciphers | 33 | o Encryption and Decryption with Ciphers |
| 33 | o SSL/TLS Client and Server Tests | 34 | o SSL/TLS Client and Server Tests |
| 34 | o Handling of S/MIME signed or encrypted mail | 35 | o Handling of S/MIME signed or encrypted mail |
| 36 | o Time Stamp requests, generation and verification | ||
| 35 | 37 | ||
| 36 | =head1 COMMAND SUMMARY | 38 | =head1 COMMAND SUMMARY |
| 37 | 39 | ||
| @@ -44,6 +46,14 @@ and B<list-cipher-commands> output a list (one entry per line) of the names | |||
| 44 | of all standard commands, message digest commands, or cipher commands, | 46 | of all standard commands, message digest commands, or cipher commands, |
| 45 | respectively, that are available in the present B<openssl> utility. | 47 | respectively, that are available in the present B<openssl> utility. |
| 46 | 48 | ||
| 49 | The pseudo-commands B<list-cipher-algorithms> and | ||
| 50 | B<list-message-digest-algorithms> list all cipher and message digest names, one entry per line. Aliases are listed as: | ||
| 51 | |||
| 52 | from => to | ||
| 53 | |||
| 54 | The pseudo-command B<list-public-key-algorithms> lists all supported public | ||
| 55 | key algorithms. | ||
| 56 | |||
| 47 | The pseudo-command B<no->I<XXX> tests whether a command of the | 57 | The pseudo-command B<no->I<XXX> tests whether a command of the |
| 48 | specified name is available. If no command named I<XXX> exists, it | 58 | specified name is available. If no command named I<XXX> exists, it |
| 49 | returns 0 (success) and prints B<no->I<XXX>; otherwise it returns 1 | 59 | returns 0 (success) and prints B<no->I<XXX>; otherwise it returns 1 |
| @@ -71,6 +81,10 @@ Certificate Authority (CA) Management. | |||
| 71 | 81 | ||
| 72 | Cipher Suite Description Determination. | 82 | Cipher Suite Description Determination. |
| 73 | 83 | ||
| 84 | =item L<B<cms>|cms(1)> | ||
| 85 | |||
| 86 | CMS (Cryptographic Message Syntax) utility | ||
| 87 | |||
| 74 | =item L<B<crl>|crl(1)> | 88 | =item L<B<crl>|crl(1)> |
| 75 | 89 | ||
| 76 | Certificate Revocation List (CRL) Management. | 90 | Certificate Revocation List (CRL) Management. |
| @@ -88,25 +102,40 @@ Message Digest Calculation. | |||
| 88 | Diffie-Hellman Parameter Management. | 102 | Diffie-Hellman Parameter Management. |
| 89 | Obsoleted by L<B<dhparam>|dhparam(1)>. | 103 | Obsoleted by L<B<dhparam>|dhparam(1)>. |
| 90 | 104 | ||
| 105 | =item L<B<dhparam>|dhparam(1)> | ||
| 106 | |||
| 107 | Generation and Management of Diffie-Hellman Parameters. Superseded by | ||
| 108 | L<B<genpkey>|genpkey(1)> and L<B<pkeyparam>|pkeyparam(1)> | ||
| 109 | |||
| 110 | |||
| 91 | =item L<B<dsa>|dsa(1)> | 111 | =item L<B<dsa>|dsa(1)> |
| 92 | 112 | ||
| 93 | DSA Data Management. | 113 | DSA Data Management. |
| 94 | 114 | ||
| 95 | =item L<B<dsaparam>|dsaparam(1)> | 115 | =item L<B<dsaparam>|dsaparam(1)> |
| 96 | 116 | ||
| 97 | DSA Parameter Generation. | 117 | DSA Parameter Generation and Management. Superseded by |
| 118 | L<B<genpkey>|genpkey(1)> and L<B<pkeyparam>|pkeyparam(1)> | ||
| 119 | |||
| 120 | =item L<B<ec>|ec(1)> | ||
| 121 | |||
| 122 | EC (Elliptic curve) key processing | ||
| 123 | |||
| 124 | =item L<B<ecparam>|ecparam(1)> | ||
| 125 | |||
| 126 | EC parameter manipulation and generation | ||
| 98 | 127 | ||
| 99 | =item L<B<enc>|enc(1)> | 128 | =item L<B<enc>|enc(1)> |
| 100 | 129 | ||
| 101 | Encoding with Ciphers. | 130 | Encoding with Ciphers. |
| 102 | 131 | ||
| 103 | =item L<B<errstr>|errstr(1)> | 132 | =item L<B<engine>|engine(1)> |
| 104 | 133 | ||
| 105 | Error Number to Error String Conversion. | 134 | Engine (loadble module) information and manipulation. |
| 106 | 135 | ||
| 107 | =item L<B<dhparam>|dhparam(1)> | 136 | =item L<B<errstr>|errstr(1)> |
| 108 | 137 | ||
| 109 | Generation and Management of Diffie-Hellman Parameters. | 138 | Error Number to Error String Conversion. |
| 110 | 139 | ||
| 111 | =item B<gendh> | 140 | =item B<gendh> |
| 112 | 141 | ||
| @@ -115,11 +144,20 @@ Obsoleted by L<B<dhparam>|dhparam(1)>. | |||
| 115 | 144 | ||
| 116 | =item L<B<gendsa>|gendsa(1)> | 145 | =item L<B<gendsa>|gendsa(1)> |
| 117 | 146 | ||
| 118 | Generation of DSA Parameters. | 147 | Generation of DSA Private Key from Parameters. Superseded by |
| 148 | L<B<genpkey>|genpkey(1)> and L<B<pkey>|pkey(1)> | ||
| 149 | |||
| 150 | =item L<B<genpkey>|genpkey(1)> | ||
| 151 | |||
| 152 | Generation of Private Key or Parameters. | ||
| 119 | 153 | ||
| 120 | =item L<B<genrsa>|genrsa(1)> | 154 | =item L<B<genrsa>|genrsa(1)> |
| 121 | 155 | ||
| 122 | Generation of RSA Parameters. | 156 | Generation of RSA Private Key. Superceded by L<B<genpkey>|genpkey(1)>. |
| 157 | |||
| 158 | =item L<B<nseq>|nseq(1)> | ||
| 159 | |||
| 160 | Create or examine a netscape certificate sequence | ||
| 123 | 161 | ||
| 124 | =item L<B<ocsp>|ocsp(1)> | 162 | =item L<B<ocsp>|ocsp(1)> |
| 125 | 163 | ||
| @@ -137,21 +175,35 @@ PKCS#12 Data Management. | |||
| 137 | 175 | ||
| 138 | PKCS#7 Data Management. | 176 | PKCS#7 Data Management. |
| 139 | 177 | ||
| 178 | =item L<B<pkey>|pkey(1)> | ||
| 179 | |||
| 180 | Public and private key management. | ||
| 181 | |||
| 182 | =item L<B<pkeyparam>|pkeyparam(1)> | ||
| 183 | |||
| 184 | Public key algorithm parameter management. | ||
| 185 | |||
| 186 | =item L<B<pkeyutl>|pkeyutl(1)> | ||
| 187 | |||
| 188 | Public key algorithm cryptographic operation utility. | ||
| 189 | |||
| 140 | =item L<B<rand>|rand(1)> | 190 | =item L<B<rand>|rand(1)> |
| 141 | 191 | ||
| 142 | Generate pseudo-random bytes. | 192 | Generate pseudo-random bytes. |
| 143 | 193 | ||
| 144 | =item L<B<req>|req(1)> | 194 | =item L<B<req>|req(1)> |
| 145 | 195 | ||
| 146 | X.509 Certificate Signing Request (CSR) Management. | 196 | PKCS#10 X.509 Certificate Signing Request (CSR) Management. |
| 147 | 197 | ||
| 148 | =item L<B<rsa>|rsa(1)> | 198 | =item L<B<rsa>|rsa(1)> |
| 149 | 199 | ||
| 150 | RSA Data Management. | 200 | RSA key management. |
| 201 | |||
| 151 | 202 | ||
| 152 | =item L<B<rsautl>|rsautl(1)> | 203 | =item L<B<rsautl>|rsautl(1)> |
| 153 | 204 | ||
| 154 | RSA utility for signing, verification, encryption, and decryption. | 205 | RSA utility for signing, verification, encryption, and decryption. Superseded |
| 206 | by L<B<pkeyutl>|pkeyutl(1)> | ||
| 155 | 207 | ||
| 156 | =item L<B<s_client>|s_client(1)> | 208 | =item L<B<s_client>|s_client(1)> |
| 157 | 209 | ||
| @@ -185,6 +237,14 @@ S/MIME mail processing. | |||
| 185 | 237 | ||
| 186 | Algorithm Speed Measurement. | 238 | Algorithm Speed Measurement. |
| 187 | 239 | ||
| 240 | =item L<B<spkac>|spkac(1)> | ||
| 241 | |||
| 242 | SPKAC printing and generating utility | ||
| 243 | |||
| 244 | =item L<B<ts>|ts(1)> | ||
| 245 | |||
| 246 | Time Stamping Authority tool (client/server) | ||
| 247 | |||
| 188 | =item L<B<verify>|verify(1)> | 248 | =item L<B<verify>|verify(1)> |
| 189 | 249 | ||
| 190 | X.509 Certificate Verification. | 250 | X.509 Certificate Verification. |
| @@ -227,6 +287,8 @@ SHA Digest | |||
| 227 | 287 | ||
| 228 | SHA-1 Digest | 288 | SHA-1 Digest |
| 229 | 289 | ||
| 290 | =back | ||
| 291 | |||
| 230 | =item B<sha224> | 292 | =item B<sha224> |
| 231 | 293 | ||
| 232 | SHA-224 Digest | 294 | SHA-224 Digest |
| @@ -243,8 +305,6 @@ SHA-384 Digest | |||
| 243 | 305 | ||
| 244 | SHA-512 Digest | 306 | SHA-512 Digest |
| 245 | 307 | ||
| 246 | =back | ||
| 247 | |||
| 248 | =head2 ENCODING AND CIPHER COMMANDS | 308 | =head2 ENCODING AND CIPHER COMMANDS |
| 249 | 309 | ||
| 250 | =over 10 | 310 | =over 10 |
| @@ -339,7 +399,7 @@ read the password from standard input. | |||
| 339 | L<asn1parse(1)|asn1parse(1)>, L<ca(1)|ca(1)>, L<config(5)|config(5)>, | 399 | L<asn1parse(1)|asn1parse(1)>, L<ca(1)|ca(1)>, L<config(5)|config(5)>, |
| 340 | L<crl(1)|crl(1)>, L<crl2pkcs7(1)|crl2pkcs7(1)>, L<dgst(1)|dgst(1)>, | 400 | L<crl(1)|crl(1)>, L<crl2pkcs7(1)|crl2pkcs7(1)>, L<dgst(1)|dgst(1)>, |
| 341 | L<dhparam(1)|dhparam(1)>, L<dsa(1)|dsa(1)>, L<dsaparam(1)|dsaparam(1)>, | 401 | L<dhparam(1)|dhparam(1)>, L<dsa(1)|dsa(1)>, L<dsaparam(1)|dsaparam(1)>, |
| 342 | L<enc(1)|enc(1)>, L<gendsa(1)|gendsa(1)>, | 402 | L<enc(1)|enc(1)>, L<gendsa(1)|gendsa(1)>, L<genpkey(1)|genpkey(1)>, |
| 343 | L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>, | 403 | L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>, |
| 344 | L<passwd(1)|passwd(1)>, | 404 | L<passwd(1)|passwd(1)>, |
| 345 | L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, | 405 | L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, |
| @@ -348,12 +408,13 @@ L<rsautl(1)|rsautl(1)>, L<s_client(1)|s_client(1)>, | |||
| 348 | L<s_server(1)|s_server(1)>, L<s_time(1)|s_time(1)>, | 408 | L<s_server(1)|s_server(1)>, L<s_time(1)|s_time(1)>, |
| 349 | L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>, | 409 | L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>, |
| 350 | L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>, | 410 | L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>, |
| 351 | L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)> | 411 | L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)>, L<x509v3_config(5)|x509v3_config(5)> |
| 352 | 412 | ||
| 353 | =head1 HISTORY | 413 | =head1 HISTORY |
| 354 | 414 | ||
| 355 | The openssl(1) document appeared in OpenSSL 0.9.2. | 415 | The openssl(1) document appeared in OpenSSL 0.9.2. |
| 356 | The B<list->I<XXX>B<-commands> pseudo-commands were added in OpenSSL 0.9.3; | 416 | The B<list->I<XXX>B<-commands> pseudo-commands were added in OpenSSL 0.9.3; |
| 417 | The B<list->I<XXX>B<-algorithms> pseudo-commands were added in OpenSSL 1.0.0; | ||
| 357 | the B<no->I<XXX> pseudo-commands were added in OpenSSL 0.9.5a. | 418 | the B<no->I<XXX> pseudo-commands were added in OpenSSL 0.9.5a. |
| 358 | For notes on the availability of other commands, see their individual | 419 | For notes on the availability of other commands, see their individual |
| 359 | manual pages. | 420 | manual pages. |
diff --git a/src/lib/libssl/src/doc/apps/pkcs12.pod b/src/lib/libssl/src/doc/apps/pkcs12.pod index 7d84146293..f69a5c5a4c 100644 --- a/src/lib/libssl/src/doc/apps/pkcs12.pod +++ b/src/lib/libssl/src/doc/apps/pkcs12.pod | |||
| @@ -23,22 +23,23 @@ B<openssl> B<pkcs12> | |||
| 23 | [B<-cacerts>] | 23 | [B<-cacerts>] |
| 24 | [B<-nokeys>] | 24 | [B<-nokeys>] |
| 25 | [B<-info>] | 25 | [B<-info>] |
| 26 | [B<-des>] | 26 | [B<-des | -des3 | -idea | -aes128 | -aes192 | -aes256 | -camellia128 | -camellia192 | -camellia256 | -nodes>] |
| 27 | [B<-des3>] | ||
| 28 | [B<-idea>] | ||
| 29 | [B<-nodes>] | ||
| 30 | [B<-noiter>] | 27 | [B<-noiter>] |
| 31 | [B<-maciter>] | 28 | [B<-maciter | -nomaciter | -nomac>] |
| 32 | [B<-twopass>] | 29 | [B<-twopass>] |
| 33 | [B<-descert>] | 30 | [B<-descert>] |
| 34 | [B<-certpbe>] | 31 | [B<-certpbe cipher>] |
| 35 | [B<-keypbe>] | 32 | [B<-keypbe cipher>] |
| 33 | [B<-macalg digest>] | ||
| 36 | [B<-keyex>] | 34 | [B<-keyex>] |
| 37 | [B<-keysig>] | 35 | [B<-keysig>] |
| 38 | [B<-password arg>] | 36 | [B<-password arg>] |
| 39 | [B<-passin arg>] | 37 | [B<-passin arg>] |
| 40 | [B<-passout arg>] | 38 | [B<-passout arg>] |
| 41 | [B<-rand file(s)>] | 39 | [B<-rand file(s)>] |
| 40 | [B<-CAfile file>] | ||
| 41 | [B<-CApath dir>] | ||
| 42 | [B<-CSP name>] | ||
| 42 | 43 | ||
| 43 | =head1 DESCRIPTION | 44 | =head1 DESCRIPTION |
| 44 | 45 | ||
| @@ -49,7 +50,7 @@ programs including Netscape, MSIE and MS Outlook. | |||
| 49 | =head1 COMMAND OPTIONS | 50 | =head1 COMMAND OPTIONS |
| 50 | 51 | ||
| 51 | There are a lot of options the meaning of some depends of whether a PKCS#12 file | 52 | There are a lot of options the meaning of some depends of whether a PKCS#12 file |
| 52 | is being created or parsed. By default a PKCS#12 file is parsed a PKCS#12 | 53 | is being created or parsed. By default a PKCS#12 file is parsed. A PKCS#12 |
| 53 | file can be created by using the B<-export> option (see below). | 54 | file can be created by using the B<-export> option (see below). |
| 54 | 55 | ||
| 55 | =head1 PARSING OPTIONS | 56 | =head1 PARSING OPTIONS |
| @@ -63,25 +64,25 @@ by default. | |||
| 63 | 64 | ||
| 64 | =item B<-out filename> | 65 | =item B<-out filename> |
| 65 | 66 | ||
| 66 | The filename to write certificates and private keys to, standard output by default. | 67 | The filename to write certificates and private keys to, standard output by |
| 67 | They are all written in PEM format. | 68 | default. They are all written in PEM format. |
| 68 | 69 | ||
| 69 | =item B<-pass arg>, B<-passin arg> | 70 | =item B<-pass arg>, B<-passin arg> |
| 70 | 71 | ||
| 71 | the PKCS#12 file (i.e. input file) password source. For more information about the | 72 | the PKCS#12 file (i.e. input file) password source. For more information about |
| 72 | format of B<arg> see the B<PASS PHRASE ARGUMENTS> section in | 73 | the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section in |
| 73 | L<openssl(1)|openssl(1)>. | 74 | L<openssl(1)|openssl(1)>. |
| 74 | 75 | ||
| 75 | =item B<-passout arg> | 76 | =item B<-passout arg> |
| 76 | 77 | ||
| 77 | pass phrase source to encrypt any outputed private keys with. For more information | 78 | pass phrase source to encrypt any outputed private keys with. For more |
| 78 | about the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section in | 79 | information about the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section |
| 79 | L<openssl(1)|openssl(1)>. | 80 | in L<openssl(1)|openssl(1)>. |
| 80 | 81 | ||
| 81 | =item B<-noout> | 82 | =item B<-noout> |
| 82 | 83 | ||
| 83 | this option inhibits output of the keys and certificates to the output file version | 84 | this option inhibits output of the keys and certificates to the output file |
| 84 | of the PKCS#12 file. | 85 | version of the PKCS#12 file. |
| 85 | 86 | ||
| 86 | =item B<-clcerts> | 87 | =item B<-clcerts> |
| 87 | 88 | ||
| @@ -116,6 +117,14 @@ use triple DES to encrypt private keys before outputting, this is the default. | |||
| 116 | 117 | ||
| 117 | use IDEA to encrypt private keys before outputting. | 118 | use IDEA to encrypt private keys before outputting. |
| 118 | 119 | ||
| 120 | =item B<-aes128>, B<-aes192>, B<-aes256> | ||
| 121 | |||
| 122 | use AES to encrypt private keys before outputting. | ||
| 123 | |||
| 124 | =item B<-camellia128>, B<-camellia192>, B<-camellia256> | ||
| 125 | |||
| 126 | use Camellia to encrypt private keys before outputting. | ||
| 127 | |||
| 119 | =item B<-nodes> | 128 | =item B<-nodes> |
| 120 | 129 | ||
| 121 | don't encrypt the private keys at all. | 130 | don't encrypt the private keys at all. |
| @@ -148,10 +157,10 @@ by default. | |||
| 148 | 157 | ||
| 149 | =item B<-in filename> | 158 | =item B<-in filename> |
| 150 | 159 | ||
| 151 | The filename to read certificates and private keys from, standard input by default. | 160 | The filename to read certificates and private keys from, standard input by |
| 152 | They must all be in PEM format. The order doesn't matter but one private key and | 161 | default. They must all be in PEM format. The order doesn't matter but one |
| 153 | its corresponding certificate should be present. If additional certificates are | 162 | private key and its corresponding certificate should be present. If additional |
| 154 | present they will also be included in the PKCS#12 file. | 163 | certificates are present they will also be included in the PKCS#12 file. |
| 155 | 164 | ||
| 156 | =item B<-inkey filename> | 165 | =item B<-inkey filename> |
| 157 | 166 | ||
| @@ -160,8 +169,8 @@ in the input file. | |||
| 160 | 169 | ||
| 161 | =item B<-name friendlyname> | 170 | =item B<-name friendlyname> |
| 162 | 171 | ||
| 163 | This specifies the "friendly name" for the certificate and private key. This name | 172 | This specifies the "friendly name" for the certificate and private key. This |
| 164 | is typically displayed in list boxes by software importing the file. | 173 | name is typically displayed in list boxes by software importing the file. |
| 165 | 174 | ||
| 166 | =item B<-certfile filename> | 175 | =item B<-certfile filename> |
| 167 | 176 | ||
| @@ -201,9 +210,11 @@ key is encrypted using triple DES and the certificate using 40 bit RC2. | |||
| 201 | =item B<-keypbe alg>, B<-certpbe alg> | 210 | =item B<-keypbe alg>, B<-certpbe alg> |
| 202 | 211 | ||
| 203 | these options allow the algorithm used to encrypt the private key and | 212 | these options allow the algorithm used to encrypt the private key and |
| 204 | certificates to be selected. Although any PKCS#5 v1.5 or PKCS#12 algorithms | 213 | certificates to be selected. Any PKCS#5 v1.5 or PKCS#12 PBE algorithm name |
| 205 | can be selected it is advisable only to use PKCS#12 algorithms. See the list | 214 | can be used (see B<NOTES> section for more information). If a a cipher name |
| 206 | in the B<NOTES> section for more information. | 215 | (as output by the B<list-cipher-algorithms> command is specified then it |
| 216 | is used with PKCS#5 v2.0. For interoperability reasons it is advisable to only | ||
| 217 | use PKCS#12 algorithms. | ||
| 207 | 218 | ||
| 208 | =item B<-keyex|-keysig> | 219 | =item B<-keyex|-keysig> |
| 209 | 220 | ||
| @@ -216,6 +227,10 @@ S/MIME signing, authenticode (ActiveX control signing) and SSL client | |||
| 216 | authentication, however due to a bug only MSIE 5.0 and later support | 227 | authentication, however due to a bug only MSIE 5.0 and later support |
| 217 | the use of signing only keys for SSL client authentication. | 228 | the use of signing only keys for SSL client authentication. |
| 218 | 229 | ||
| 230 | =item B<-macalg digest> | ||
| 231 | |||
| 232 | specify the MAC digest algorithm. If not included them SHA1 will be used. | ||
| 233 | |||
| 219 | =item B<-nomaciter>, B<-noiter> | 234 | =item B<-nomaciter>, B<-noiter> |
| 220 | 235 | ||
| 221 | these options affect the iteration counts on the MAC and key algorithms. | 236 | these options affect the iteration counts on the MAC and key algorithms. |
| @@ -239,6 +254,10 @@ option. | |||
| 239 | This option is included for compatibility with previous versions, it used | 254 | This option is included for compatibility with previous versions, it used |
| 240 | to be needed to use MAC iterations counts but they are now used by default. | 255 | to be needed to use MAC iterations counts but they are now used by default. |
| 241 | 256 | ||
| 257 | =item B<-nomac> | ||
| 258 | |||
| 259 | don't attempt to provide the MAC integrity. | ||
| 260 | |||
| 242 | =item B<-rand file(s)> | 261 | =item B<-rand file(s)> |
| 243 | 262 | ||
| 244 | a file or files containing random data used to seed the random number | 263 | a file or files containing random data used to seed the random number |
| @@ -247,6 +266,20 @@ Multiple files can be specified separated by a OS-dependent character. | |||
| 247 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for | 266 | The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for |
| 248 | all others. | 267 | all others. |
| 249 | 268 | ||
| 269 | =item B<-CAfile file> | ||
| 270 | |||
| 271 | CA storage as a file. | ||
| 272 | |||
| 273 | =item B<-CApath dir> | ||
| 274 | |||
| 275 | CA storage as a directory. This directory must be a standard certificate | ||
| 276 | directory: that is a hash of each subject name (using B<x509 -hash>) should be | ||
| 277 | linked to each certificate. | ||
| 278 | |||
| 279 | =item B<-CSP name> | ||
| 280 | |||
| 281 | write B<name> as a Microsoft CSP name. | ||
| 282 | |||
| 250 | =back | 283 | =back |
| 251 | 284 | ||
| 252 | =head1 NOTES | 285 | =head1 NOTES |
diff --git a/src/lib/libssl/src/doc/apps/pkcs7.pod b/src/lib/libssl/src/doc/apps/pkcs7.pod index a0a636328b..acfb8100f0 100644 --- a/src/lib/libssl/src/doc/apps/pkcs7.pod +++ b/src/lib/libssl/src/doc/apps/pkcs7.pod | |||
| @@ -62,7 +62,7 @@ is B<-print_certs> is set). | |||
| 62 | 62 | ||
| 63 | =item B<-engine id> | 63 | =item B<-engine id> |
| 64 | 64 | ||
| 65 | specifying an engine (by it's unique B<id> string) will cause B<req> | 65 | specifying an engine (by its unique B<id> string) will cause B<pkcs7> |
| 66 | to attempt to obtain a functional reference to the specified engine, | 66 | to attempt to obtain a functional reference to the specified engine, |
| 67 | thus initialising it if needed. The engine will then be set as the default | 67 | thus initialising it if needed. The engine will then be set as the default |
| 68 | for all available algorithms. | 68 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/pkcs8.pod b/src/lib/libssl/src/doc/apps/pkcs8.pod index 68ecd65b10..84abee78f3 100644 --- a/src/lib/libssl/src/doc/apps/pkcs8.pod +++ b/src/lib/libssl/src/doc/apps/pkcs8.pod | |||
| @@ -125,7 +125,7 @@ list of possible algorithms is included below. | |||
| 125 | 125 | ||
| 126 | =item B<-engine id> | 126 | =item B<-engine id> |
| 127 | 127 | ||
| 128 | specifying an engine (by it's unique B<id> string) will cause B<req> | 128 | specifying an engine (by its unique B<id> string) will cause B<pkcs8> |
| 129 | to attempt to obtain a functional reference to the specified engine, | 129 | to attempt to obtain a functional reference to the specified engine, |
| 130 | thus initialising it if needed. The engine will then be set as the default | 130 | thus initialising it if needed. The engine will then be set as the default |
| 131 | for all available algorithms. | 131 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/req.pod b/src/lib/libssl/src/doc/apps/req.pod index 82b565c9d4..ff48bbdf28 100644 --- a/src/lib/libssl/src/doc/apps/req.pod +++ b/src/lib/libssl/src/doc/apps/req.pod | |||
| @@ -22,12 +22,13 @@ B<openssl> B<req> | |||
| 22 | [B<-new>] | 22 | [B<-new>] |
| 23 | [B<-rand file(s)>] | 23 | [B<-rand file(s)>] |
| 24 | [B<-newkey rsa:bits>] | 24 | [B<-newkey rsa:bits>] |
| 25 | [B<-newkey dsa:file>] | 25 | [B<-newkey alg:file>] |
| 26 | [B<-nodes>] | 26 | [B<-nodes>] |
| 27 | [B<-key filename>] | 27 | [B<-key filename>] |
| 28 | [B<-keyform PEM|DER>] | 28 | [B<-keyform PEM|DER>] |
| 29 | [B<-keyout filename>] | 29 | [B<-keyout filename>] |
| 30 | [B<-[md5|sha1|md2|mdc2]>] | 30 | [B<-keygen_engine id>] |
| 31 | [B<-[digest]>] | ||
| 31 | [B<-config filename>] | 32 | [B<-config filename>] |
| 32 | [B<-subj arg>] | 33 | [B<-subj arg>] |
| 33 | [B<-multivalue-rdn>] | 34 | [B<-multivalue-rdn>] |
| @@ -35,11 +36,15 @@ B<openssl> B<req> | |||
| 35 | [B<-days n>] | 36 | [B<-days n>] |
| 36 | [B<-set_serial n>] | 37 | [B<-set_serial n>] |
| 37 | [B<-asn1-kludge>] | 38 | [B<-asn1-kludge>] |
| 39 | [B<-no-asn1-kludge>] | ||
| 38 | [B<-newhdr>] | 40 | [B<-newhdr>] |
| 39 | [B<-extensions section>] | 41 | [B<-extensions section>] |
| 40 | [B<-reqexts section>] | 42 | [B<-reqexts section>] |
| 41 | [B<-utf8>] | 43 | [B<-utf8>] |
| 42 | [B<-nameopt>] | 44 | [B<-nameopt>] |
| 45 | [B<-reqopt>] | ||
| 46 | [B<-subject>] | ||
| 47 | [B<-subj arg>] | ||
| 43 | [B<-batch>] | 48 | [B<-batch>] |
| 44 | [B<-verbose>] | 49 | [B<-verbose>] |
| 45 | [B<-engine id>] | 50 | [B<-engine id>] |
| @@ -91,6 +96,11 @@ see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>. | |||
| 91 | 96 | ||
| 92 | prints out the certificate request in text form. | 97 | prints out the certificate request in text form. |
| 93 | 98 | ||
| 99 | =item B<-subject> | ||
| 100 | |||
| 101 | prints out the request subject (or certificate subject if B<-x509> is | ||
| 102 | specified) | ||
| 103 | |||
| 94 | =item B<-pubkey> | 104 | =item B<-pubkey> |
| 95 | 105 | ||
| 96 | outputs the public key. | 106 | outputs the public key. |
| @@ -118,6 +128,13 @@ in the configuration file and any requested extensions. | |||
| 118 | If the B<-key> option is not used it will generate a new RSA private | 128 | If the B<-key> option is not used it will generate a new RSA private |
| 119 | key using information specified in the configuration file. | 129 | key using information specified in the configuration file. |
| 120 | 130 | ||
| 131 | =item B<-subj arg> | ||
| 132 | |||
| 133 | Replaces subject field of input request with specified data and outputs | ||
| 134 | modified request. The arg must be formatted as | ||
| 135 | I</type0=value0/type1=value1/type2=...>, | ||
| 136 | characters may be escaped by \ (backslash), no spaces are skipped. | ||
| 137 | |||
| 121 | =item B<-rand file(s)> | 138 | =item B<-rand file(s)> |
| 122 | 139 | ||
| 123 | a file or files containing random data used to seed the random number | 140 | a file or files containing random data used to seed the random number |
| @@ -129,10 +146,35 @@ all others. | |||
| 129 | =item B<-newkey arg> | 146 | =item B<-newkey arg> |
| 130 | 147 | ||
| 131 | this option creates a new certificate request and a new private | 148 | this option creates a new certificate request and a new private |
| 132 | key. The argument takes one of two forms. B<rsa:nbits>, where | 149 | key. The argument takes one of several forms. B<rsa:nbits>, where |
| 133 | B<nbits> is the number of bits, generates an RSA key B<nbits> | 150 | B<nbits> is the number of bits, generates an RSA key B<nbits> |
| 134 | in size. B<dsa:filename> generates a DSA key using the parameters | 151 | in size. If B<nbits> is omitted, i.e. B<-newkey rsa> specified, |
| 135 | in the file B<filename>. | 152 | the default key size, specified in the configuration file is used. |
| 153 | |||
| 154 | All other algorithms support the B<-newkey alg:file> form, where file may be | ||
| 155 | an algorithm parameter file, created by the B<genpkey -genparam> command | ||
| 156 | or and X.509 certificate for a key with approriate algorithm. | ||
| 157 | |||
| 158 | B<param:file> generates a key using the parameter file or certificate B<file>, | ||
| 159 | the algorithm is determined by the parameters. B<algname:file> use algorithm | ||
| 160 | B<algname> and parameter file B<file>: the two algorithms must match or an | ||
| 161 | error occurs. B<algname> just uses algorithm B<algname>, and parameters, | ||
| 162 | if neccessary should be specified via B<-pkeyopt> parameter. | ||
| 163 | |||
| 164 | B<dsa:filename> generates a DSA key using the parameters | ||
| 165 | in the file B<filename>. B<ec:filename> generates EC key (usable both with | ||
| 166 | ECDSA or ECDH algorithms), B<gost2001:filename> generates GOST R | ||
| 167 | 34.10-2001 key (requires B<ccgost> engine configured in the configuration | ||
| 168 | file). If just B<gost2001> is specified a parameter set should be | ||
| 169 | specified by B<-pkeyopt paramset:X> | ||
| 170 | |||
| 171 | |||
| 172 | =item B<-pkeyopt opt:value> | ||
| 173 | |||
| 174 | set the public key algorithm option B<opt> to B<value>. The precise set of | ||
| 175 | options supported depends on the public key algorithm used and its | ||
| 176 | implementation. See B<KEY GENERATION OPTIONS> in the B<genpkey> manual page | ||
| 177 | for more details. | ||
| 136 | 178 | ||
| 137 | =item B<-key filename> | 179 | =item B<-key filename> |
| 138 | 180 | ||
| @@ -155,11 +197,15 @@ configuration file is used. | |||
| 155 | if this option is specified then if a private key is created it | 197 | if this option is specified then if a private key is created it |
| 156 | will not be encrypted. | 198 | will not be encrypted. |
| 157 | 199 | ||
| 158 | =item B<-[md5|sha1|md2|mdc2]> | 200 | =item B<-[digest]> |
| 201 | |||
| 202 | this specifies the message digest to sign the request with (such as | ||
| 203 | B<-md5>, B<-sha1>). This overrides the digest algorithm specified in | ||
| 204 | the configuration file. | ||
| 159 | 205 | ||
| 160 | this specifies the message digest to sign the request with. This | 206 | Some public key algorithms may override this choice. For instance, DSA |
| 161 | overrides the digest algorithm specified in the configuration file. | 207 | signatures always use SHA1, GOST R 34.10 signatures always use |
| 162 | This option is ignored for DSA requests: they always use SHA1. | 208 | GOST R 34.11-94 (B<-md_gost94>). |
| 163 | 209 | ||
| 164 | =item B<-config filename> | 210 | =item B<-config filename> |
| 165 | 211 | ||
| @@ -227,6 +273,15 @@ B<option> argument can be a single option or multiple options separated by | |||
| 227 | commas. Alternatively the B<-nameopt> switch may be used more than once to | 273 | commas. Alternatively the B<-nameopt> switch may be used more than once to |
| 228 | set multiple options. See the L<x509(1)|x509(1)> manual page for details. | 274 | set multiple options. See the L<x509(1)|x509(1)> manual page for details. |
| 229 | 275 | ||
| 276 | =item B<-reqopt> | ||
| 277 | |||
| 278 | customise the output format used with B<-text>. The B<option> argument can be | ||
| 279 | a single option or multiple options separated by commas. | ||
| 280 | |||
| 281 | See discission of the B<-certopt> parameter in the L<B<x509>|x509(1)> | ||
| 282 | command. | ||
| 283 | |||
| 284 | |||
| 230 | =item B<-asn1-kludge> | 285 | =item B<-asn1-kludge> |
| 231 | 286 | ||
| 232 | by default the B<req> command outputs certificate requests containing | 287 | by default the B<req> command outputs certificate requests containing |
| @@ -242,6 +297,10 @@ B<SET OF> whereas the correct form does. | |||
| 242 | 297 | ||
| 243 | It should be noted that very few CAs still require the use of this option. | 298 | It should be noted that very few CAs still require the use of this option. |
| 244 | 299 | ||
| 300 | =item B<-no-asn1-kludge> | ||
| 301 | |||
| 302 | Reverses effect of B<-asn1-kludge> | ||
| 303 | |||
| 245 | =item B<-newhdr> | 304 | =item B<-newhdr> |
| 246 | 305 | ||
| 247 | Adds the word B<NEW> to the PEM file header and footer lines on the outputed | 306 | Adds the word B<NEW> to the PEM file header and footer lines on the outputed |
| @@ -257,11 +316,16 @@ print extra details about the operations being performed. | |||
| 257 | 316 | ||
| 258 | =item B<-engine id> | 317 | =item B<-engine id> |
| 259 | 318 | ||
| 260 | specifying an engine (by it's unique B<id> string) will cause B<req> | 319 | specifying an engine (by its unique B<id> string) will cause B<req> |
| 261 | to attempt to obtain a functional reference to the specified engine, | 320 | to attempt to obtain a functional reference to the specified engine, |
| 262 | thus initialising it if needed. The engine will then be set as the default | 321 | thus initialising it if needed. The engine will then be set as the default |
| 263 | for all available algorithms. | 322 | for all available algorithms. |
| 264 | 323 | ||
| 324 | =item B<-keygen_engine id> | ||
| 325 | |||
| 326 | specifies an engine (by its unique B<id> string) which would be used | ||
| 327 | for key generation operations. | ||
| 328 | |||
| 265 | =back | 329 | =back |
| 266 | 330 | ||
| 267 | =head1 CONFIGURATION FILE FORMAT | 331 | =head1 CONFIGURATION FILE FORMAT |
| @@ -344,7 +408,9 @@ problems with BMPStrings and UTF8Strings: in particular Netscape. | |||
| 344 | 408 | ||
| 345 | this specifies the configuration file section containing a list of | 409 | this specifies the configuration file section containing a list of |
| 346 | extensions to add to the certificate request. It can be overridden | 410 | extensions to add to the certificate request. It can be overridden |
| 347 | by the B<-reqexts> command line switch. | 411 | by the B<-reqexts> command line switch. See the |
| 412 | L<x509v3_config(5)|x509v3_config(5)> manual page for details of the | ||
| 413 | extension section format. | ||
| 348 | 414 | ||
| 349 | =item B<x509_extensions> | 415 | =item B<x509_extensions> |
| 350 | 416 | ||
| @@ -606,6 +672,7 @@ address in subjectAltName should be input by the user. | |||
| 606 | =head1 SEE ALSO | 672 | =head1 SEE ALSO |
| 607 | 673 | ||
| 608 | L<x509(1)|x509(1)>, L<ca(1)|ca(1)>, L<genrsa(1)|genrsa(1)>, | 674 | L<x509(1)|x509(1)>, L<ca(1)|ca(1)>, L<genrsa(1)|genrsa(1)>, |
| 609 | L<gendsa(1)|gendsa(1)>, L<config(5)|config(5)> | 675 | L<gendsa(1)|gendsa(1)>, L<config(5)|config(5)>, |
| 676 | L<x509v3_config(5)|x509v3_config(5)> | ||
| 610 | 677 | ||
| 611 | =cut | 678 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/rsa.pod b/src/lib/libssl/src/doc/apps/rsa.pod index 4d7640995e..69b2bef82c 100644 --- a/src/lib/libssl/src/doc/apps/rsa.pod +++ b/src/lib/libssl/src/doc/apps/rsa.pod | |||
| @@ -120,7 +120,7 @@ the input is a public key. | |||
| 120 | 120 | ||
| 121 | =item B<-engine id> | 121 | =item B<-engine id> |
| 122 | 122 | ||
| 123 | specifying an engine (by it's unique B<id> string) will cause B<req> | 123 | specifying an engine (by its unique B<id> string) will cause B<rsa> |
| 124 | to attempt to obtain a functional reference to the specified engine, | 124 | to attempt to obtain a functional reference to the specified engine, |
| 125 | thus initialising it if needed. The engine will then be set as the default | 125 | thus initialising it if needed. The engine will then be set as the default |
| 126 | for all available algorithms. | 126 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/s_client.pod b/src/lib/libssl/src/doc/apps/s_client.pod index c44d357cf7..4ebf7b5854 100644 --- a/src/lib/libssl/src/doc/apps/s_client.pod +++ b/src/lib/libssl/src/doc/apps/s_client.pod | |||
| @@ -101,6 +101,11 @@ also used when building the client certificate chain. | |||
| 101 | A file containing trusted certificates to use during server authentication | 101 | A file containing trusted certificates to use during server authentication |
| 102 | and to use when attempting to build the client certificate chain. | 102 | and to use when attempting to build the client certificate chain. |
| 103 | 103 | ||
| 104 | =item B<-purpose, -ignore_critical, -issuer_checks, -crl_check, -crl_check_all, -policy_check, -extended_crl, -x509_strict, -policy -check_ss_sig> | ||
| 105 | |||
| 106 | Set various certificate chain valiadition option. See the | ||
| 107 | L<B<verify>|verify(1)> manual page for details. | ||
| 108 | |||
| 104 | =item B<-reconnect> | 109 | =item B<-reconnect> |
| 105 | 110 | ||
| 106 | reconnects to the same server 5 times using the same session ID, this can | 111 | reconnects to the same server 5 times using the same session ID, this can |
| @@ -161,6 +166,16 @@ input. | |||
| 161 | inhibit printing of session and certificate information. This implicitly | 166 | inhibit printing of session and certificate information. This implicitly |
| 162 | turns on B<-ign_eof> as well. | 167 | turns on B<-ign_eof> as well. |
| 163 | 168 | ||
| 169 | =item B<-psk_identity identity> | ||
| 170 | |||
| 171 | Use the PSK identity B<identity> when using a PSK cipher suite. | ||
| 172 | |||
| 173 | =item B<-psk key> | ||
| 174 | |||
| 175 | Use the PSK key B<key> when using a PSK cipher suite. The key is | ||
| 176 | given as a hexadecimal number without leading 0x, for example -psk | ||
| 177 | 1a2b3c4d. | ||
| 178 | |||
| 164 | =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> | 179 | =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> |
| 165 | 180 | ||
| 166 | these options disable the use of certain SSL or TLS protocols. By default | 181 | these options disable the use of certain SSL or TLS protocols. By default |
| @@ -192,14 +207,11 @@ supported keywords are "smtp", "pop3", "imap", and "ftp". | |||
| 192 | 207 | ||
| 193 | =item B<-tlsextdebug> | 208 | =item B<-tlsextdebug> |
| 194 | 209 | ||
| 195 | print out a hex dump of any TLS extensions received from the server. Note: this | 210 | print out a hex dump of any TLS extensions received from the server. |
| 196 | option is only available if extension support is explicitly enabled at compile | ||
| 197 | time | ||
| 198 | 211 | ||
| 199 | =item B<-no_ticket> | 212 | =item B<-no_ticket> |
| 200 | 213 | ||
| 201 | disable RFC4507bis session ticket support. Note: this option is only available | 214 | disable RFC4507bis session ticket support. |
| 202 | if extension support is explicitly enabled at compile time | ||
| 203 | 215 | ||
| 204 | =item B<-sess_out filename> | 216 | =item B<-sess_out filename> |
| 205 | 217 | ||
| @@ -212,7 +224,7 @@ connection from this session. | |||
| 212 | 224 | ||
| 213 | =item B<-engine id> | 225 | =item B<-engine id> |
| 214 | 226 | ||
| 215 | specifying an engine (by it's unique B<id> string) will cause B<s_client> | 227 | specifying an engine (by its unique B<id> string) will cause B<s_client> |
| 216 | to attempt to obtain a functional reference to the specified engine, | 228 | to attempt to obtain a functional reference to the specified engine, |
| 217 | thus initialising it if needed. The engine will then be set as the default | 229 | thus initialising it if needed. The engine will then be set as the default |
| 218 | for all available algorithms. | 230 | for all available algorithms. |
| @@ -274,9 +286,6 @@ Since the SSLv23 client hello cannot include compression methods or extensions | |||
| 274 | these will only be supported if its use is disabled, for example by using the | 286 | these will only be supported if its use is disabled, for example by using the |
| 275 | B<-no_sslv2> option. | 287 | B<-no_sslv2> option. |
| 276 | 288 | ||
| 277 | TLS extensions are only supported in OpenSSL 0.9.8 if they are explictly | ||
| 278 | enabled at compile time using for example the B<enable-tlsext> switch. | ||
| 279 | |||
| 280 | =head1 BUGS | 289 | =head1 BUGS |
| 281 | 290 | ||
| 282 | Because this program has a lot of options and also because some of | 291 | Because this program has a lot of options and also because some of |
diff --git a/src/lib/libssl/src/doc/apps/s_server.pod b/src/lib/libssl/src/doc/apps/s_server.pod index fdcc170e28..3e503e17e1 100644 --- a/src/lib/libssl/src/doc/apps/s_server.pod +++ b/src/lib/libssl/src/doc/apps/s_server.pod | |||
| @@ -191,6 +191,16 @@ this option translated a line feed from the terminal into CR+LF. | |||
| 191 | 191 | ||
| 192 | inhibit printing of session and certificate information. | 192 | inhibit printing of session and certificate information. |
| 193 | 193 | ||
| 194 | =item B<-psk_hint hint> | ||
| 195 | |||
| 196 | Use the PSK identity hint B<hint> when using a PSK cipher suite. | ||
| 197 | |||
| 198 | =item B<-psk key> | ||
| 199 | |||
| 200 | Use the PSK key B<key> when using a PSK cipher suite. The key is | ||
| 201 | given as a hexadecimal number without leading 0x, for example -psk | ||
| 202 | 1a2b3c4d. | ||
| 203 | |||
| 194 | =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> | 204 | =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1> |
| 195 | 205 | ||
| 196 | these options disable the use of certain SSL or TLS protocols. By default | 206 | these options disable the use of certain SSL or TLS protocols. By default |
| @@ -246,7 +256,7 @@ are part of the HTTP response line and headers must end with CRLF). | |||
| 246 | 256 | ||
| 247 | =item B<-engine id> | 257 | =item B<-engine id> |
| 248 | 258 | ||
| 249 | specifying an engine (by it's unique B<id> string) will cause B<s_server> | 259 | specifying an engine (by its unique B<id> string) will cause B<s_server> |
| 250 | to attempt to obtain a functional reference to the specified engine, | 260 | to attempt to obtain a functional reference to the specified engine, |
| 251 | thus initialising it if needed. The engine will then be set as the default | 261 | thus initialising it if needed. The engine will then be set as the default |
| 252 | for all available algorithms. | 262 | for all available algorithms. |
| @@ -325,9 +335,6 @@ mean any CA is acceptable. This is useful for debugging purposes. | |||
| 325 | 335 | ||
| 326 | The session parameters can printed out using the B<sess_id> program. | 336 | The session parameters can printed out using the B<sess_id> program. |
| 327 | 337 | ||
| 328 | TLS extensions are only supported in OpenSSL 0.9.8 if they are explictly | ||
| 329 | enabled at compile time using for example the B<enable-tlsext> switch. | ||
| 330 | |||
| 331 | =head1 BUGS | 338 | =head1 BUGS |
| 332 | 339 | ||
| 333 | Because this program has a lot of options and also because some of | 340 | Because this program has a lot of options and also because some of |
diff --git a/src/lib/libssl/src/doc/apps/smime.pod b/src/lib/libssl/src/doc/apps/smime.pod index caf2d2689e..42c0733bcb 100644 --- a/src/lib/libssl/src/doc/apps/smime.pod +++ b/src/lib/libssl/src/doc/apps/smime.pod | |||
| @@ -10,19 +10,10 @@ B<openssl> B<smime> | |||
| 10 | [B<-encrypt>] | 10 | [B<-encrypt>] |
| 11 | [B<-decrypt>] | 11 | [B<-decrypt>] |
| 12 | [B<-sign>] | 12 | [B<-sign>] |
| 13 | [B<-resign>] | ||
| 13 | [B<-verify>] | 14 | [B<-verify>] |
| 14 | [B<-pk7out>] | 15 | [B<-pk7out>] |
| 15 | [B<-des>] | 16 | [B<-[cipher]>] |
| 16 | [B<-des3>] | ||
| 17 | [B<-rc2-40>] | ||
| 18 | [B<-rc2-64>] | ||
| 19 | [B<-rc2-128>] | ||
| 20 | [B<-aes128>] | ||
| 21 | [B<-aes192>] | ||
| 22 | [B<-aes256>] | ||
| 23 | [B<-camellia128>] | ||
| 24 | [B<-camellia192>] | ||
| 25 | [B<-camellia256>] | ||
| 26 | [B<-in file>] | 17 | [B<-in file>] |
| 27 | [B<-certfile file>] | 18 | [B<-certfile file>] |
| 28 | [B<-signer file>] | 19 | [B<-signer file>] |
| @@ -37,7 +28,11 @@ B<openssl> B<smime> | |||
| 37 | [B<-from ad>] | 28 | [B<-from ad>] |
| 38 | [B<-subject s>] | 29 | [B<-subject s>] |
| 39 | [B<-text>] | 30 | [B<-text>] |
| 31 | [B<-indef>] | ||
| 32 | [B<-noindef>] | ||
| 33 | [B<-stream>] | ||
| 40 | [B<-rand file(s)>] | 34 | [B<-rand file(s)>] |
| 35 | [B<-md digest>] | ||
| 41 | [cert.pem]... | 36 | [cert.pem]... |
| 42 | 37 | ||
| 43 | =head1 DESCRIPTION | 38 | =head1 DESCRIPTION |
| @@ -47,7 +42,7 @@ verify S/MIME messages. | |||
| 47 | 42 | ||
| 48 | =head1 COMMAND OPTIONS | 43 | =head1 COMMAND OPTIONS |
| 49 | 44 | ||
| 50 | There are five operation options that set the type of operation to be performed. | 45 | There are six operation options that set the type of operation to be performed. |
| 51 | The meaning of the other options varies according to the operation type. | 46 | The meaning of the other options varies according to the operation type. |
| 52 | 47 | ||
| 53 | =over 4 | 48 | =over 4 |
| @@ -78,6 +73,10 @@ the signed data. Both clear text and opaque signing is supported. | |||
| 78 | 73 | ||
| 79 | takes an input message and writes out a PEM encoded PKCS#7 structure. | 74 | takes an input message and writes out a PEM encoded PKCS#7 structure. |
| 80 | 75 | ||
| 76 | =item B<-resign> | ||
| 77 | |||
| 78 | resign a message: take an existing message and one or more new signers. | ||
| 79 | |||
| 81 | =item B<-in filename> | 80 | =item B<-in filename> |
| 82 | 81 | ||
| 83 | the input message to be encrypted or signed or the MIME message to | 82 | the input message to be encrypted or signed or the MIME message to |
| @@ -106,6 +105,21 @@ instead. This currently only affects the output format of the PKCS#7 | |||
| 106 | structure, if no PKCS#7 structure is being output (for example with | 105 | structure, if no PKCS#7 structure is being output (for example with |
| 107 | B<-verify> or B<-decrypt>) this option has no effect. | 106 | B<-verify> or B<-decrypt>) this option has no effect. |
| 108 | 107 | ||
| 108 | =item B<-stream -indef -noindef> | ||
| 109 | |||
| 110 | the B<-stream> and B<-indef> options are equivalent and enable streaming I/O | ||
| 111 | for encoding operations. This permits single pass processing of data without | ||
| 112 | the need to hold the entire contents in memory, potentially supporting very | ||
| 113 | large files. Streaming is automatically set for S/MIME signing with detached | ||
| 114 | data if the output format is B<SMIME> it is currently off by default for all | ||
| 115 | other operations. | ||
| 116 | |||
| 117 | =item B<-noindef> | ||
| 118 | |||
| 119 | disable streaming I/O where it would produce and indefinite length constructed | ||
| 120 | encoding. This option currently has no effect. In future streaming will be | ||
| 121 | enabled by default on all relevant operations and this option will disable it. | ||
| 122 | |||
| 109 | =item B<-content filename> | 123 | =item B<-content filename> |
| 110 | 124 | ||
| 111 | This specifies a file containing the detached content, this is only | 125 | This specifies a file containing the detached content, this is only |
| @@ -132,11 +146,20 @@ B<-verify>. This directory must be a standard certificate directory: that | |||
| 132 | is a hash of each subject name (using B<x509 -hash>) should be linked | 146 | is a hash of each subject name (using B<x509 -hash>) should be linked |
| 133 | to each certificate. | 147 | to each certificate. |
| 134 | 148 | ||
| 135 | =item B<-des -des3 -rc2-40 -rc2-64 -rc2-128 -aes128 -aes192 -aes256 -camellia128 -camellia192 -camellia256> | 149 | =item B<-md digest> |
| 136 | 150 | ||
| 137 | the encryption algorithm to use. DES (56 bits), triple DES (168 bits), | 151 | digest algorithm to use when signing or resigning. If not present then the |
| 138 | 40, 64 or 128 bit RC2, 128, 192 or 256 bit AES, or 128, 192 or 256 bit Camellia respectively. If not | 152 | default digest algorithm for the signing key will be used (usually SHA1). |
| 139 | specified 40 bit RC2 is used. Only used with B<-encrypt>. | 153 | |
| 154 | =item B<-[cipher]> | ||
| 155 | |||
| 156 | the encryption algorithm to use. For example DES (56 bits) - B<-des>, | ||
| 157 | triple DES (168 bits) - B<-des3>, | ||
| 158 | EVP_get_cipherbyname() function) can also be used preceded by a dash, for | ||
| 159 | example B<-aes_128_cbc>. See L<B<enc>|enc(1)> for list of ciphers | ||
| 160 | supported by your version of OpenSSL. | ||
| 161 | |||
| 162 | If not specified 40 bit RC2 is used. Only used with B<-encrypt>. | ||
| 140 | 163 | ||
| 141 | =item B<-nointern> | 164 | =item B<-nointern> |
| 142 | 165 | ||
| @@ -193,9 +216,10 @@ the signers certificates. The certificates should be in PEM format. | |||
| 193 | 216 | ||
| 194 | =item B<-signer file> | 217 | =item B<-signer file> |
| 195 | 218 | ||
| 196 | the signers certificate when signing a message. If a message is | 219 | a signing certificate when signing or resigning a message, this option can be |
| 197 | being verified then the signers certificates will be written to this | 220 | used multiple times if more than one signer is required. If a message is being |
| 198 | file if the verification was successful. | 221 | verified then the signers certificates will be written to this file if the |
| 222 | verification was successful. | ||
| 199 | 223 | ||
| 200 | =item B<-recip file> | 224 | =item B<-recip file> |
| 201 | 225 | ||
| @@ -207,7 +231,8 @@ must match one of the recipients of the message or an error occurs. | |||
| 207 | the private key to use when signing or decrypting. This must match the | 231 | the private key to use when signing or decrypting. This must match the |
| 208 | corresponding certificate. If this option is not specified then the | 232 | corresponding certificate. If this option is not specified then the |
| 209 | private key must be included in the certificate file specified with | 233 | private key must be included in the certificate file specified with |
| 210 | the B<-recip> or B<-signer> file. | 234 | the B<-recip> or B<-signer> file. When signing this option can be used |
| 235 | multiple times to specify successive keys. | ||
| 211 | 236 | ||
| 212 | =item B<-passin arg> | 237 | =item B<-passin arg> |
| 213 | 238 | ||
| @@ -234,6 +259,11 @@ portion of a message so they may be included manually. If signing | |||
| 234 | then many S/MIME mail clients check the signers certificate's email | 259 | then many S/MIME mail clients check the signers certificate's email |
| 235 | address matches that specified in the From: address. | 260 | address matches that specified in the From: address. |
| 236 | 261 | ||
| 262 | =item B<-purpose, -ignore_critical, -issuer_checks, -crl_check, -crl_check_all, -policy_check, -extended_crl, -x509_strict, -policy -check_ss_sig> | ||
| 263 | |||
| 264 | Set various options of certificate chain verification. See | ||
| 265 | L<B<verify>|verify(1)> manual page for details. | ||
| 266 | |||
| 237 | =back | 267 | =back |
| 238 | 268 | ||
| 239 | =head1 NOTES | 269 | =head1 NOTES |
| @@ -261,6 +291,19 @@ The options B<-encrypt> and B<-decrypt> reflect common usage in S/MIME | |||
| 261 | clients. Strictly speaking these process PKCS#7 enveloped data: PKCS#7 | 291 | clients. Strictly speaking these process PKCS#7 enveloped data: PKCS#7 |
| 262 | encrypted data is used for other purposes. | 292 | encrypted data is used for other purposes. |
| 263 | 293 | ||
| 294 | The B<-resign> option uses an existing message digest when adding a new | ||
| 295 | signer. This means that attributes must be present in at least one existing | ||
| 296 | signer using the same message digest or this operation will fail. | ||
| 297 | |||
| 298 | The B<-stream> and B<-indef> options enable experimental streaming I/O support. | ||
| 299 | As a result the encoding is BER using indefinite length constructed encoding | ||
| 300 | and no longer DER. Streaming is supported for the B<-encrypt> operation and the | ||
| 301 | B<-sign> operation if the content is not detached. | ||
| 302 | |||
| 303 | Streaming is always used for the B<-sign> operation with detached data but | ||
| 304 | since the content is no longer part of the PKCS#7 structure the encoding | ||
| 305 | remains DER. | ||
| 306 | |||
| 264 | =head1 EXIT CODES | 307 | =head1 EXIT CODES |
| 265 | 308 | ||
| 266 | =over 4 | 309 | =over 4 |
| @@ -300,7 +343,7 @@ Create a cleartext signed message: | |||
| 300 | openssl smime -sign -in message.txt -text -out mail.msg \ | 343 | openssl smime -sign -in message.txt -text -out mail.msg \ |
| 301 | -signer mycert.pem | 344 | -signer mycert.pem |
| 302 | 345 | ||
| 303 | Create and opaque signed message | 346 | Create an opaque signed message |
| 304 | 347 | ||
| 305 | openssl smime -sign -in message.txt -text -out mail.msg -nodetach \ | 348 | openssl smime -sign -in message.txt -text -out mail.msg -nodetach \ |
| 306 | -signer mycert.pem | 349 | -signer mycert.pem |
| @@ -311,6 +354,11 @@ read the private key from another file: | |||
| 311 | openssl smime -sign -in in.txt -text -out mail.msg \ | 354 | openssl smime -sign -in in.txt -text -out mail.msg \ |
| 312 | -signer mycert.pem -inkey mykey.pem -certfile mycerts.pem | 355 | -signer mycert.pem -inkey mykey.pem -certfile mycerts.pem |
| 313 | 356 | ||
| 357 | Create a signed message with two signers: | ||
| 358 | |||
| 359 | openssl smime -sign -in message.txt -text -out mail.msg \ | ||
| 360 | -signer mycert.pem -signer othercert.pem | ||
| 361 | |||
| 314 | Send a signed message under Unix directly to sendmail, including headers: | 362 | Send a signed message under Unix directly to sendmail, including headers: |
| 315 | 363 | ||
| 316 | openssl smime -sign -in in.txt -text -signer mycert.pem \ | 364 | openssl smime -sign -in in.txt -text -signer mycert.pem \ |
| @@ -334,8 +382,8 @@ Sign and encrypt mail: | |||
| 334 | -from steve@openssl.org -to someone@somewhere \ | 382 | -from steve@openssl.org -to someone@somewhere \ |
| 335 | -subject "Signed and Encrypted message" -des3 user.pem | 383 | -subject "Signed and Encrypted message" -des3 user.pem |
| 336 | 384 | ||
| 337 | Note: the encryption command does not include the B<-text> option because the message | 385 | Note: the encryption command does not include the B<-text> option because the |
| 338 | being encrypted already has MIME headers. | 386 | message being encrypted already has MIME headers. |
| 339 | 387 | ||
| 340 | Decrypt mail: | 388 | Decrypt mail: |
| 341 | 389 | ||
| @@ -361,16 +409,22 @@ Create an encrypted message using 128 bit Camellia: | |||
| 361 | 409 | ||
| 362 | openssl smime -encrypt -in plain.txt -camellia128 -out mail.msg cert.pem | 410 | openssl smime -encrypt -in plain.txt -camellia128 -out mail.msg cert.pem |
| 363 | 411 | ||
| 412 | Add a signer to an existing message: | ||
| 413 | |||
| 414 | openssl smime -resign -in mail.msg -signer newsign.pem -out mail2.msg | ||
| 415 | |||
| 364 | =head1 BUGS | 416 | =head1 BUGS |
| 365 | 417 | ||
| 366 | The MIME parser isn't very clever: it seems to handle most messages that I've thrown | 418 | The MIME parser isn't very clever: it seems to handle most messages that I've |
| 367 | at it but it may choke on others. | 419 | thrown at it but it may choke on others. |
| 368 | 420 | ||
| 369 | The code currently will only write out the signer's certificate to a file: if the | 421 | The code currently will only write out the signer's certificate to a file: if |
| 370 | signer has a separate encryption certificate this must be manually extracted. There | 422 | the signer has a separate encryption certificate this must be manually |
| 371 | should be some heuristic that determines the correct encryption certificate. | 423 | extracted. There should be some heuristic that determines the correct |
| 424 | encryption certificate. | ||
| 372 | 425 | ||
| 373 | Ideally a database should be maintained of a certificates for each email address. | 426 | Ideally a database should be maintained of a certificates for each email |
| 427 | address. | ||
| 374 | 428 | ||
| 375 | The code doesn't currently take note of the permitted symmetric encryption | 429 | The code doesn't currently take note of the permitted symmetric encryption |
| 376 | algorithms as supplied in the SMIMECapabilities signed attribute. this means the | 430 | algorithms as supplied in the SMIMECapabilities signed attribute. this means the |
| @@ -382,4 +436,10 @@ No revocation checking is done on the signer's certificate. | |||
| 382 | The current code can only handle S/MIME v2 messages, the more complex S/MIME v3 | 436 | The current code can only handle S/MIME v2 messages, the more complex S/MIME v3 |
| 383 | structures may cause parsing errors. | 437 | structures may cause parsing errors. |
| 384 | 438 | ||
| 439 | =head1 HISTORY | ||
| 440 | |||
| 441 | The use of multiple B<-signer> options and the B<-resign> command were first | ||
| 442 | added in OpenSSL 1.0.0 | ||
| 443 | |||
| 444 | |||
| 385 | =cut | 445 | =cut |
diff --git a/src/lib/libssl/src/doc/apps/speed.pod b/src/lib/libssl/src/doc/apps/speed.pod index 0dcdba873e..1cd1998d16 100644 --- a/src/lib/libssl/src/doc/apps/speed.pod +++ b/src/lib/libssl/src/doc/apps/speed.pod | |||
| @@ -44,7 +44,7 @@ This command is used to test the performance of cryptographic algorithms. | |||
| 44 | 44 | ||
| 45 | =item B<-engine id> | 45 | =item B<-engine id> |
| 46 | 46 | ||
| 47 | specifying an engine (by it's unique B<id> string) will cause B<speed> | 47 | specifying an engine (by its unique B<id> string) will cause B<speed> |
| 48 | to attempt to obtain a functional reference to the specified engine, | 48 | to attempt to obtain a functional reference to the specified engine, |
| 49 | thus initialising it if needed. The engine will then be set as the default | 49 | thus initialising it if needed. The engine will then be set as the default |
| 50 | for all available algorithms. | 50 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/spkac.pod b/src/lib/libssl/src/doc/apps/spkac.pod index c3f1ff9c64..97fb80e401 100644 --- a/src/lib/libssl/src/doc/apps/spkac.pod +++ b/src/lib/libssl/src/doc/apps/spkac.pod | |||
| @@ -81,7 +81,7 @@ verifies the digital signature on the supplied SPKAC. | |||
| 81 | 81 | ||
| 82 | =item B<-engine id> | 82 | =item B<-engine id> |
| 83 | 83 | ||
| 84 | specifying an engine (by it's unique B<id> string) will cause B<req> | 84 | specifying an engine (by its unique B<id> string) will cause B<spkac> |
| 85 | to attempt to obtain a functional reference to the specified engine, | 85 | to attempt to obtain a functional reference to the specified engine, |
| 86 | thus initialising it if needed. The engine will then be set as the default | 86 | thus initialising it if needed. The engine will then be set as the default |
| 87 | for all available algorithms. | 87 | for all available algorithms. |
diff --git a/src/lib/libssl/src/doc/apps/verify.pod b/src/lib/libssl/src/doc/apps/verify.pod index ff2629d2cf..336098f1e3 100644 --- a/src/lib/libssl/src/doc/apps/verify.pod +++ b/src/lib/libssl/src/doc/apps/verify.pod | |||
| @@ -10,6 +10,18 @@ B<openssl> B<verify> | |||
| 10 | [B<-CApath directory>] | 10 | [B<-CApath directory>] |
| 11 | [B<-CAfile file>] | 11 | [B<-CAfile file>] |
| 12 | [B<-purpose purpose>] | 12 | [B<-purpose purpose>] |
| 13 | [B<-policy arg>] | ||
| 14 | [B<-ignore_critical>] | ||
| 15 | [B<-crl_check>] | ||
| 16 | [B<-crl_check_all>] | ||
| 17 | [B<-policy_check>] | ||
| 18 | [B<-explicit_policy>] | ||
| 19 | [B<-inhibit_any>] | ||
| 20 | [B<-inhibit_map>] | ||
| 21 | [B<-x509_strict>] | ||
| 22 | [B<-extended_crl>] | ||
| 23 | [B<-use_deltas>] | ||
| 24 | [B<-policy_print>] | ||
| 13 | [B<-untrusted file>] | 25 | [B<-untrusted file>] |
| 14 | [B<-help>] | 26 | [B<-help>] |
| 15 | [B<-issuer_checks>] | 27 | [B<-issuer_checks>] |
| @@ -66,6 +78,68 @@ certificate was rejected. However the presence of rejection messages | |||
| 66 | does not itself imply that anything is wrong: during the normal | 78 | does not itself imply that anything is wrong: during the normal |
| 67 | verify process several rejections may take place. | 79 | verify process several rejections may take place. |
| 68 | 80 | ||
| 81 | =item B<-policy arg> | ||
| 82 | |||
| 83 | Enable policy processing and add B<arg> to the user-initial-policy-set | ||
| 84 | (see RFC3280 et al). The policy B<arg> can be an object name an OID in numeric | ||
| 85 | form. This argument can appear more than once. | ||
| 86 | |||
| 87 | =item B<-policy_check> | ||
| 88 | |||
| 89 | Enables certificate policy processing. | ||
| 90 | |||
| 91 | =item B<-explicit_policy> | ||
| 92 | |||
| 93 | Set policy variable require-explicit-policy (see RFC3280 et al). | ||
| 94 | |||
| 95 | =item B<-inhibit_any> | ||
| 96 | |||
| 97 | Set policy variable inhibit-any-policy (see RFC3280 et al). | ||
| 98 | |||
| 99 | =item B<-inhibit_map> | ||
| 100 | |||
| 101 | Set policy variable inhibit-policy-mapping (see RFC3280 et al). | ||
| 102 | |||
| 103 | =item B<-policy_print> | ||
| 104 | |||
| 105 | Print out diagnostics, related to policy checking | ||
| 106 | |||
| 107 | =item B<-crl_check> | ||
| 108 | |||
| 109 | Checks end entity certificate validity by attempting to lookup a valid CRL. | ||
| 110 | If a valid CRL cannot be found an error occurs. | ||
| 111 | |||
| 112 | =item B<-crl_check_all> | ||
| 113 | |||
| 114 | Checks the validity of B<all> certificates in the chain by attempting | ||
| 115 | to lookup valid CRLs. | ||
| 116 | |||
| 117 | =item B<-ignore_critical> | ||
| 118 | |||
| 119 | Normally if an unhandled critical extension is present which is not | ||
| 120 | supported by OpenSSL the certificate is rejected (as required by | ||
| 121 | RFC3280 et al). If this option is set critical extensions are | ||
| 122 | ignored. | ||
| 123 | |||
| 124 | =item B<-x509_strict> | ||
| 125 | |||
| 126 | Disable workarounds for broken certificates which have to be disabled | ||
| 127 | for strict X.509 compliance. | ||
| 128 | |||
| 129 | =item B<-extended_crl> | ||
| 130 | |||
| 131 | Enable extended CRL features such as indirect CRLs and alternate CRL | ||
| 132 | signing keys. | ||
| 133 | |||
| 134 | =item B<-use_deltas> | ||
| 135 | |||
| 136 | Enable support for delta CRLs. | ||
| 137 | |||
| 138 | =item B<-check_ss_sig> | ||
| 139 | |||
| 140 | Verify the signature on the self-signed root CA. This is disabled by default | ||
| 141 | because it doesn't add any security. | ||
| 142 | |||
| 69 | =item B<-> | 143 | =item B<-> |
| 70 | 144 | ||
| 71 | marks the last option. All arguments following this are assumed to be | 145 | marks the last option. All arguments following this are assumed to be |
| @@ -166,12 +240,12 @@ the operation was successful. | |||
| 166 | 240 | ||
| 167 | =item B<2 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate> | 241 | =item B<2 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate> |
| 168 | 242 | ||
| 169 | the issuer certificate could not be found: this occurs if the issuer certificate | 243 | the issuer certificate of a looked up certificate could not be found. This |
| 170 | of an untrusted certificate cannot be found. | 244 | normally means the list of trusted certificates is not complete. |
| 171 | 245 | ||
| 172 | =item B<3 X509_V_ERR_UNABLE_TO_GET_CRL: unable to get certificate CRL> | 246 | =item B<3 X509_V_ERR_UNABLE_TO_GET_CRL: unable to get certificate CRL> |
| 173 | 247 | ||
| 174 | the CRL of a certificate could not be found. Unused. | 248 | the CRL of a certificate could not be found. |
| 175 | 249 | ||
| 176 | =item B<4 X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: unable to decrypt certificate's signature> | 250 | =item B<4 X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: unable to decrypt certificate's signature> |
| 177 | 251 | ||
| @@ -194,7 +268,7 @@ the signature of the certificate is invalid. | |||
| 194 | 268 | ||
| 195 | =item B<8 X509_V_ERR_CRL_SIGNATURE_FAILURE: CRL signature failure> | 269 | =item B<8 X509_V_ERR_CRL_SIGNATURE_FAILURE: CRL signature failure> |
| 196 | 270 | ||
| 197 | the signature of the certificate is invalid. Unused. | 271 | the signature of the certificate is invalid. |
| 198 | 272 | ||
| 199 | =item B<9 X509_V_ERR_CERT_NOT_YET_VALID: certificate is not yet valid> | 273 | =item B<9 X509_V_ERR_CERT_NOT_YET_VALID: certificate is not yet valid> |
| 200 | 274 | ||
| @@ -206,11 +280,11 @@ the certificate has expired: that is the notAfter date is before the current tim | |||
| 206 | 280 | ||
| 207 | =item B<11 X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid> | 281 | =item B<11 X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid> |
| 208 | 282 | ||
| 209 | the CRL is not yet valid. Unused. | 283 | the CRL is not yet valid. |
| 210 | 284 | ||
| 211 | =item B<12 X509_V_ERR_CRL_HAS_EXPIRED: CRL has expired> | 285 | =item B<12 X509_V_ERR_CRL_HAS_EXPIRED: CRL has expired> |
| 212 | 286 | ||
| 213 | the CRL has expired. Unused. | 287 | the CRL has expired. |
| 214 | 288 | ||
| 215 | =item B<13 X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: format error in certificate's notBefore field> | 289 | =item B<13 X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: format error in certificate's notBefore field> |
| 216 | 290 | ||
| @@ -222,11 +296,11 @@ the certificate notAfter field contains an invalid time. | |||
| 222 | 296 | ||
| 223 | =item B<15 X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: format error in CRL's lastUpdate field> | 297 | =item B<15 X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: format error in CRL's lastUpdate field> |
| 224 | 298 | ||
| 225 | the CRL lastUpdate field contains an invalid time. Unused. | 299 | the CRL lastUpdate field contains an invalid time. |
| 226 | 300 | ||
| 227 | =item B<16 X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: format error in CRL's nextUpdate field> | 301 | =item B<16 X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: format error in CRL's nextUpdate field> |
| 228 | 302 | ||
| 229 | the CRL nextUpdate field contains an invalid time. Unused. | 303 | the CRL nextUpdate field contains an invalid time. |
| 230 | 304 | ||
| 231 | =item B<17 X509_V_ERR_OUT_OF_MEM: out of memory> | 305 | =item B<17 X509_V_ERR_OUT_OF_MEM: out of memory> |
| 232 | 306 | ||
| @@ -244,8 +318,8 @@ be found locally. | |||
| 244 | 318 | ||
| 245 | =item B<20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate> | 319 | =item B<20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate> |
| 246 | 320 | ||
| 247 | the issuer certificate of a locally looked up certificate could not be found. This normally means | 321 | the issuer certificate could not be found: this occurs if the issuer |
| 248 | the list of trusted certificates is not complete. | 322 | certificate of an untrusted certificate cannot be found. |
| 249 | 323 | ||
| 250 | =item B<21 X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate> | 324 | =item B<21 X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate> |
| 251 | 325 | ||
| @@ -258,7 +332,7 @@ the certificate chain length is greater than the supplied maximum depth. Unused. | |||
| 258 | 332 | ||
| 259 | =item B<23 X509_V_ERR_CERT_REVOKED: certificate revoked> | 333 | =item B<23 X509_V_ERR_CERT_REVOKED: certificate revoked> |
| 260 | 334 | ||
| 261 | the certificate has been revoked. Unused. | 335 | the certificate has been revoked. |
| 262 | 336 | ||
| 263 | =item B<24 X509_V_ERR_INVALID_CA: invalid CA certificate> | 337 | =item B<24 X509_V_ERR_INVALID_CA: invalid CA certificate> |
| 264 | 338 | ||
| @@ -321,6 +395,10 @@ the certificates in the file will be recognised. | |||
| 321 | Previous versions of OpenSSL assume certificates with matching subject name are identical and | 395 | Previous versions of OpenSSL assume certificates with matching subject name are identical and |
| 322 | mishandled them. | 396 | mishandled them. |
| 323 | 397 | ||
| 398 | Previous versions of this documentation swapped the meaning of the | ||
| 399 | B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT> and | ||
| 400 | B<20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY> error codes. | ||
| 401 | |||
| 324 | =head1 SEE ALSO | 402 | =head1 SEE ALSO |
| 325 | 403 | ||
| 326 | L<x509(1)|x509(1)> | 404 | L<x509(1)|x509(1)> |
diff --git a/src/lib/libssl/src/doc/apps/x509.pod b/src/lib/libssl/src/doc/apps/x509.pod index f43c175235..3002b08123 100644 --- a/src/lib/libssl/src/doc/apps/x509.pod +++ b/src/lib/libssl/src/doc/apps/x509.pod | |||
| @@ -23,6 +23,7 @@ B<openssl> B<x509> | |||
| 23 | [B<-issuer>] | 23 | [B<-issuer>] |
| 24 | [B<-nameopt option>] | 24 | [B<-nameopt option>] |
| 25 | [B<-email>] | 25 | [B<-email>] |
| 26 | [B<-ocsp_uri>] | ||
| 26 | [B<-startdate>] | 27 | [B<-startdate>] |
| 27 | [B<-enddate>] | 28 | [B<-enddate>] |
| 28 | [B<-purpose>] | 29 | [B<-purpose>] |
| @@ -103,7 +104,7 @@ then this option has no effect: SHA1 is always used with DSA keys. | |||
| 103 | 104 | ||
| 104 | =item B<-engine id> | 105 | =item B<-engine id> |
| 105 | 106 | ||
| 106 | specifying an engine (by it's unique B<id> string) will cause B<req> | 107 | specifying an engine (by its unique B<id> string) will cause B<x509> |
| 107 | to attempt to obtain a functional reference to the specified engine, | 108 | to attempt to obtain a functional reference to the specified engine, |
| 108 | thus initialising it if needed. The engine will then be set as the default | 109 | thus initialising it if needed. The engine will then be set as the default |
| 109 | for all available algorithms. | 110 | for all available algorithms. |
| @@ -157,6 +158,16 @@ outputs the "hash" of the certificate issuer name. | |||
| 157 | 158 | ||
| 158 | synonym for "-subject_hash" for backward compatibility reasons. | 159 | synonym for "-subject_hash" for backward compatibility reasons. |
| 159 | 160 | ||
| 161 | =item B<-subject_hash_old> | ||
| 162 | |||
| 163 | outputs the "hash" of the certificate subject name using the older algorithm | ||
| 164 | as used by OpenSSL versions before 1.0.0. | ||
| 165 | |||
| 166 | =item B<-issuer_hash_old> | ||
| 167 | |||
| 168 | outputs the "hash" of the certificate issuer name using the older algorithm | ||
| 169 | as used by OpenSSL versions before 1.0.0. | ||
| 170 | |||
| 160 | =item B<-subject> | 171 | =item B<-subject> |
| 161 | 172 | ||
| 162 | outputs the subject name. | 173 | outputs the subject name. |
| @@ -176,6 +187,10 @@ set multiple options. See the B<NAME OPTIONS> section for more information. | |||
| 176 | 187 | ||
| 177 | outputs the email address(es) if any. | 188 | outputs the email address(es) if any. |
| 178 | 189 | ||
| 190 | =item B<-ocsp_uri> | ||
| 191 | |||
| 192 | outputs the OCSP responder address(es) if any. | ||
| 193 | |||
| 179 | =item B<-startdate> | 194 | =item B<-startdate> |
| 180 | 195 | ||
| 181 | prints out the start date of the certificate, that is the notBefore date. | 196 | prints out the start date of the certificate, that is the notBefore date. |
| @@ -376,7 +391,9 @@ no extensions are added to the certificate. | |||
| 376 | the section to add certificate extensions from. If this option is not | 391 | the section to add certificate extensions from. If this option is not |
| 377 | specified then the extensions should either be contained in the unnamed | 392 | specified then the extensions should either be contained in the unnamed |
| 378 | (default) section or the default section should contain a variable called | 393 | (default) section or the default section should contain a variable called |
| 379 | "extensions" which contains the section to use. | 394 | "extensions" which contains the section to use. See the |
| 395 | L<x509v3_config(5)|x509v3_config(5)> manual page for details of the | ||
| 396 | extension section format. | ||
| 380 | 397 | ||
| 381 | =back | 398 | =back |
| 382 | 399 | ||
| @@ -823,10 +840,17 @@ OpenSSL 0.9.5 and later. | |||
| 823 | =head1 SEE ALSO | 840 | =head1 SEE ALSO |
| 824 | 841 | ||
| 825 | L<req(1)|req(1)>, L<ca(1)|ca(1)>, L<genrsa(1)|genrsa(1)>, | 842 | L<req(1)|req(1)>, L<ca(1)|ca(1)>, L<genrsa(1)|genrsa(1)>, |
| 826 | L<gendsa(1)|gendsa(1)>, L<verify(1)|verify(1)> | 843 | L<gendsa(1)|gendsa(1)>, L<verify(1)|verify(1)>, |
| 844 | L<x509v3_config(5)|x509v3_config(5)> | ||
| 827 | 845 | ||
| 828 | =head1 HISTORY | 846 | =head1 HISTORY |
| 829 | 847 | ||
| 830 | Before OpenSSL 0.9.8, the default digest for RSA keys was MD5. | 848 | Before OpenSSL 0.9.8, the default digest for RSA keys was MD5. |
| 831 | 849 | ||
| 850 | The hash algorithm used in the B<-subject_hash> and B<-issuer_hash> options | ||
| 851 | before OpenSSL 1.0.0 was based on the deprecated MD5 algorithm and the encoding | ||
| 852 | of the distinguished name. In OpenSSL 1.0.0 and later it is based on a | ||
| 853 | canonical version of the DN using SHA1. This means that any directories using | ||
| 854 | the old form must have their links rebuilt using B<c_rehash> or similar. | ||
| 855 | |||
| 832 | =cut | 856 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod b/src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod index 51679bfcd9..9bae40fccf 100644 --- a/src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod +++ b/src/lib/libssl/src/doc/crypto/ASN1_OBJECT_new.pod | |||
| @@ -6,6 +6,8 @@ ASN1_OBJECT_new, ASN1_OBJECT_free, - object allocation functions | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | #include <openssl/asn1.h> | ||
| 10 | |||
| 9 | ASN1_OBJECT *ASN1_OBJECT_new(void); | 11 | ASN1_OBJECT *ASN1_OBJECT_new(void); |
| 10 | void ASN1_OBJECT_free(ASN1_OBJECT *a); | 12 | void ASN1_OBJECT_free(ASN1_OBJECT *a); |
| 11 | 13 | ||
diff --git a/src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod b/src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod index c4ec693f17..a08e9a0fa4 100644 --- a/src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod +++ b/src/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod | |||
| @@ -8,6 +8,8 @@ ASN1_STRING utility functions | |||
| 8 | 8 | ||
| 9 | =head1 SYNOPSIS | 9 | =head1 SYNOPSIS |
| 10 | 10 | ||
| 11 | #include <openssl/asn1.h> | ||
| 12 | |||
| 11 | int ASN1_STRING_length(ASN1_STRING *x); | 13 | int ASN1_STRING_length(ASN1_STRING *x); |
| 12 | unsigned char * ASN1_STRING_data(ASN1_STRING *x); | 14 | unsigned char * ASN1_STRING_data(ASN1_STRING *x); |
| 13 | 15 | ||
diff --git a/src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod b/src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod index 5b1bbb7eb2..8ac2a03ae2 100644 --- a/src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod +++ b/src/lib/libssl/src/doc/crypto/ASN1_STRING_new.pod | |||
| @@ -7,6 +7,8 @@ ASN1_STRING allocation functions | |||
| 7 | 7 | ||
| 8 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 9 | 9 | ||
| 10 | #include <openssl/asn1.h> | ||
| 11 | |||
| 10 | ASN1_STRING * ASN1_STRING_new(void); | 12 | ASN1_STRING * ASN1_STRING_new(void); |
| 11 | ASN1_STRING * ASN1_STRING_type_new(int type); | 13 | ASN1_STRING * ASN1_STRING_type_new(int type); |
| 12 | void ASN1_STRING_free(ASN1_STRING *a); | 14 | void ASN1_STRING_free(ASN1_STRING *a); |
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod b/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod index c9093c6a57..c0dccf1abe 100644 --- a/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod +++ b/src/lib/libssl/src/doc/crypto/BIO_f_buffer.pod | |||
| @@ -31,7 +31,7 @@ BIO_get_buffer_num_lines() returns the number of lines currently buffered. | |||
| 31 | 31 | ||
| 32 | BIO_set_read_buffer_size(), BIO_set_write_buffer_size() and BIO_set_buffer_size() | 32 | BIO_set_read_buffer_size(), BIO_set_write_buffer_size() and BIO_set_buffer_size() |
| 33 | set the read, write or both read and write buffer sizes to B<size>. The initial | 33 | set the read, write or both read and write buffer sizes to B<size>. The initial |
| 34 | buffer size is DEFAULT_BUFFER_SIZE, currently 1024. Any attempt to reduce the | 34 | buffer size is DEFAULT_BUFFER_SIZE, currently 4096. Any attempt to reduce the |
| 35 | buffer size below DEFAULT_BUFFER_SIZE is ignored. Any buffered data is cleared | 35 | buffer size below DEFAULT_BUFFER_SIZE is ignored. Any buffered data is cleared |
| 36 | when the buffer is resized. | 36 | when the buffer is resized. |
| 37 | 37 | ||
| @@ -66,4 +66,9 @@ there was an error. | |||
| 66 | 66 | ||
| 67 | =head1 SEE ALSO | 67 | =head1 SEE ALSO |
| 68 | 68 | ||
| 69 | TBA | 69 | L<BIO(3)|BIO(3)>, |
| 70 | L<BIO_reset(3)|BIO_reset(3)>, | ||
| 71 | L<BIO_flush(3)|BIO_flush(3)>, | ||
| 72 | L<BIO_pop(3)|BIO_pop(3)>, | ||
| 73 | L<BIO_ctrl(3)|BIO_ctrl(3)>, | ||
| 74 | L<BIO_int_ctrl(3)|BIO_ctrl(3)> | ||
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_md.pod b/src/lib/libssl/src/doc/crypto/BIO_f_md.pod index 0d24083e6d..2cc41f89d2 100644 --- a/src/lib/libssl/src/doc/crypto/BIO_f_md.pod +++ b/src/lib/libssl/src/doc/crypto/BIO_f_md.pod | |||
| @@ -58,6 +58,12 @@ If an application needs to call BIO_gets() or BIO_puts() through | |||
| 58 | a chain containing digest BIOs then this can be done by prepending | 58 | a chain containing digest BIOs then this can be done by prepending |
| 59 | a buffering BIO. | 59 | a buffering BIO. |
| 60 | 60 | ||
| 61 | Before OpenSSL 1.0.0 the call to BIO_get_md_ctx() would only work if the BIO | ||
| 62 | had been initialized for example by calling BIO_set_md() ). In OpenSSL | ||
| 63 | 1.0.0 and later the context is always returned and the BIO is state is set | ||
| 64 | to initialized. This allows applications to initialize the context externally | ||
| 65 | if the standard calls such as BIO_set_md() are not sufficiently flexible. | ||
| 66 | |||
| 61 | =head1 RETURN VALUES | 67 | =head1 RETURN VALUES |
| 62 | 68 | ||
| 63 | BIO_f_md() returns the digest BIO method. | 69 | BIO_f_md() returns the digest BIO method. |
diff --git a/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod b/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod index f0b731731f..bc5861ab34 100644 --- a/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod +++ b/src/lib/libssl/src/doc/crypto/BIO_f_ssl.pod | |||
| @@ -308,6 +308,15 @@ a client and also echoes the request to standard output. | |||
| 308 | 308 | ||
| 309 | BIO_free_all(sbio); | 309 | BIO_free_all(sbio); |
| 310 | 310 | ||
| 311 | =head1 BUGS | ||
| 312 | |||
| 313 | In OpenSSL versions before 1.0.0 the BIO_pop() call was handled incorrectly, | ||
| 314 | the I/O BIO reference count was incorrectly incremented (instead of | ||
| 315 | decremented) and dissociated with the SSL BIO even if the SSL BIO was not | ||
| 316 | explicitly being popped (e.g. a pop higher up the chain). Applications which | ||
| 317 | included workarounds for this bug (e.g. freeing BIOs more than once) should | ||
| 318 | be modified to handle this fix or they may free up an already freed BIO. | ||
| 319 | |||
| 311 | =head1 SEE ALSO | 320 | =head1 SEE ALSO |
| 312 | 321 | ||
| 313 | TBA | 322 | TBA |
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_file.pod b/src/lib/libssl/src/doc/crypto/BIO_s_file.pod index b2a29263f4..188aea347d 100644 --- a/src/lib/libssl/src/doc/crypto/BIO_s_file.pod +++ b/src/lib/libssl/src/doc/crypto/BIO_s_file.pod | |||
| @@ -76,6 +76,10 @@ normally be closed so the BIO_NOCLOSE flag should be set. | |||
| 76 | Because the file BIO calls the underlying stdio functions any quirks | 76 | Because the file BIO calls the underlying stdio functions any quirks |
| 77 | in stdio behaviour will be mirrored by the corresponding BIO. | 77 | in stdio behaviour will be mirrored by the corresponding BIO. |
| 78 | 78 | ||
| 79 | On Windows BIO_new_files reserves for the filename argument to be | ||
| 80 | UTF-8 encoded. In other words if you have to make it work in multi- | ||
| 81 | lingual environment, encode file names in UTF-8. | ||
| 82 | |||
| 79 | =head1 EXAMPLES | 83 | =head1 EXAMPLES |
| 80 | 84 | ||
| 81 | File BIO "hello world": | 85 | File BIO "hello world": |
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_mem.pod b/src/lib/libssl/src/doc/crypto/BIO_s_mem.pod index 19648acfae..8f85e0dcee 100644 --- a/src/lib/libssl/src/doc/crypto/BIO_s_mem.pod +++ b/src/lib/libssl/src/doc/crypto/BIO_s_mem.pod | |||
| @@ -74,7 +74,7 @@ Writes to memory BIOs will always succeed if memory is available: that is | |||
| 74 | their size can grow indefinitely. | 74 | their size can grow indefinitely. |
| 75 | 75 | ||
| 76 | Every read from a read write memory BIO will remove the data just read with | 76 | Every read from a read write memory BIO will remove the data just read with |
| 77 | an internal copy operation, if a BIO contains a lots of data and it is | 77 | an internal copy operation, if a BIO contains a lot of data and it is |
| 78 | read in small chunks the operation can be very slow. The use of a read only | 78 | read in small chunks the operation can be very slow. The use of a read only |
| 79 | memory BIO avoids this problem. If the BIO must be read write then adding | 79 | memory BIO avoids this problem. If the BIO must be read write then adding |
| 80 | a buffering BIO to the chain will speed up the process. | 80 | a buffering BIO to the chain will speed up the process. |
diff --git a/src/lib/libssl/src/doc/crypto/BIO_should_retry.pod b/src/lib/libssl/src/doc/crypto/BIO_should_retry.pod index 539c391272..b6d51f719d 100644 --- a/src/lib/libssl/src/doc/crypto/BIO_should_retry.pod +++ b/src/lib/libssl/src/doc/crypto/BIO_should_retry.pod | |||
| @@ -45,7 +45,7 @@ needs to read data. | |||
| 45 | BIO_should_io_special() is true if some "special" condition, that is a | 45 | BIO_should_io_special() is true if some "special" condition, that is a |
| 46 | reason other than reading or writing is the cause of the condition. | 46 | reason other than reading or writing is the cause of the condition. |
| 47 | 47 | ||
| 48 | BIO_get_retry_reason() returns a mask of the cause of a retry condition | 48 | BIO_retry_type() returns a mask of the cause of a retry condition |
| 49 | consisting of the values B<BIO_FLAGS_READ>, B<BIO_FLAGS_WRITE>, | 49 | consisting of the values B<BIO_FLAGS_READ>, B<BIO_FLAGS_WRITE>, |
| 50 | B<BIO_FLAGS_IO_SPECIAL> though current BIO types will only set one of | 50 | B<BIO_FLAGS_IO_SPECIAL> though current BIO types will only set one of |
| 51 | these. | 51 | these. |
diff --git a/src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod b/src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod index 1bd5bed67d..7409c02aac 100644 --- a/src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod +++ b/src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod | |||
| @@ -6,6 +6,8 @@ CRYPTO_set_ex_data, CRYPTO_get_ex_data - internal application specific data func | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | #include <openssl/crypto.h> | ||
| 10 | |||
| 9 | int CRYPTO_set_ex_data(CRYPTO_EX_DATA *r, int idx, void *arg); | 11 | int CRYPTO_set_ex_data(CRYPTO_EX_DATA *r, int idx, void *arg); |
| 10 | 12 | ||
| 11 | void *CRYPTO_get_ex_data(CRYPTO_EX_DATA *r, int idx); | 13 | void *CRYPTO_get_ex_data(CRYPTO_EX_DATA *r, int idx); |
diff --git a/src/lib/libssl/src/doc/crypto/DSA_get_ex_new_index.pod b/src/lib/libssl/src/doc/crypto/DSA_get_ex_new_index.pod index 4612e708ec..fb6efc1182 100644 --- a/src/lib/libssl/src/doc/crypto/DSA_get_ex_new_index.pod +++ b/src/lib/libssl/src/doc/crypto/DSA_get_ex_new_index.pod | |||
| @@ -6,7 +6,7 @@ DSA_get_ex_new_index, DSA_set_ex_data, DSA_get_ex_data - add application specifi | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | #include <openssl/DSA.h> | 9 | #include <openssl/dsa.h> |
| 10 | 10 | ||
| 11 | int DSA_get_ex_new_index(long argl, void *argp, | 11 | int DSA_get_ex_new_index(long argl, void *argp, |
| 12 | CRYPTO_EX_new *new_func, | 12 | CRYPTO_EX_new *new_func, |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod index 130cd7f60a..5b477ac6ec 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod | |||
| @@ -64,9 +64,9 @@ EVP digest routines | |||
| 64 | 64 | ||
| 65 | The EVP digest routines are a high level interface to message digests. | 65 | The EVP digest routines are a high level interface to message digests. |
| 66 | 66 | ||
| 67 | EVP_MD_CTX_init() initializes digest contet B<ctx>. | 67 | EVP_MD_CTX_init() initializes digest context B<ctx>. |
| 68 | 68 | ||
| 69 | EVP_MD_CTX_create() allocates, initializes and returns a digest contet. | 69 | EVP_MD_CTX_create() allocates, initializes and returns a digest context. |
| 70 | 70 | ||
| 71 | EVP_DigestInit_ex() sets up digest context B<ctx> to use a digest | 71 | EVP_DigestInit_ex() sets up digest context B<ctx> to use a digest |
| 72 | B<type> from ENGINE B<impl>. B<ctx> must be initialized before calling this | 72 | B<type> from ENGINE B<impl>. B<ctx> must be initialized before calling this |
| @@ -102,7 +102,7 @@ the passed context B<ctx> does not have to be initialized, and it always | |||
| 102 | uses the default digest implementation. | 102 | uses the default digest implementation. |
| 103 | 103 | ||
| 104 | EVP_DigestFinal() is similar to EVP_DigestFinal_ex() except the digest | 104 | EVP_DigestFinal() is similar to EVP_DigestFinal_ex() except the digest |
| 105 | contet B<ctx> is automatically cleaned up. | 105 | context B<ctx> is automatically cleaned up. |
| 106 | 106 | ||
| 107 | EVP_MD_CTX_copy() is similar to EVP_MD_CTX_copy_ex() except the destination | 107 | EVP_MD_CTX_copy() is similar to EVP_MD_CTX_copy_ex() except the destination |
| 108 | B<out> does not have to be initialized. | 108 | B<out> does not have to be initialized. |
| @@ -132,7 +132,9 @@ return B<EVP_MD> structures for the MD2, MD5, SHA, SHA1, MDC2 and RIPEMD160 dige | |||
| 132 | algorithms respectively. The associated signature algorithm is RSA in each case. | 132 | algorithms respectively. The associated signature algorithm is RSA in each case. |
| 133 | 133 | ||
| 134 | EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest | 134 | EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest |
| 135 | algorithms but using DSS (DSA) for the signature algorithm. | 135 | algorithms but using DSS (DSA) for the signature algorithm. Note: there is |
| 136 | no need to use these pseudo-digests in OpenSSL 1.0.0 and later, they are | ||
| 137 | however retained for compatibility. | ||
| 136 | 138 | ||
| 137 | EVP_md_null() is a "null" message digest that does nothing: i.e. the hash it | 139 | EVP_md_null() is a "null" message digest that does nothing: i.e. the hash it |
| 138 | returns is of zero length. | 140 | returns is of zero length. |
| @@ -228,12 +230,6 @@ digest name passed on the command line. | |||
| 228 | printf("\n"); | 230 | printf("\n"); |
| 229 | } | 231 | } |
| 230 | 232 | ||
| 231 | =head1 BUGS | ||
| 232 | |||
| 233 | The link between digests and signing algorithms results in a situation where | ||
| 234 | EVP_sha1() must be used with RSA and EVP_dss1() must be used with DSS | ||
| 235 | even though they are identical digests. | ||
| 236 | |||
| 237 | =head1 SEE ALSO | 233 | =head1 SEE ALSO |
| 238 | 234 | ||
| 239 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 235 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, |
| @@ -253,4 +249,11 @@ EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), | |||
| 253 | EVP_dss(), EVP_dss1(), EVP_mdc2() and EVP_ripemd160() were | 249 | EVP_dss(), EVP_dss1(), EVP_mdc2() and EVP_ripemd160() were |
| 254 | changed to return truely const EVP_MD * in OpenSSL 0.9.7. | 250 | changed to return truely const EVP_MD * in OpenSSL 0.9.7. |
| 255 | 251 | ||
| 252 | The link between digests and signing algorithms was fixed in OpenSSL 1.0 and | ||
| 253 | later, so now EVP_sha1() can be used with RSA and DSA, there is no need to | ||
| 254 | use EVP_dss1() any more. | ||
| 255 | |||
| 256 | OpenSSL 1.0 and later does not include the MD2 digest algorithm in the | ||
| 257 | default configuration due to its security weaknesses. | ||
| 258 | |||
| 256 | =cut | 259 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod b/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod new file mode 100644 index 0000000000..e2a2a8c6f8 --- /dev/null +++ b/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | EVP_PKEY_verifyrecover_init, EVP_PKEY_verifyrecover - recover signature using a public key algorithm | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/evp.h> | ||
| 10 | |||
| 11 | int EVP_PKEY_verifyrecover_init(EVP_PKEY_CTX *ctx); | ||
| 12 | int EVP_PKEY_verifyrecover(EVP_PKEY_CTX *ctx, | ||
| 13 | unsigned char *rout, size_t *routlen, | ||
| 14 | const unsigned char *sig, size_t siglen); | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | The EVP_PKEY_verifyrecover_init() function initializes a public key algorithm | ||
| 19 | context using key B<pkey> for a verify recover operation. | ||
| 20 | |||
| 21 | The EVP_PKEY_verifyrecover() function recovers signed data | ||
| 22 | using B<ctx>. The signature is specified using the B<sig> and | ||
| 23 | B<siglen> parameters. If B<rout> is B<NULL> then the maximum size of the output | ||
| 24 | buffer is written to the B<routlen> parameter. If B<rout> is not B<NULL> then | ||
| 25 | before the call the B<routlen> parameter should contain the length of the | ||
| 26 | B<rout> buffer, if the call is successful recovered data is written to | ||
| 27 | B<rout> and the amount of data written to B<routlen>. | ||
| 28 | |||
| 29 | =head1 NOTES | ||
| 30 | |||
| 31 | Normally an application is only interested in whether a signature verification | ||
| 32 | operation is successful in those cases the EVP_verify() function should be | ||
| 33 | used. | ||
| 34 | |||
| 35 | Sometimes however it is useful to obtain the data originally signed using a | ||
| 36 | signing operation. Only certain public key algorithms can recover a signature | ||
| 37 | in this way (for example RSA in PKCS padding mode). | ||
| 38 | |||
| 39 | After the call to EVP_PKEY_verifyrecover_init() algorithm specific control | ||
| 40 | operations can be performed to set any appropriate parameters for the | ||
| 41 | operation. | ||
| 42 | |||
| 43 | The function EVP_PKEY_verifyrecover() can be called more than once on the same | ||
| 44 | context if several operations are performed using the same parameters. | ||
| 45 | |||
| 46 | =head1 RETURN VALUES | ||
| 47 | |||
| 48 | EVP_PKEY_verifyrecover_init() and EVP_PKEY_verifyrecover() return 1 for success | ||
| 49 | and 0 or a negative value for failure. In particular a return value of -2 | ||
| 50 | indicates the operation is not supported by the public key algorithm. | ||
| 51 | |||
| 52 | =head1 EXAMPLE | ||
| 53 | |||
| 54 | Recover digest originally signed using PKCS#1 and SHA256 digest: | ||
| 55 | |||
| 56 | #include <openssl/evp.h> | ||
| 57 | #include <openssl/rsa.h> | ||
| 58 | |||
| 59 | EVP_PKEY_CTX *ctx; | ||
| 60 | unsigned char *rout, *sig; | ||
| 61 | size_t routlen, siglen; | ||
| 62 | EVP_PKEY *verify_key; | ||
| 63 | /* NB: assumes verify_key, sig and siglen are already set up | ||
| 64 | * and that verify_key is an RSA public key | ||
| 65 | */ | ||
| 66 | ctx = EVP_PKEY_CTX_new(verify_key); | ||
| 67 | if (!ctx) | ||
| 68 | /* Error occurred */ | ||
| 69 | if (EVP_PKEY_verifyrecover_init(ctx) <= 0) | ||
| 70 | /* Error */ | ||
| 71 | if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0) | ||
| 72 | /* Error */ | ||
| 73 | if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) <= 0) | ||
| 74 | /* Error */ | ||
| 75 | |||
| 76 | /* Determine buffer length */ | ||
| 77 | if (EVP_PKEY_verifyrecover(ctx, rout, &routlen, sig, siglen) <= 0) | ||
| 78 | /* Error */ | ||
| 79 | |||
| 80 | rout = OPENSSL_malloc(routlen); | ||
| 81 | |||
| 82 | if (!rout) | ||
| 83 | /* malloc failure */ | ||
| 84 | |||
| 85 | if (EVP_PKEY_verifyrecover(ctx, rout, &routlen, sig, siglen) <= 0) | ||
| 86 | /* Error */ | ||
| 87 | |||
| 88 | /* Recovered data is routlen bytes written to buffer rout */ | ||
| 89 | |||
| 90 | =head1 SEE ALSO | ||
| 91 | |||
| 92 | L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>, | ||
| 93 | L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>, | ||
| 94 | L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>, | ||
| 95 | L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, | ||
| 96 | L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, | ||
| 97 | L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)> | ||
| 98 | |||
| 99 | =head1 HISTORY | ||
| 100 | |||
| 101 | These functions were first added to OpenSSL 1.0.0. | ||
| 102 | |||
| 103 | =cut | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod index b6e62ce7f6..620a623ab6 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod | |||
| @@ -77,6 +77,15 @@ will occur. | |||
| 77 | Older versions of this documentation wrongly stated that calls to | 77 | Older versions of this documentation wrongly stated that calls to |
| 78 | EVP_SignUpdate() could not be made after calling EVP_SignFinal(). | 78 | EVP_SignUpdate() could not be made after calling EVP_SignFinal(). |
| 79 | 79 | ||
| 80 | Since the private key is passed in the call to EVP_SignFinal() any error | ||
| 81 | relating to the private key (for example an unsuitable key and digest | ||
| 82 | combination) will not be indicated until after potentially large amounts of | ||
| 83 | data have been passed through EVP_SignUpdate(). | ||
| 84 | |||
| 85 | It is not possible to change the signing parameters using these function. | ||
| 86 | |||
| 87 | The previous two bugs are fixed in the newer EVP_SignDigest*() function. | ||
| 88 | |||
| 80 | =head1 SEE ALSO | 89 | =head1 SEE ALSO |
| 81 | 90 | ||
| 82 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, | 91 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod index b6afaedee5..9097f09410 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod | |||
| @@ -67,6 +67,15 @@ will occur. | |||
| 67 | Older versions of this documentation wrongly stated that calls to | 67 | Older versions of this documentation wrongly stated that calls to |
| 68 | EVP_VerifyUpdate() could not be made after calling EVP_VerifyFinal(). | 68 | EVP_VerifyUpdate() could not be made after calling EVP_VerifyFinal(). |
| 69 | 69 | ||
| 70 | Since the public key is passed in the call to EVP_SignFinal() any error | ||
| 71 | relating to the private key (for example an unsuitable key and digest | ||
| 72 | combination) will not be indicated until after potentially large amounts of | ||
| 73 | data have been passed through EVP_SignUpdate(). | ||
| 74 | |||
| 75 | It is not possible to change the signing parameters using these function. | ||
| 76 | |||
| 77 | The previous two bugs are fixed in the newer EVP_VerifyDigest*() function. | ||
| 78 | |||
| 70 | =head1 SEE ALSO | 79 | =head1 SEE ALSO |
| 71 | 80 | ||
| 72 | L<evp(3)|evp(3)>, | 81 | L<evp(3)|evp(3)>, |
diff --git a/src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod b/src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod index 7dcc07923f..1e45dd40f6 100644 --- a/src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod +++ b/src/lib/libssl/src/doc/crypto/OBJ_nid2obj.pod | |||
| @@ -8,6 +8,8 @@ functions | |||
| 8 | 8 | ||
| 9 | =head1 SYNOPSIS | 9 | =head1 SYNOPSIS |
| 10 | 10 | ||
| 11 | #include <openssl/objects.h> | ||
| 12 | |||
| 11 | ASN1_OBJECT * OBJ_nid2obj(int n); | 13 | ASN1_OBJECT * OBJ_nid2obj(int n); |
| 12 | const char * OBJ_nid2ln(int n); | 14 | const char * OBJ_nid2ln(int n); |
| 13 | const char * OBJ_nid2sn(int n); | 15 | const char * OBJ_nid2sn(int n); |
diff --git a/src/lib/libssl/src/doc/crypto/PKCS12_parse.pod b/src/lib/libssl/src/doc/crypto/PKCS12_parse.pod index 51344f883a..c54cf2ad61 100644 --- a/src/lib/libssl/src/doc/crypto/PKCS12_parse.pod +++ b/src/lib/libssl/src/doc/crypto/PKCS12_parse.pod | |||
| @@ -20,24 +20,31 @@ certificate to B<*cert> and any additional certificates to B<*ca>. | |||
| 20 | 20 | ||
| 21 | =head1 NOTES | 21 | =head1 NOTES |
| 22 | 22 | ||
| 23 | The parameters B<pkey> and B<cert> cannot be B<NULL>. B<ca> can be <NULL> | 23 | The parameters B<pkey> and B<cert> cannot be B<NULL>. B<ca> can be <NULL> in |
| 24 | in which case additional certificates will be discarded. B<*ca> can also | 24 | which case additional certificates will be discarded. B<*ca> can also be a |
| 25 | be a valid STACK in which case additional certificates are appended to | 25 | valid STACK in which case additional certificates are appended to B<*ca>. If |
| 26 | B<*ca>. If B<*ca> is B<NULL> a new STACK will be allocated. | 26 | B<*ca> is B<NULL> a new STACK will be allocated. |
| 27 | 27 | ||
| 28 | The B<friendlyName> and B<localKeyID> attributes (if present) on each certificate | 28 | The B<friendlyName> and B<localKeyID> attributes (if present) on each |
| 29 | will be stored in the B<alias> and B<keyid> attributes of the B<X509> structure. | 29 | certificate will be stored in the B<alias> and B<keyid> attributes of the |
| 30 | B<X509> structure. | ||
| 31 | |||
| 32 | =head1 RETURN VALUES | ||
| 33 | |||
| 34 | PKCS12_parse() returns 1 for success and zero if an error occurred. | ||
| 35 | |||
| 36 | The error can be obtained from L<ERR_get_error(3)|ERR_get_error(3)> | ||
| 30 | 37 | ||
| 31 | =head1 BUGS | 38 | =head1 BUGS |
| 32 | 39 | ||
| 33 | Only a single private key and corresponding certificate is returned by this function. | 40 | Only a single private key and corresponding certificate is returned by this |
| 34 | More complex PKCS#12 files with multiple private keys will only return the first | 41 | function. More complex PKCS#12 files with multiple private keys will only |
| 35 | match. | 42 | return the first match. |
| 36 | 43 | ||
| 37 | Only B<friendlyName> and B<localKeyID> attributes are currently stored in certificates. | 44 | Only B<friendlyName> and B<localKeyID> attributes are currently stored in |
| 38 | Other attributes are discarded. | 45 | certificates. Other attributes are discarded. |
| 39 | 46 | ||
| 40 | Attributes currently cannot be store in the private key B<EVP_PKEY> structure. | 47 | Attributes currently cannot be stored in the private key B<EVP_PKEY> structure. |
| 41 | 48 | ||
| 42 | =head1 SEE ALSO | 49 | =head1 SEE ALSO |
| 43 | 50 | ||
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod b/src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod index b0ca067b89..325699d0b6 100644 --- a/src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod +++ b/src/lib/libssl/src/doc/crypto/PKCS7_decrypt.pod | |||
| @@ -6,7 +6,9 @@ PKCS7_decrypt - decrypt content from a PKCS#7 envelopedData structure | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); | 9 | #include <openssl/pkcs7.h> |
| 10 | |||
| 11 | int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); | ||
| 10 | 12 | ||
| 11 | =head1 DESCRIPTION | 13 | =head1 DESCRIPTION |
| 12 | 14 | ||
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod b/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod index 1a507b22a2..2cd925a7e0 100644 --- a/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod +++ b/src/lib/libssl/src/doc/crypto/PKCS7_encrypt.pod | |||
| @@ -6,7 +6,9 @@ PKCS7_encrypt - create a PKCS#7 envelopedData structure | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, int flags); | 9 | #include <openssl/pkcs7.h> |
| 10 | |||
| 11 | PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, int flags); | ||
| 10 | 12 | ||
| 11 | =head1 DESCRIPTION | 13 | =head1 DESCRIPTION |
| 12 | 14 | ||
| @@ -16,43 +18,55 @@ B<cipher> is the symmetric cipher to use. B<flags> is an optional set of flags. | |||
| 16 | 18 | ||
| 17 | =head1 NOTES | 19 | =head1 NOTES |
| 18 | 20 | ||
| 19 | Only RSA keys are supported in PKCS#7 and envelopedData so the recipient certificates | 21 | Only RSA keys are supported in PKCS#7 and envelopedData so the recipient |
| 20 | supplied to this function must all contain RSA public keys, though they do not have to | 22 | certificates supplied to this function must all contain RSA public keys, though |
| 21 | be signed using the RSA algorithm. | 23 | they do not have to be signed using the RSA algorithm. |
| 22 | 24 | ||
| 23 | EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use because | 25 | EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use |
| 24 | most clients will support it. | 26 | because most clients will support it. |
| 25 | 27 | ||
| 26 | Some old "export grade" clients may only support weak encryption using 40 or 64 bit | 28 | Some old "export grade" clients may only support weak encryption using 40 or 64 |
| 27 | RC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc() respectively. | 29 | bit RC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc() |
| 30 | respectively. | ||
| 28 | 31 | ||
| 29 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of its | 32 | The algorithm passed in the B<cipher> parameter must support ASN1 encoding of |
| 30 | parameters. | 33 | its parameters. |
| 31 | 34 | ||
| 32 | Many browsers implement a "sign and encrypt" option which is simply an S/MIME | 35 | Many browsers implement a "sign and encrypt" option which is simply an S/MIME |
| 33 | envelopedData containing an S/MIME signed message. This can be readily produced | 36 | envelopedData containing an S/MIME signed message. This can be readily produced |
| 34 | by storing the S/MIME signed message in a memory BIO and passing it to | 37 | by storing the S/MIME signed message in a memory BIO and passing it to |
| 35 | PKCS7_encrypt(). | 38 | PKCS7_encrypt(). |
| 36 | 39 | ||
| 37 | The following flags can be passed in the B<flags> parameter. | 40 | The following flags can be passed in the B<flags> parameter. |
| 38 | 41 | ||
| 39 | If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are prepended | 42 | If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are |
| 40 | to the data. | 43 | prepended to the data. |
| 41 | 44 | ||
| 42 | Normally the supplied content is translated into MIME canonical format (as required | 45 | Normally the supplied content is translated into MIME canonical format (as |
| 43 | by the S/MIME specifications) if B<PKCS7_BINARY> is set no translation occurs. This | 46 | required by the S/MIME specifications) if B<PKCS7_BINARY> is set no translation |
| 44 | option should be used if the supplied data is in binary format otherwise the translation | 47 | occurs. This option should be used if the supplied data is in binary format |
| 45 | will corrupt it. If B<PKCS7_BINARY> is set then B<PKCS7_TEXT> is ignored. | 48 | otherwise the translation will corrupt it. If B<PKCS7_BINARY> is set then |
| 49 | B<PKCS7_TEXT> is ignored. | ||
| 46 | 50 | ||
| 47 | =head1 RETURN VALUES | 51 | If the B<PKCS7_STREAM> flag is set a partial B<PKCS7> structure is output |
| 52 | suitable for streaming I/O: no data is read from the BIO B<in>. | ||
| 48 | 53 | ||
| 49 | PKCS7_encrypt() returns either a valid PKCS7 structure or NULL if an error occurred. | 54 | =head1 NOTES |
| 50 | The error can be obtained from ERR_get_error(3). | ||
| 51 | 55 | ||
| 52 | =head1 BUGS | 56 | If the flag B<PKCS7_STREAM> is set the returned B<PKCS7> structure is B<not> |
| 57 | complete and outputting its contents via a function that does not | ||
| 58 | properly finalize the B<PKCS7> structure will give unpredictable | ||
| 59 | results. | ||
| 53 | 60 | ||
| 54 | The lack of single pass processing and need to hold all data in memory as | 61 | Several functions including SMIME_write_PKCS7(), i2d_PKCS7_bio_stream(), |
| 55 | mentioned in PKCS7_sign() also applies to PKCS7_verify(). | 62 | PEM_write_bio_PKCS7_stream() finalize the structure. Alternatively finalization |
| 63 | can be performed by obtaining the streaming ASN1 B<BIO> directly using | ||
| 64 | BIO_new_PKCS7(). | ||
| 65 | |||
| 66 | =head1 RETURN VALUES | ||
| 67 | |||
| 68 | PKCS7_encrypt() returns either a PKCS7 structure or NULL if an error occurred. | ||
| 69 | The error can be obtained from ERR_get_error(3). | ||
| 56 | 70 | ||
| 57 | =head1 SEE ALSO | 71 | =head1 SEE ALSO |
| 58 | 72 | ||
| @@ -61,5 +75,6 @@ L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_decrypt(3)|PKCS7_decrypt(3)> | |||
| 61 | =head1 HISTORY | 75 | =head1 HISTORY |
| 62 | 76 | ||
| 63 | PKCS7_decrypt() was added to OpenSSL 0.9.5 | 77 | PKCS7_decrypt() was added to OpenSSL 0.9.5 |
| 78 | The B<PKCS7_STREAM> flag was first supported in OpenSSL 1.0.0. | ||
| 64 | 79 | ||
| 65 | =cut | 80 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_sign.pod b/src/lib/libssl/src/doc/crypto/PKCS7_sign.pod index ffd0c734b0..64a35144f8 100644 --- a/src/lib/libssl/src/doc/crypto/PKCS7_sign.pod +++ b/src/lib/libssl/src/doc/crypto/PKCS7_sign.pod | |||
| @@ -6,14 +6,16 @@ PKCS7_sign - create a PKCS#7 signedData structure | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, int flags); | 9 | #include <openssl/pkcs7.h> |
| 10 | |||
| 11 | PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, int flags); | ||
| 10 | 12 | ||
| 11 | =head1 DESCRIPTION | 13 | =head1 DESCRIPTION |
| 12 | 14 | ||
| 13 | PKCS7_sign() creates and returns a PKCS#7 signedData structure. B<signcert> | 15 | PKCS7_sign() creates and returns a PKCS#7 signedData structure. B<signcert> is |
| 14 | is the certificate to sign with, B<pkey> is the corresponsding private key. | 16 | the certificate to sign with, B<pkey> is the corresponsding private key. |
| 15 | B<certs> is an optional additional set of certificates to include in the | 17 | B<certs> is an optional additional set of certificates to include in the PKCS#7 |
| 16 | PKCS#7 structure (for example any intermediate CAs in the chain). | 18 | structure (for example any intermediate CAs in the chain). |
| 17 | 19 | ||
| 18 | The data to be signed is read from BIO B<data>. | 20 | The data to be signed is read from BIO B<data>. |
| 19 | 21 | ||
| @@ -21,72 +23,83 @@ B<flags> is an optional set of flags. | |||
| 21 | 23 | ||
| 22 | =head1 NOTES | 24 | =head1 NOTES |
| 23 | 25 | ||
| 24 | Any of the following flags (ored together) can be passed in the B<flags> parameter. | 26 | Any of the following flags (ored together) can be passed in the B<flags> |
| 27 | parameter. | ||
| 25 | 28 | ||
| 26 | Many S/MIME clients expect the signed content to include valid MIME headers. If | 29 | Many S/MIME clients expect the signed content to include valid MIME headers. If |
| 27 | the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are prepended | 30 | the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are prepended |
| 28 | to the data. | 31 | to the data. |
| 29 | 32 | ||
| 30 | If B<PKCS7_NOCERTS> is set the signer's certificate will not be included in the | 33 | If B<PKCS7_NOCERTS> is set the signer's certificate will not be included in the |
| 31 | PKCS7 structure, the signer's certificate must still be supplied in the B<signcert> | 34 | PKCS7 structure, the signer's certificate must still be supplied in the |
| 32 | parameter though. This can reduce the size of the signature if the signers certificate | 35 | B<signcert> parameter though. This can reduce the size of the signature if the |
| 33 | can be obtained by other means: for example a previously signed message. | 36 | signers certificate can be obtained by other means: for example a previously |
| 34 | 37 | signed message. | |
| 35 | The data being signed is included in the PKCS7 structure, unless B<PKCS7_DETACHED> | 38 | |
| 36 | is set in which case it is omitted. This is used for PKCS7 detached signatures | 39 | The data being signed is included in the PKCS7 structure, unless |
| 37 | which are used in S/MIME plaintext signed messages for example. | 40 | B<PKCS7_DETACHED> is set in which case it is omitted. This is used for PKCS7 |
| 41 | detached signatures which are used in S/MIME plaintext signed messages for | ||
| 42 | example. | ||
| 43 | |||
| 44 | Normally the supplied content is translated into MIME canonical format (as | ||
| 45 | required by the S/MIME specifications) if B<PKCS7_BINARY> is set no translation | ||
| 46 | occurs. This option should be used if the supplied data is in binary format | ||
| 47 | otherwise the translation will corrupt it. | ||
| 48 | |||
| 49 | The signedData structure includes several PKCS#7 autenticatedAttributes | ||
| 50 | including the signing time, the PKCS#7 content type and the supported list of | ||
| 51 | ciphers in an SMIMECapabilities attribute. If B<PKCS7_NOATTR> is set then no | ||
| 52 | authenticatedAttributes will be used. If B<PKCS7_NOSMIMECAP> is set then just | ||
| 53 | the SMIMECapabilities are omitted. | ||
| 38 | 54 | ||
| 39 | Normally the supplied content is translated into MIME canonical format (as required | 55 | If present the SMIMECapabilities attribute indicates support for the following |
| 40 | by the S/MIME specifications) if B<PKCS7_BINARY> is set no translation occurs. This | 56 | algorithms: triple DES, 128 bit RC2, 64 bit RC2, DES and 40 bit RC2. If any of |
| 41 | option should be used if the supplied data is in binary format otherwise the translation | 57 | these algorithms is disabled then it will not be included. |
| 42 | will corrupt it. | ||
| 43 | 58 | ||
| 44 | The signedData structure includes several PKCS#7 autenticatedAttributes including | 59 | If the flags B<PKCS7_STREAM> is set then the returned B<PKCS7> structure is |
| 45 | the signing time, the PKCS#7 content type and the supported list of ciphers in | 60 | just initialized ready to perform the signing operation. The signing is however |
| 46 | an SMIMECapabilities attribute. If B<PKCS7_NOATTR> is set then no authenticatedAttributes | 61 | B<not> performed and the data to be signed is not read from the B<data> |
| 47 | will be used. If B<PKCS7_NOSMIMECAP> is set then just the SMIMECapabilities are | 62 | parameter. Signing is deferred until after the data has been written. In this |
| 48 | omitted. | 63 | way data can be signed in a single pass. |
| 49 | 64 | ||
| 50 | If present the SMIMECapabilities attribute indicates support for the following | 65 | If the B<PKCS7_PARTIAL> flag is set a partial B<PKCS7> structure is output to |
| 51 | algorithms: triple DES, 128 bit RC2, 64 bit RC2, DES and 40 bit RC2. If any | 66 | which additional signers and capabilities can be added before finalization. |
| 52 | of these algorithms is disabled then it will not be included. | ||
| 53 | 67 | ||
| 54 | If the flags B<PKCS7_PARTSIGN> is set then the returned B<PKCS7> structure | ||
| 55 | is just initialized ready to perform the signing operation. The signing | ||
| 56 | is however B<not> performed and the data to be signed is not read from | ||
| 57 | the B<data> parameter. Signing is deferred until after the data has been | ||
| 58 | written. In this way data can be signed in a single pass. Currently the | ||
| 59 | flag B<PKCS7_DETACHED> B<must> also be set. | ||
| 60 | 68 | ||
| 61 | =head1 NOTES | 69 | =head1 NOTES |
| 62 | 70 | ||
| 63 | Currently the flag B<PKCS7_PARTSIGN> is only supported for detached | 71 | If the flag B<PKCS7_STREAM> is set the returned B<PKCS7> structure is B<not> |
| 64 | data. If this flag is set the returned B<PKCS7> structure is B<not> | 72 | complete and outputting its contents via a function that does not properly |
| 65 | complete and outputting its contents via a function that does not | 73 | finalize the B<PKCS7> structure will give unpredictable results. |
| 66 | properly finalize the B<PKCS7> structure will give unpredictable | ||
| 67 | results. | ||
| 68 | 74 | ||
| 69 | At present only the SMIME_write_PKCS7() function properly finalizes the | 75 | Several functions including SMIME_write_PKCS7(), i2d_PKCS7_bio_stream(), |
| 70 | structure. | 76 | PEM_write_bio_PKCS7_stream() finalize the structure. Alternatively finalization |
| 77 | can be performed by obtaining the streaming ASN1 B<BIO> directly using | ||
| 78 | BIO_new_PKCS7(). | ||
| 71 | 79 | ||
| 72 | =head1 BUGS | 80 | If a signer is specified it will use the default digest for the signing |
| 81 | algorithm. This is B<SHA1> for both RSA and DSA keys. | ||
| 82 | |||
| 83 | In OpenSSL 1.0.0 the B<certs>, B<signcert> and B<pkey> parameters can all be | ||
| 84 | B<NULL> if the B<PKCS7_PARTIAL> flag is set. One or more signers can be added | ||
| 85 | using the function B<PKCS7_sign_add_signer()>. B<PKCS7_final()> must also be | ||
| 86 | called to finalize the structure if streaming is not enabled. Alternative | ||
| 87 | signing digests can also be specified using this method. | ||
| 73 | 88 | ||
| 74 | PKCS7_sign() is somewhat limited. It does not support multiple signers, some | 89 | In OpenSSL 1.0.0 if B<signcert> and B<pkey> are NULL then a certificates only |
| 75 | advanced attributes such as counter signatures are not supported. | 90 | PKCS#7 structure is output. |
| 76 | 91 | ||
| 77 | The SHA1 digest algorithm is currently always used. | 92 | In versions of OpenSSL before 1.0.0 the B<signcert> and B<pkey> parameters must |
| 93 | B<NOT> be NULL. | ||
| 78 | 94 | ||
| 79 | When the signed data is not detached it will be stored in memory within the | 95 | =head1 BUGS |
| 80 | B<PKCS7> structure. This effectively limits the size of messages which can be | ||
| 81 | signed due to memory restraints. There should be a way to sign data without | ||
| 82 | having to hold it all in memory, this would however require fairly major | ||
| 83 | revisions of the OpenSSL ASN1 code. | ||
| 84 | 96 | ||
| 97 | Some advanced attributes such as counter signatures are not supported. | ||
| 85 | 98 | ||
| 86 | =head1 RETURN VALUES | 99 | =head1 RETURN VALUES |
| 87 | 100 | ||
| 88 | PKCS7_sign() returns either a valid PKCS7 structure or NULL if an error occurred. | 101 | PKCS7_sign() returns either a valid PKCS7 structure or NULL if an error |
| 89 | The error can be obtained from ERR_get_error(3). | 102 | occurred. The error can be obtained from ERR_get_error(3). |
| 90 | 103 | ||
| 91 | =head1 SEE ALSO | 104 | =head1 SEE ALSO |
| 92 | 105 | ||
| @@ -96,6 +109,8 @@ L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_verify(3)|PKCS7_verify(3)> | |||
| 96 | 109 | ||
| 97 | PKCS7_sign() was added to OpenSSL 0.9.5 | 110 | PKCS7_sign() was added to OpenSSL 0.9.5 |
| 98 | 111 | ||
| 99 | The B<PKCS7_PARTSIGN> flag was added in OpenSSL 0.9.8 | 112 | The B<PKCS7_PARTIAL> flag was added in OpenSSL 1.0.0 |
| 113 | |||
| 114 | The B<PKCS7_STREAM> flag was added in OpenSSL 1.0.0 | ||
| 100 | 115 | ||
| 101 | =cut | 116 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/PKCS7_verify.pod b/src/lib/libssl/src/doc/crypto/PKCS7_verify.pod index 3490b5dc82..7c10a4cc3c 100644 --- a/src/lib/libssl/src/doc/crypto/PKCS7_verify.pod +++ b/src/lib/libssl/src/doc/crypto/PKCS7_verify.pod | |||
| @@ -6,9 +6,11 @@ PKCS7_verify - verify a PKCS#7 signedData structure | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, int flags); | 9 | #include <openssl/pkcs7.h> |
| 10 | 10 | ||
| 11 | STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags); | 11 | int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, int flags); |
| 12 | |||
| 13 | STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags); | ||
| 12 | 14 | ||
| 13 | =head1 DESCRIPTION | 15 | =head1 DESCRIPTION |
| 14 | 16 | ||
diff --git a/src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod b/src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod index ffafa37887..9d46715941 100644 --- a/src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod +++ b/src/lib/libssl/src/doc/crypto/SMIME_read_PKCS7.pod | |||
| @@ -6,7 +6,9 @@ SMIME_read_PKCS7 - parse S/MIME message. | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | PKCS7 *SMIME_read_PKCS7(BIO *in, BIO **bcont); | 9 | #include <openssl/pkcs7.h> |
| 10 | |||
| 11 | PKCS7 *SMIME_read_PKCS7(BIO *in, BIO **bcont); | ||
| 10 | 12 | ||
| 11 | =head1 DESCRIPTION | 13 | =head1 DESCRIPTION |
| 12 | 14 | ||
diff --git a/src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod b/src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod index 61945b3887..ca6bd02763 100644 --- a/src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod +++ b/src/lib/libssl/src/doc/crypto/SMIME_write_PKCS7.pod | |||
| @@ -6,17 +6,18 @@ SMIME_write_PKCS7 - convert PKCS#7 structure to S/MIME format. | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | int SMIME_write_PKCS7(BIO *out, PKCS7 *p7, BIO *data, int flags); | 9 | #include <openssl/pkcs7.h> |
| 10 | |||
| 11 | int SMIME_write_PKCS7(BIO *out, PKCS7 *p7, BIO *data, int flags); | ||
| 10 | 12 | ||
| 11 | =head1 DESCRIPTION | 13 | =head1 DESCRIPTION |
| 12 | 14 | ||
| 13 | SMIME_write_PKCS7() adds the appropriate MIME headers to a PKCS#7 | 15 | SMIME_write_PKCS7() adds the appropriate MIME headers to a PKCS#7 |
| 14 | structure to produce an S/MIME message. | 16 | structure to produce an S/MIME message. |
| 15 | 17 | ||
| 16 | B<out> is the BIO to write the data to. B<p7> is the appropriate | 18 | B<out> is the BIO to write the data to. B<p7> is the appropriate B<PKCS7> |
| 17 | B<PKCS7> structure. If cleartext signing (B<multipart/signed>) is | 19 | structure. If streaming is enabled then the content must be supplied in the |
| 18 | being used then the signed data must be supplied in the B<data> | 20 | B<data> argument. B<flags> is an optional set of flags. |
| 19 | argument. B<flags> is an optional set of flags. | ||
| 20 | 21 | ||
| 21 | =head1 NOTES | 22 | =head1 NOTES |
| 22 | 23 | ||
| @@ -30,15 +31,18 @@ If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> | |||
| 30 | are added to the content, this only makes sense if B<PKCS7_DETACHED> | 31 | are added to the content, this only makes sense if B<PKCS7_DETACHED> |
| 31 | is also set. | 32 | is also set. |
| 32 | 33 | ||
| 33 | If the B<PKCS7_PARTSIGN> flag is set the signed data is finalized | 34 | If the B<PKCS7_STREAM> flag is set streaming is performed. This flag should |
| 34 | and output along with the content. This flag should only be set | 35 | only be set if B<PKCS7_STREAM> was also set in the previous call to |
| 35 | if B<PKCS7_DETACHED> is also set and the previous call to PKCS7_sign() | 36 | PKCS7_sign() or B<PKCS7_encrypt()>. |
| 36 | also set these flags. | ||
| 37 | 37 | ||
| 38 | If cleartext signing is being used and B<PKCS7_PARTSIGN> not set then | 38 | If cleartext signing is being used and B<PKCS7_STREAM> not set then |
| 39 | the data must be read twice: once to compute the signature in PKCS7_sign() | 39 | the data must be read twice: once to compute the signature in PKCS7_sign() |
| 40 | and once to output the S/MIME message. | 40 | and once to output the S/MIME message. |
| 41 | 41 | ||
| 42 | If streaming is performed the content is output in BER format using indefinite | ||
| 43 | length constructuted encoding except in the case of signed data with detached | ||
| 44 | content where the content is absent and DER format is used. | ||
| 45 | |||
| 42 | =head1 BUGS | 46 | =head1 BUGS |
| 43 | 47 | ||
| 44 | SMIME_write_PKCS7() always base64 encodes PKCS#7 structures, there | 48 | SMIME_write_PKCS7() always base64 encodes PKCS#7 structures, there |
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 index 11b35f6fd3..41902c0d45 100644 --- 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 | |||
| @@ -9,15 +9,17 @@ X509_NAME_ENTRY_create_by_OBJ - X509_NAME_ENTRY utility functions | |||
| 9 | 9 | ||
| 10 | =head1 SYNOPSIS | 10 | =head1 SYNOPSIS |
| 11 | 11 | ||
| 12 | ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne); | 12 | #include <openssl/x509.h> |
| 13 | ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne); | ||
| 14 | 13 | ||
| 15 | int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj); | 14 | ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne); |
| 16 | int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, const unsigned char *bytes, int len); | 15 | ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne); |
| 17 | 16 | ||
| 18 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field, int type, const unsigned char *bytes, int len); | 17 | int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj); |
| 19 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,unsigned char *bytes, int len); | 18 | int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, const unsigned char *bytes, int len); |
| 20 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len); | 19 | |
| 20 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field, int type, const unsigned char *bytes, int len); | ||
| 21 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,unsigned char *bytes, int len); | ||
| 22 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len); | ||
| 21 | 23 | ||
| 22 | =head1 DESCRIPTION | 24 | =head1 DESCRIPTION |
| 23 | 25 | ||
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 index e2ab4b0d2b..1afd008cb3 100644 --- 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 | |||
| @@ -7,15 +7,17 @@ X509_NAME_add_entry, X509_NAME_delete_entry - X509_NAME modification functions | |||
| 7 | 7 | ||
| 8 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 9 | 9 | ||
| 10 | int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, const unsigned char *bytes, int len, int loc, int set); | 10 | #include <openssl/x509.h> |
| 11 | 11 | ||
| 12 | int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, unsigned char *bytes, int len, int loc, int set); | 12 | int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, const unsigned char *bytes, int len, int loc, int set); |
| 13 | 13 | ||
| 14 | int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, unsigned char *bytes, int len, int loc, int set); | 14 | int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, unsigned char *bytes, int len, int loc, int set); |
| 15 | 15 | ||
| 16 | int X509_NAME_add_entry(X509_NAME *name,X509_NAME_ENTRY *ne, int loc, int set); | 16 | int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, unsigned char *bytes, int len, int loc, int set); |
| 17 | 17 | ||
| 18 | X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); | 18 | int X509_NAME_add_entry(X509_NAME *name,X509_NAME_ENTRY *ne, int loc, int set); |
| 19 | |||
| 20 | X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); | ||
| 19 | 21 | ||
| 20 | =head1 DESCRIPTION | 22 | =head1 DESCRIPTION |
| 21 | 23 | ||
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 index 333323d734..3b1f9ff43b 100644 --- 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 | |||
| @@ -8,14 +8,16 @@ X509_NAME lookup and enumeration functions | |||
| 8 | 8 | ||
| 9 | =head1 SYNOPSIS | 9 | =head1 SYNOPSIS |
| 10 | 10 | ||
| 11 | int X509_NAME_get_index_by_NID(X509_NAME *name,int nid,int lastpos); | 11 | #include <openssl/x509.h> |
| 12 | int X509_NAME_get_index_by_OBJ(X509_NAME *name,ASN1_OBJECT *obj, int lastpos); | ||
| 13 | 12 | ||
| 14 | int X509_NAME_entry_count(X509_NAME *name); | 13 | int X509_NAME_get_index_by_NID(X509_NAME *name,int nid,int lastpos); |
| 15 | X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); | 14 | int X509_NAME_get_index_by_OBJ(X509_NAME *name,ASN1_OBJECT *obj, int lastpos); |
| 16 | 15 | ||
| 17 | int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf,int len); | 16 | int X509_NAME_entry_count(X509_NAME *name); |
| 18 | int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf,int len); | 17 | X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); |
| 18 | |||
| 19 | int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf,int len); | ||
| 20 | int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf,int len); | ||
| 19 | 21 | ||
| 20 | =head1 DESCRIPTION | 22 | =head1 DESCRIPTION |
| 21 | 23 | ||
diff --git a/src/lib/libssl/src/doc/crypto/X509_new.pod b/src/lib/libssl/src/doc/crypto/X509_new.pod index fd5fc65ce1..d38872335f 100644 --- a/src/lib/libssl/src/doc/crypto/X509_new.pod +++ b/src/lib/libssl/src/doc/crypto/X509_new.pod | |||
| @@ -6,6 +6,8 @@ X509_new, X509_free - X509 certificate ASN1 allocation functions | |||
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| 9 | #include <openssl/x509.h> | ||
| 10 | |||
| 9 | X509 *X509_new(void); | 11 | X509 *X509_new(void); |
| 10 | void X509_free(X509 *a); | 12 | void X509_free(X509 *a); |
| 11 | 13 | ||
diff --git a/src/lib/libssl/src/doc/crypto/bn_internal.pod b/src/lib/libssl/src/doc/crypto/bn_internal.pod index 891914678c..91840b0f0d 100644 --- a/src/lib/libssl/src/doc/crypto/bn_internal.pod +++ b/src/lib/libssl/src/doc/crypto/bn_internal.pod | |||
| @@ -13,6 +13,8 @@ library internal functions | |||
| 13 | 13 | ||
| 14 | =head1 SYNOPSIS | 14 | =head1 SYNOPSIS |
| 15 | 15 | ||
| 16 | #include <openssl/bn.h> | ||
| 17 | |||
| 16 | BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w); | 18 | BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w); |
| 17 | BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, | 19 | BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, |
| 18 | BN_ULONG w); | 20 | BN_ULONG w); |
| @@ -70,24 +72,34 @@ applications. | |||
| 70 | 72 | ||
| 71 | =head2 The BIGNUM structure | 73 | =head2 The BIGNUM structure |
| 72 | 74 | ||
| 73 | typedef struct bignum_st | 75 | typedef struct bignum_st BIGNUM; |
| 76 | |||
| 77 | struct bignum_st | ||
| 74 | { | 78 | { |
| 75 | int top; /* number of words used in d */ | 79 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ |
| 76 | BN_ULONG *d; /* pointer to an array containing the integer value */ | 80 | int top; /* Index of last used d +1. */ |
| 77 | int max; /* size of the d array */ | 81 | /* The next are internal book keeping for bn_expand. */ |
| 78 | int neg; /* sign */ | 82 | int dmax; /* Size of the d array. */ |
| 79 | } BIGNUM; | 83 | int neg; /* one if the number is negative */ |
| 84 | int flags; | ||
| 85 | }; | ||
| 86 | |||
| 80 | 87 | ||
| 81 | The integer value is stored in B<d>, a malloc()ed array of words (B<BN_ULONG>), | 88 | The integer value is stored in B<d>, a malloc()ed array of words (B<BN_ULONG>), |
| 82 | least significant word first. A B<BN_ULONG> can be either 16, 32 or 64 bits | 89 | least significant word first. A B<BN_ULONG> can be either 16, 32 or 64 bits |
| 83 | in size, depending on the 'number of bits' (B<BITS2>) specified in | 90 | in size, depending on the 'number of bits' (B<BITS2>) specified in |
| 84 | C<openssl/bn.h>. | 91 | C<openssl/bn.h>. |
| 85 | 92 | ||
| 86 | B<max> is the size of the B<d> array that has been allocated. B<top> | 93 | B<dmax> is the size of the B<d> array that has been allocated. B<top> |
| 87 | is the number of words being used, so for a value of 4, bn.d[0]=4 and | 94 | is the number of words being used, so for a value of 4, bn.d[0]=4 and |
| 88 | bn.top=1. B<neg> is 1 if the number is negative. When a B<BIGNUM> is | 95 | bn.top=1. B<neg> is 1 if the number is negative. When a B<BIGNUM> is |
| 89 | B<0>, the B<d> field can be B<NULL> and B<top> == B<0>. | 96 | B<0>, the B<d> field can be B<NULL> and B<top> == B<0>. |
| 90 | 97 | ||
| 98 | B<flags> is a bit field of flags which are defined in C<openssl/bn.h>. The | ||
| 99 | flags begin with B<BN_FLG_>. The macros BN_set_flags(b,n) and | ||
| 100 | BN_get_flags(b,n) exist to enable or fetch flag(s) B<n> from B<BIGNUM> | ||
| 101 | structure B<b>. | ||
| 102 | |||
| 91 | Various routines in this library require the use of temporary | 103 | Various routines in this library require the use of temporary |
| 92 | B<BIGNUM> variables during their execution. Since dynamic memory | 104 | B<BIGNUM> variables during their execution. Since dynamic memory |
| 93 | allocation to create B<BIGNUM>s is rather expensive when used in | 105 | allocation to create B<BIGNUM>s is rather expensive when used in |
| @@ -207,12 +219,12 @@ significant non-zero word plus one when B<a> has shrunk. | |||
| 207 | =head2 Debugging | 219 | =head2 Debugging |
| 208 | 220 | ||
| 209 | bn_check_top() verifies that C<((a)-E<gt>top E<gt>= 0 && (a)-E<gt>top | 221 | bn_check_top() verifies that C<((a)-E<gt>top E<gt>= 0 && (a)-E<gt>top |
| 210 | E<lt>= (a)-E<gt>max)>. A violation will cause the program to abort. | 222 | E<lt>= (a)-E<gt>dmax)>. A violation will cause the program to abort. |
| 211 | 223 | ||
| 212 | bn_print() prints B<a> to stderr. bn_dump() prints B<n> words at B<d> | 224 | bn_print() prints B<a> to stderr. bn_dump() prints B<n> words at B<d> |
| 213 | (in reverse order, i.e. most significant word first) to stderr. | 225 | (in reverse order, i.e. most significant word first) to stderr. |
| 214 | 226 | ||
| 215 | bn_set_max() makes B<a> a static number with a B<max> of its current size. | 227 | bn_set_max() makes B<a> a static number with a B<dmax> of its current size. |
| 216 | This is used by bn_set_low() and bn_set_high() to make B<r> a read-only | 228 | This is used by bn_set_low() and bn_set_high() to make B<r> a read-only |
| 217 | B<BIGNUM> that contains the B<n> low or high words of B<a>. | 229 | B<BIGNUM> that contains the B<n> low or high words of B<a>. |
| 218 | 230 | ||
diff --git a/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod b/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod index 279b29c873..aa6078bcf6 100644 --- a/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod +++ b/src/lib/libssl/src/doc/crypto/d2i_RSAPublicKey.pod | |||
| @@ -11,21 +11,21 @@ d2i_Netscape_RSA - RSA public and private key encoding functions. | |||
| 11 | #include <openssl/rsa.h> | 11 | #include <openssl/rsa.h> |
| 12 | #include <openssl/x509.h> | 12 | #include <openssl/x509.h> |
| 13 | 13 | ||
| 14 | RSA * d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length); | 14 | RSA * d2i_RSAPublicKey(RSA **a, const unsigned char **pp, long length); |
| 15 | 15 | ||
| 16 | int i2d_RSAPublicKey(RSA *a, unsigned char **pp); | 16 | int i2d_RSAPublicKey(RSA *a, unsigned char **pp); |
| 17 | 17 | ||
| 18 | RSA * d2i_RSA_PUBKEY(RSA **a, unsigned char **pp, long length); | 18 | RSA * d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length); |
| 19 | 19 | ||
| 20 | int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp); | 20 | int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp); |
| 21 | 21 | ||
| 22 | RSA * d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length); | 22 | RSA * d2i_RSAPrivateKey(RSA **a, const unsigned char **pp, long length); |
| 23 | 23 | ||
| 24 | int i2d_RSAPrivateKey(RSA *a, unsigned char **pp); | 24 | int i2d_RSAPrivateKey(RSA *a, unsigned char **pp); |
| 25 | 25 | ||
| 26 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); | 26 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); |
| 27 | 27 | ||
| 28 | RSA * d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()); | 28 | RSA * d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length, int (*cb)()); |
| 29 | 29 | ||
| 30 | =head1 DESCRIPTION | 30 | =head1 DESCRIPTION |
| 31 | 31 | ||
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509.pod b/src/lib/libssl/src/doc/crypto/d2i_X509.pod index 5bfa18afbb..298ec54a4c 100644 --- a/src/lib/libssl/src/doc/crypto/d2i_X509.pod +++ b/src/lib/libssl/src/doc/crypto/d2i_X509.pod | |||
| @@ -15,8 +15,8 @@ i2d_X509_fp - X509 encode and decode functions | |||
| 15 | X509 *d2i_X509_bio(BIO *bp, X509 **x); | 15 | X509 *d2i_X509_bio(BIO *bp, X509 **x); |
| 16 | X509 *d2i_X509_fp(FILE *fp, X509 **x); | 16 | X509 *d2i_X509_fp(FILE *fp, X509 **x); |
| 17 | 17 | ||
| 18 | int i2d_X509_bio(X509 *x, BIO *bp); | 18 | int i2d_X509_bio(BIO *bp, X509 *x); |
| 19 | int i2d_X509_fp(X509 *x, FILE *fp); | 19 | int i2d_X509_fp(FILE *fp, X509 *x); |
| 20 | 20 | ||
| 21 | =head1 DESCRIPTION | 21 | =head1 DESCRIPTION |
| 22 | 22 | ||
| @@ -212,11 +212,11 @@ d2i_X509(), d2i_X509_bio() and d2i_X509_fp() return a valid B<X509> structure | |||
| 212 | or B<NULL> if an error occurs. The error code that can be obtained by | 212 | or B<NULL> if an error occurs. The error code that can be obtained by |
| 213 | L<ERR_get_error(3)|ERR_get_error(3)>. | 213 | L<ERR_get_error(3)|ERR_get_error(3)>. |
| 214 | 214 | ||
| 215 | i2d_X509(), i2d_X509_bio() and i2d_X509_fp() return a the number of bytes | 215 | i2d_X509() returns the number of bytes successfully encoded or a negative |
| 216 | successfully encoded or a negative value if an error occurs. The error code | 216 | value if an error occurs. The error code can be obtained by |
| 217 | can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. | 217 | L<ERR_get_error(3)|ERR_get_error(3)>. |
| 218 | 218 | ||
| 219 | i2d_X509_bio() and i2d_X509_fp() returns 1 for success and 0 if an error | 219 | i2d_X509_bio() and i2d_X509_fp() return 1 for success and 0 if an error |
| 220 | occurs The error code can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. | 220 | occurs The error code can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. |
| 221 | 221 | ||
| 222 | =head1 SEE ALSO | 222 | =head1 SEE ALSO |
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod b/src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod index e7295a5d61..224f9e082b 100644 --- a/src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod +++ b/src/lib/libssl/src/doc/crypto/d2i_X509_CRL.pod | |||
| @@ -15,8 +15,8 @@ i2d_X509_CRL_bio, i2d_X509_CRL_fp - PKCS#10 certificate request functions. | |||
| 15 | X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **x); | 15 | X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **x); |
| 16 | X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **x); | 16 | X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **x); |
| 17 | 17 | ||
| 18 | int i2d_X509_CRL_bio(X509_CRL *x, BIO *bp); | 18 | int i2d_X509_CRL_bio(BIO *bp, X509_CRL *x); |
| 19 | int i2d_X509_CRL_fp(X509_CRL *x, FILE *fp); | 19 | int i2d_X509_CRL_fp(FILE *fp, X509_CRL *x); |
| 20 | 20 | ||
| 21 | =head1 DESCRIPTION | 21 | =head1 DESCRIPTION |
| 22 | 22 | ||
diff --git a/src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod b/src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod index ae32a3891d..91c0c1974b 100644 --- a/src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod +++ b/src/lib/libssl/src/doc/crypto/d2i_X509_REQ.pod | |||
| @@ -15,8 +15,8 @@ i2d_X509_REQ_bio, i2d_X509_REQ_fp - PKCS#10 certificate request functions. | |||
| 15 | X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **x); | 15 | X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **x); |
| 16 | X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **x); | 16 | X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **x); |
| 17 | 17 | ||
| 18 | int i2d_X509_REQ_bio(X509_REQ *x, BIO *bp); | 18 | int i2d_X509_REQ_bio(BIO *bp, X509_REQ *x); |
| 19 | int i2d_X509_REQ_fp(X509_REQ *x, FILE *fp); | 19 | int i2d_X509_REQ_fp(FILE *fp, X509_REQ *x); |
| 20 | 20 | ||
| 21 | =head1 DESCRIPTION | 21 | =head1 DESCRIPTION |
| 22 | 22 | ||
diff --git a/src/lib/libssl/src/doc/crypto/evp.pod b/src/lib/libssl/src/doc/crypto/evp.pod index b3ca14314f..9faa349243 100644 --- a/src/lib/libssl/src/doc/crypto/evp.pod +++ b/src/lib/libssl/src/doc/crypto/evp.pod | |||
| @@ -22,14 +22,24 @@ digital signatures. | |||
| 22 | Symmetric encryption is available with the B<EVP_Encrypt>I<...> | 22 | Symmetric encryption is available with the B<EVP_Encrypt>I<...> |
| 23 | functions. The B<EVP_Digest>I<...> functions provide message digests. | 23 | functions. The B<EVP_Digest>I<...> functions provide message digests. |
| 24 | 24 | ||
| 25 | The B<EVP_PKEY>I<...> functions provide a high level interface to | ||
| 26 | asymmetric algorithms. | ||
| 27 | |||
| 25 | Algorithms are loaded with OpenSSL_add_all_algorithms(3). | 28 | Algorithms are loaded with OpenSSL_add_all_algorithms(3). |
| 26 | 29 | ||
| 27 | All the symmetric algorithms (ciphers) and digests can be replaced by ENGINE | 30 | All the symmetric algorithms (ciphers), digests and asymmetric algorithms |
| 28 | modules providing alternative implementations. If ENGINE implementations of | 31 | (public key algorithms) can be replaced by ENGINE modules providing alternative |
| 29 | ciphers or digests are registered as defaults, then the various EVP functions | 32 | implementations. If ENGINE implementations of ciphers or digests are registered |
| 30 | will automatically use those implementations automatically in preference to | 33 | as defaults, then the various EVP functions will automatically use those |
| 31 | built in software implementations. For more information, consult the engine(3) | 34 | implementations automatically in preference to built in software |
| 32 | man page. | 35 | implementations. For more information, consult the engine(3) man page. |
| 36 | |||
| 37 | Although low level algorithm specific functions exist for many algorithms | ||
| 38 | their use is discouraged. They cannot be used with an ENGINE and ENGINE | ||
| 39 | versions of new algorithms cannot be accessed using the low level functions. | ||
| 40 | Also makes code harder to adapt to new algorithms and some options are not | ||
| 41 | cleanly supported at the low level and some operations are more efficient | ||
| 42 | using the high level interface. | ||
| 33 | 43 | ||
| 34 | =head1 SEE ALSO | 44 | =head1 SEE ALSO |
| 35 | 45 | ||
diff --git a/src/lib/libssl/src/doc/crypto/hmac.pod b/src/lib/libssl/src/doc/crypto/hmac.pod index 0bd79a6d3a..d92138d273 100644 --- a/src/lib/libssl/src/doc/crypto/hmac.pod +++ b/src/lib/libssl/src/doc/crypto/hmac.pod | |||
| @@ -15,12 +15,12 @@ authentication code | |||
| 15 | 15 | ||
| 16 | void HMAC_CTX_init(HMAC_CTX *ctx); | 16 | void HMAC_CTX_init(HMAC_CTX *ctx); |
| 17 | 17 | ||
| 18 | void HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len, | 18 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len, |
| 19 | const EVP_MD *md); | 19 | const EVP_MD *md); |
| 20 | void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int key_len, | 20 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int key_len, |
| 21 | const EVP_MD *md, ENGINE *impl); | 21 | const EVP_MD *md, ENGINE *impl); |
| 22 | void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len); | 22 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len); |
| 23 | void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); | 23 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); |
| 24 | 24 | ||
| 25 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); | 25 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); |
| 26 | void HMAC_cleanup(HMAC_CTX *ctx); | 26 | void HMAC_cleanup(HMAC_CTX *ctx); |
| @@ -41,8 +41,6 @@ If B<md> is NULL, the digest is placed in a static array. The size of | |||
| 41 | the output is placed in B<md_len>, unless it is B<NULL>. | 41 | the output is placed in B<md_len>, unless it is B<NULL>. |
| 42 | 42 | ||
| 43 | B<evp_md> can be EVP_sha1(), EVP_ripemd160() etc. | 43 | B<evp_md> can be EVP_sha1(), EVP_ripemd160() etc. |
| 44 | B<key> and B<evp_md> may be B<NULL> if a key and hash function have | ||
| 45 | been set in a previous call to HMAC_Init() for that B<HMAC_CTX>. | ||
| 46 | 44 | ||
| 47 | HMAC_CTX_init() initialises a B<HMAC_CTX> before first use. It must be | 45 | HMAC_CTX_init() initialises a B<HMAC_CTX> before first use. It must be |
| 48 | called. | 46 | called. |
| @@ -78,10 +76,13 @@ must have space for the hash function output. | |||
| 78 | 76 | ||
| 79 | =head1 RETURN VALUES | 77 | =head1 RETURN VALUES |
| 80 | 78 | ||
| 81 | HMAC() returns a pointer to the message authentication code. | 79 | HMAC() returns a pointer to the message authentication code or NULL if |
| 80 | an error occurred. | ||
| 82 | 81 | ||
| 83 | HMAC_CTX_init(), HMAC_Init_ex(), HMAC_Update(), HMAC_Final() and | 82 | HMAC_Init_ex(), HMAC_Update() and HMAC_Final() return 1 for success or 0 if |
| 84 | HMAC_CTX_cleanup() do not return values. | 83 | an error occurred. |
| 84 | |||
| 85 | HMAC_CTX_init() and HMAC_CTX_cleanup() do not return values. | ||
| 85 | 86 | ||
| 86 | =head1 CONFORMING TO | 87 | =head1 CONFORMING TO |
| 87 | 88 | ||
| @@ -99,4 +100,7 @@ are available since SSLeay 0.9.0. | |||
| 99 | HMAC_CTX_init(), HMAC_Init_ex() and HMAC_CTX_cleanup() are available | 100 | HMAC_CTX_init(), HMAC_Init_ex() and HMAC_CTX_cleanup() are available |
| 100 | since OpenSSL 0.9.7. | 101 | since OpenSSL 0.9.7. |
| 101 | 102 | ||
| 103 | HMAC_Init_ex(), HMAC_Update() and HMAC_Final() did not return values in | ||
| 104 | versions of OpenSSL before 1.0.0. | ||
| 105 | |||
| 102 | =cut | 106 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/lhash.pod b/src/lib/libssl/src/doc/crypto/lhash.pod index dcdbb43a8e..73a19b6c7e 100644 --- a/src/lib/libssl/src/doc/crypto/lhash.pod +++ b/src/lib/libssl/src/doc/crypto/lhash.pod | |||
| @@ -8,18 +8,20 @@ lh_new, lh_free, lh_insert, lh_delete, lh_retrieve, lh_doall, lh_doall_arg, lh_e | |||
| 8 | 8 | ||
| 9 | #include <openssl/lhash.h> | 9 | #include <openssl/lhash.h> |
| 10 | 10 | ||
| 11 | LHASH *lh_new(LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE compare); | 11 | DECLARE_LHASH_OF(<type>); |
| 12 | void lh_free(LHASH *table); | ||
| 13 | 12 | ||
| 14 | void *lh_insert(LHASH *table, void *data); | 13 | LHASH *lh_<type>_new(); |
| 15 | void *lh_delete(LHASH *table, void *data); | 14 | void lh_<type>_free(LHASH_OF(<type> *table); |
| 16 | void *lh_retrieve(LHASH *table, void *data); | ||
| 17 | 15 | ||
| 18 | void lh_doall(LHASH *table, LHASH_DOALL_FN_TYPE func); | 16 | <type> *lh_<type>_insert(LHASH_OF(<type> *table, <type> *data); |
| 19 | void lh_doall_arg(LHASH *table, LHASH_DOALL_ARG_FN_TYPE func, | 17 | <type> *lh_<type>_delete(LHASH_OF(<type> *table, <type> *data); |
| 20 | void *arg); | 18 | <type> *lh_retrieve(LHASH_OF<type> *table, <type> *data); |
| 21 | 19 | ||
| 22 | int lh_error(LHASH *table); | 20 | void lh_<type>_doall(LHASH_OF(<type> *table, LHASH_DOALL_FN_TYPE func); |
| 21 | void lh_<type>_doall_arg(LHASH_OF(<type> *table, LHASH_DOALL_ARG_FN_TYPE func, | ||
| 22 | <type2>, <type2> *arg); | ||
| 23 | |||
| 24 | int lh_<type>_error(LHASH_OF(<type> *table); | ||
| 23 | 25 | ||
| 24 | typedef int (*LHASH_COMP_FN_TYPE)(const void *, const void *); | 26 | typedef int (*LHASH_COMP_FN_TYPE)(const void *, const void *); |
| 25 | typedef unsigned long (*LHASH_HASH_FN_TYPE)(const void *); | 27 | typedef unsigned long (*LHASH_HASH_FN_TYPE)(const void *); |
| @@ -28,113 +30,115 @@ lh_new, lh_free, lh_insert, lh_delete, lh_retrieve, lh_doall, lh_doall_arg, lh_e | |||
| 28 | 30 | ||
| 29 | =head1 DESCRIPTION | 31 | =head1 DESCRIPTION |
| 30 | 32 | ||
| 31 | This library implements dynamic hash tables. The hash table entries | 33 | This library implements type-checked dynamic hash tables. The hash |
| 32 | can be arbitrary structures. Usually they consist of key and value | 34 | table entries can be arbitrary structures. Usually they consist of key |
| 33 | fields. | 35 | and value fields. |
| 34 | 36 | ||
| 35 | lh_new() creates a new B<LHASH> structure to store arbitrary data | 37 | lh_<type>_new() creates a new B<LHASH_OF(<type>> structure to store |
| 36 | entries, and provides the 'hash' and 'compare' callbacks to be used in | 38 | arbitrary data entries, and provides the 'hash' and 'compare' |
| 37 | organising the table's entries. The B<hash> callback takes a pointer | 39 | callbacks to be used in organising the table's entries. The B<hash> |
| 38 | to a table entry as its argument and returns an unsigned long hash | 40 | callback takes a pointer to a table entry as its argument and returns |
| 39 | value for its key field. The hash value is normally truncated to a | 41 | an unsigned long hash value for its key field. The hash value is |
| 40 | power of 2, so make sure that your hash function returns well mixed | 42 | normally truncated to a power of 2, so make sure that your hash |
| 41 | low order bits. The B<compare> callback takes two arguments (pointers | 43 | function returns well mixed low order bits. The B<compare> callback |
| 42 | to two hash table entries), and returns 0 if their keys are equal, | 44 | takes two arguments (pointers to two hash table entries), and returns |
| 43 | non-zero otherwise. If your hash table will contain items of some | 45 | 0 if their keys are equal, non-zero otherwise. If your hash table |
| 44 | particular type and the B<hash> and B<compare> callbacks hash/compare | 46 | will contain items of some particular type and the B<hash> and |
| 45 | these types, then the B<DECLARE_LHASH_HASH_FN> and | 47 | B<compare> callbacks hash/compare these types, then the |
| 46 | B<IMPLEMENT_LHASH_COMP_FN> macros can be used to create callback | 48 | B<DECLARE_LHASH_HASH_FN> and B<IMPLEMENT_LHASH_COMP_FN> macros can be |
| 47 | wrappers of the prototypes required by lh_new(). These provide | 49 | used to create callback wrappers of the prototypes required by |
| 48 | per-variable casts before calling the type-specific callbacks written | 50 | lh_<type>_new(). These provide per-variable casts before calling the |
| 49 | by the application author. These macros, as well as those used for | 51 | type-specific callbacks written by the application author. These |
| 50 | the "doall" callbacks, are defined as; | 52 | macros, as well as those used for the "doall" callbacks, are defined |
| 51 | 53 | as; | |
| 52 | #define DECLARE_LHASH_HASH_FN(f_name,o_type) \ | 54 | |
| 53 | unsigned long f_name##_LHASH_HASH(const void *); | 55 | #define DECLARE_LHASH_HASH_FN(name, o_type) \ |
| 54 | #define IMPLEMENT_LHASH_HASH_FN(f_name,o_type) \ | 56 | unsigned long name##_LHASH_HASH(const void *); |
| 55 | unsigned long f_name##_LHASH_HASH(const void *arg) { \ | 57 | #define IMPLEMENT_LHASH_HASH_FN(name, o_type) \ |
| 56 | o_type a = (o_type)arg; \ | 58 | unsigned long name##_LHASH_HASH(const void *arg) { \ |
| 57 | return f_name(a); } | 59 | const o_type *a = arg; \ |
| 58 | #define LHASH_HASH_FN(f_name) f_name##_LHASH_HASH | 60 | return name##_hash(a); } |
| 59 | 61 | #define LHASH_HASH_FN(name) name##_LHASH_HASH | |
| 60 | #define DECLARE_LHASH_COMP_FN(f_name,o_type) \ | 62 | |
| 61 | int f_name##_LHASH_COMP(const void *, const void *); | 63 | #define DECLARE_LHASH_COMP_FN(name, o_type) \ |
| 62 | #define IMPLEMENT_LHASH_COMP_FN(f_name,o_type) \ | 64 | int name##_LHASH_COMP(const void *, const void *); |
| 63 | int f_name##_LHASH_COMP(const void *arg1, const void *arg2) { \ | 65 | #define IMPLEMENT_LHASH_COMP_FN(name, o_type) \ |
| 64 | o_type a = (o_type)arg1; \ | 66 | int name##_LHASH_COMP(const void *arg1, const void *arg2) { \ |
| 65 | o_type b = (o_type)arg2; \ | 67 | const o_type *a = arg1; \ |
| 66 | return f_name(a,b); } | 68 | const o_type *b = arg2; \ |
| 67 | #define LHASH_COMP_FN(f_name) f_name##_LHASH_COMP | 69 | return name##_cmp(a,b); } |
| 68 | 70 | #define LHASH_COMP_FN(name) name##_LHASH_COMP | |
| 69 | #define DECLARE_LHASH_DOALL_FN(f_name,o_type) \ | 71 | |
| 70 | void f_name##_LHASH_DOALL(const void *); | 72 | #define DECLARE_LHASH_DOALL_FN(name, o_type) \ |
| 71 | #define IMPLEMENT_LHASH_DOALL_FN(f_name,o_type) \ | 73 | void name##_LHASH_DOALL(void *); |
| 72 | void f_name##_LHASH_DOALL(const void *arg) { \ | 74 | #define IMPLEMENT_LHASH_DOALL_FN(name, o_type) \ |
| 73 | o_type a = (o_type)arg; \ | 75 | void name##_LHASH_DOALL(void *arg) { \ |
| 74 | f_name(a); } | 76 | o_type *a = arg; \ |
| 75 | #define LHASH_DOALL_FN(f_name) f_name##_LHASH_DOALL | 77 | name##_doall(a); } |
| 76 | 78 | #define LHASH_DOALL_FN(name) name##_LHASH_DOALL | |
| 77 | #define DECLARE_LHASH_DOALL_ARG_FN(f_name,o_type,a_type) \ | 79 | |
| 78 | void f_name##_LHASH_DOALL_ARG(const void *, const void *); | 80 | #define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ |
| 79 | #define IMPLEMENT_LHASH_DOALL_ARG_FN(f_name,o_type,a_type) \ | 81 | void name##_LHASH_DOALL_ARG(void *, void *); |
| 80 | void f_name##_LHASH_DOALL_ARG(const void *arg1, const void *arg2) { \ | 82 | #define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ |
| 81 | o_type a = (o_type)arg1; \ | 83 | void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \ |
| 82 | a_type b = (a_type)arg2; \ | 84 | o_type *a = arg1; \ |
| 83 | f_name(a,b); } | 85 | a_type *b = arg2; \ |
| 84 | #define LHASH_DOALL_ARG_FN(f_name) f_name##_LHASH_DOALL_ARG | 86 | name##_doall_arg(a, b); } |
| 85 | 87 | #define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG | |
| 86 | An example of a hash table storing (pointers to) structures of type 'STUFF' | 88 | |
| 87 | could be defined as follows; | 89 | An example of a hash table storing (pointers to) structures of type 'STUFF' |
| 90 | could be defined as follows; | ||
| 88 | 91 | ||
| 89 | /* Calculates the hash value of 'tohash' (implemented elsewhere) */ | 92 | /* Calculates the hash value of 'tohash' (implemented elsewhere) */ |
| 90 | unsigned long STUFF_hash(const STUFF *tohash); | 93 | unsigned long STUFF_hash(const STUFF *tohash); |
| 91 | /* Orders 'arg1' and 'arg2' (implemented elsewhere) */ | 94 | /* Orders 'arg1' and 'arg2' (implemented elsewhere) */ |
| 92 | int STUFF_cmp(const STUFF *arg1, const STUFF *arg2); | 95 | int stuff_cmp(const STUFF *arg1, const STUFF *arg2); |
| 93 | /* Create the type-safe wrapper functions for use in the LHASH internals */ | 96 | /* Create the type-safe wrapper functions for use in the LHASH internals */ |
| 94 | static IMPLEMENT_LHASH_HASH_FN(STUFF_hash, const STUFF *) | 97 | static IMPLEMENT_LHASH_HASH_FN(stuff, STUFF); |
| 95 | static IMPLEMENT_LHASH_COMP_FN(STUFF_cmp, const STUFF *); | 98 | static IMPLEMENT_LHASH_COMP_FN(stuff, STUFF); |
| 96 | /* ... */ | 99 | /* ... */ |
| 97 | int main(int argc, char *argv[]) { | 100 | int main(int argc, char *argv[]) { |
| 98 | /* Create the new hash table using the hash/compare wrappers */ | 101 | /* Create the new hash table using the hash/compare wrappers */ |
| 99 | LHASH *hashtable = lh_new(LHASH_HASH_FN(STUFF_hash), | 102 | LHASH_OF(STUFF) *hashtable = lh_STUFF_new(LHASH_HASH_FN(STUFF_hash), |
| 100 | LHASH_COMP_FN(STUFF_cmp)); | 103 | LHASH_COMP_FN(STUFF_cmp)); |
| 101 | /* ... */ | 104 | /* ... */ |
| 102 | } | 105 | } |
| 103 | 106 | ||
| 104 | lh_free() frees the B<LHASH> structure B<table>. Allocated hash table | 107 | lh_<type>_free() frees the B<LHASH_OF(<type>> structure |
| 105 | entries will not be freed; consider using lh_doall() to deallocate any | 108 | B<table>. Allocated hash table entries will not be freed; consider |
| 106 | remaining entries in the hash table (see below). | 109 | using lh_<type>_doall() to deallocate any remaining entries in the |
| 110 | hash table (see below). | ||
| 107 | 111 | ||
| 108 | lh_insert() inserts the structure pointed to by B<data> into B<table>. | 112 | lh_<type>_insert() inserts the structure pointed to by B<data> into |
| 109 | If there already is an entry with the same key, the old value is | 113 | B<table>. If there already is an entry with the same key, the old |
| 110 | replaced. Note that lh_insert() stores pointers, the data are not | 114 | value is replaced. Note that lh_<type>_insert() stores pointers, the |
| 111 | copied. | 115 | data are not copied. |
| 112 | 116 | ||
| 113 | lh_delete() deletes an entry from B<table>. | 117 | lh_<type>_delete() deletes an entry from B<table>. |
| 114 | 118 | ||
| 115 | lh_retrieve() looks up an entry in B<table>. Normally, B<data> is | 119 | lh_<type>_retrieve() looks up an entry in B<table>. Normally, B<data> |
| 116 | a structure with the key field(s) set; the function will return a | 120 | is a structure with the key field(s) set; the function will return a |
| 117 | pointer to a fully populated structure. | 121 | pointer to a fully populated structure. |
| 118 | 122 | ||
| 119 | lh_doall() will, for every entry in the hash table, call B<func> with | 123 | lh_<type>_doall() will, for every entry in the hash table, call |
| 120 | the data item as its parameter. For lh_doall() and lh_doall_arg(), | 124 | B<func> with the data item as its parameter. For lh_<type>_doall() |
| 121 | function pointer casting should be avoided in the callbacks (see | 125 | and lh_<type>_doall_arg(), function pointer casting should be avoided |
| 122 | B<NOTE>) - instead, either declare the callbacks to match the | 126 | in the callbacks (see B<NOTE>) - instead use the declare/implement |
| 123 | prototype required in lh_new() or use the declare/implement macros to | 127 | macros to create type-checked wrappers that cast variables prior to |
| 124 | create type-safe wrappers that cast variables prior to calling your | 128 | calling your type-specific callbacks. An example of this is |
| 125 | type-specific callbacks. An example of this is illustrated here where | 129 | illustrated here where the callback is used to cleanup resources for |
| 126 | the callback is used to cleanup resources for items in the hash table | 130 | items in the hash table prior to the hashtable itself being |
| 127 | prior to the hashtable itself being deallocated: | 131 | deallocated: |
| 128 | 132 | ||
| 129 | /* Cleans up resources belonging to 'a' (this is implemented elsewhere) */ | 133 | /* Cleans up resources belonging to 'a' (this is implemented elsewhere) */ |
| 130 | void STUFF_cleanup(STUFF *a); | 134 | void STUFF_cleanup_doall(STUFF *a); |
| 131 | /* Implement a prototype-compatible wrapper for "STUFF_cleanup" */ | 135 | /* Implement a prototype-compatible wrapper for "STUFF_cleanup" */ |
| 132 | IMPLEMENT_LHASH_DOALL_FN(STUFF_cleanup, STUFF *) | 136 | IMPLEMENT_LHASH_DOALL_FN(STUFF_cleanup, STUFF) |
| 133 | /* ... then later in the code ... */ | 137 | /* ... then later in the code ... */ |
| 134 | /* So to run "STUFF_cleanup" against all items in a hash table ... */ | 138 | /* So to run "STUFF_cleanup" against all items in a hash table ... */ |
| 135 | lh_doall(hashtable, LHASH_DOALL_FN(STUFF_cleanup)); | 139 | lh_STUFF_doall(hashtable, LHASH_DOALL_FN(STUFF_cleanup)); |
| 136 | /* Then the hash table itself can be deallocated */ | 140 | /* Then the hash table itself can be deallocated */ |
| 137 | lh_free(hashtable); | 141 | lh_STUFF_free(hashtable); |
| 138 | 142 | ||
| 139 | When doing this, be careful if you delete entries from the hash table | 143 | When doing this, be careful if you delete entries from the hash table |
| 140 | in your callbacks: the table may decrease in size, moving the item | 144 | in your callbacks: the table may decrease in size, moving the item |
| @@ -145,51 +149,52 @@ you start (which will stop the hash table ever decreasing in size). | |||
| 145 | The best solution is probably to avoid deleting items from the hash | 149 | The best solution is probably to avoid deleting items from the hash |
| 146 | table inside a "doall" callback! | 150 | table inside a "doall" callback! |
| 147 | 151 | ||
| 148 | lh_doall_arg() is the same as lh_doall() except that B<func> will be | 152 | lh_<type>_doall_arg() is the same as lh_<type>_doall() except that |
| 149 | called with B<arg> as the second argument and B<func> should be of | 153 | B<func> will be called with B<arg> as the second argument and B<func> |
| 150 | type B<LHASH_DOALL_ARG_FN_TYPE> (a callback prototype that is passed | 154 | should be of type B<LHASH_DOALL_ARG_FN_TYPE> (a callback prototype |
| 151 | both the table entry and an extra argument). As with lh_doall(), you | 155 | that is passed both the table entry and an extra argument). As with |
| 152 | can instead choose to declare your callback with a prototype matching | 156 | lh_doall(), you can instead choose to declare your callback with a |
| 153 | the types you are dealing with and use the declare/implement macros to | 157 | prototype matching the types you are dealing with and use the |
| 154 | create compatible wrappers that cast variables before calling your | 158 | declare/implement macros to create compatible wrappers that cast |
| 155 | type-specific callbacks. An example of this is demonstrated here | 159 | variables before calling your type-specific callbacks. An example of |
| 156 | (printing all hash table entries to a BIO that is provided by the | 160 | this is demonstrated here (printing all hash table entries to a BIO |
| 157 | caller): | 161 | that is provided by the caller): |
| 158 | 162 | ||
| 159 | /* Prints item 'a' to 'output_bio' (this is implemented elsewhere) */ | 163 | /* Prints item 'a' to 'output_bio' (this is implemented elsewhere) */ |
| 160 | void STUFF_print(const STUFF *a, BIO *output_bio); | 164 | void STUFF_print_doall_arg(const STUFF *a, BIO *output_bio); |
| 161 | /* Implement a prototype-compatible wrapper for "STUFF_print" */ | 165 | /* Implement a prototype-compatible wrapper for "STUFF_print" */ |
| 162 | static IMPLEMENT_LHASH_DOALL_ARG_FN(STUFF_print, const STUFF *, BIO *) | 166 | static IMPLEMENT_LHASH_DOALL_ARG_FN(STUFF, const STUFF, BIO) |
| 163 | /* ... then later in the code ... */ | 167 | /* ... then later in the code ... */ |
| 164 | /* Print out the entire hashtable to a particular BIO */ | 168 | /* Print out the entire hashtable to a particular BIO */ |
| 165 | lh_doall_arg(hashtable, LHASH_DOALL_ARG_FN(STUFF_print), logging_bio); | 169 | lh_STUFF_doall_arg(hashtable, LHASH_DOALL_ARG_FN(STUFF_print), BIO, |
| 170 | logging_bio); | ||
| 166 | 171 | ||
| 167 | lh_error() can be used to determine if an error occurred in the last | 172 | lh_<type>_error() can be used to determine if an error occurred in the last |
| 168 | operation. lh_error() is a macro. | 173 | operation. lh_<type>_error() is a macro. |
| 169 | 174 | ||
| 170 | =head1 RETURN VALUES | 175 | =head1 RETURN VALUES |
| 171 | 176 | ||
| 172 | lh_new() returns B<NULL> on error, otherwise a pointer to the new | 177 | lh_<type>_new() returns B<NULL> on error, otherwise a pointer to the new |
| 173 | B<LHASH> structure. | 178 | B<LHASH> structure. |
| 174 | 179 | ||
| 175 | When a hash table entry is replaced, lh_insert() returns the value | 180 | When a hash table entry is replaced, lh_<type>_insert() returns the value |
| 176 | being replaced. B<NULL> is returned on normal operation and on error. | 181 | being replaced. B<NULL> is returned on normal operation and on error. |
| 177 | 182 | ||
| 178 | lh_delete() returns the entry being deleted. B<NULL> is returned if | 183 | lh_<type>_delete() returns the entry being deleted. B<NULL> is returned if |
| 179 | there is no such value in the hash table. | 184 | there is no such value in the hash table. |
| 180 | 185 | ||
| 181 | lh_retrieve() returns the hash table entry if it has been found, | 186 | lh_<type>_retrieve() returns the hash table entry if it has been found, |
| 182 | B<NULL> otherwise. | 187 | B<NULL> otherwise. |
| 183 | 188 | ||
| 184 | lh_error() returns 1 if an error occurred in the last operation, 0 | 189 | lh_<type>_error() returns 1 if an error occurred in the last operation, 0 |
| 185 | otherwise. | 190 | otherwise. |
| 186 | 191 | ||
| 187 | lh_free(), lh_doall() and lh_doall_arg() return no values. | 192 | lh_<type>_free(), lh_<type>_doall() and lh_<type>_doall_arg() return no values. |
| 188 | 193 | ||
| 189 | =head1 NOTE | 194 | =head1 NOTE |
| 190 | 195 | ||
| 191 | The various LHASH macros and callback types exist to make it possible | 196 | The various LHASH macros and callback types exist to make it possible |
| 192 | to write type-safe code without resorting to function-prototype | 197 | to write type-checked code without resorting to function-prototype |
| 193 | casting - an evil that makes application code much harder to | 198 | casting - an evil that makes application code much harder to |
| 194 | audit/verify and also opens the window of opportunity for stack | 199 | audit/verify and also opens the window of opportunity for stack |
| 195 | corruption and other hard-to-find bugs. It also, apparently, violates | 200 | corruption and other hard-to-find bugs. It also, apparently, violates |
| @@ -227,7 +232,7 @@ without any "const" qualifiers. | |||
| 227 | 232 | ||
| 228 | =head1 BUGS | 233 | =head1 BUGS |
| 229 | 234 | ||
| 230 | lh_insert() returns B<NULL> both for success and error. | 235 | lh_<type>_insert() returns B<NULL> both for success and error. |
| 231 | 236 | ||
| 232 | =head1 INTERNALS | 237 | =head1 INTERNALS |
| 233 | 238 | ||
| @@ -272,8 +277,8 @@ lh_strhash() is a demo string hashing function: | |||
| 272 | unsigned long lh_strhash(const char *c); | 277 | unsigned long lh_strhash(const char *c); |
| 273 | 278 | ||
| 274 | Since the B<LHASH> routines would normally be passed structures, this | 279 | Since the B<LHASH> routines would normally be passed structures, this |
| 275 | routine would not normally be passed to lh_new(), rather it would be | 280 | routine would not normally be passed to lh_<type>_new(), rather it would be |
| 276 | used in the function passed to lh_new(). | 281 | used in the function passed to lh_<type>_new(). |
| 277 | 282 | ||
| 278 | =head1 SEE ALSO | 283 | =head1 SEE ALSO |
| 279 | 284 | ||
| @@ -291,4 +296,7 @@ were changed for better type safety, and the function types LHASH_COMP_FN_TYPE, | |||
| 291 | LHASH_HASH_FN_TYPE, LHASH_DOALL_FN_TYPE and LHASH_DOALL_ARG_FN_TYPE | 296 | LHASH_HASH_FN_TYPE, LHASH_DOALL_FN_TYPE and LHASH_DOALL_ARG_FN_TYPE |
| 292 | became available. | 297 | became available. |
| 293 | 298 | ||
| 299 | In OpenSSL 1.0.0, the lhash interface was revamped for even better | ||
| 300 | type checking. | ||
| 301 | |||
| 294 | =cut | 302 | =cut |
diff --git a/src/lib/libssl/src/doc/crypto/pem.pod b/src/lib/libssl/src/doc/crypto/pem.pod index 4f9a27df0c..d5b1896119 100644 --- a/src/lib/libssl/src/doc/crypto/pem.pod +++ b/src/lib/libssl/src/doc/crypto/pem.pod | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | PEM - PEM routines | 5 | PEM, PEM_read_bio_PrivateKey, PEM_read_PrivateKey, PEM_write_bio_PrivateKey, PEM_write_PrivateKey, PEM_write_bio_PKCS8PrivateKey, PEM_write_PKCS8PrivateKey, PEM_write_bio_PKCS8PrivateKey_nid, PEM_write_PKCS8PrivateKey_nid, PEM_read_bio_PUBKEY, PEM_read_PUBKEY, PEM_write_bio_PUBKEY, PEM_write_PUBKEY, PEM_read_bio_RSAPrivateKey, PEM_read_RSAPrivateKey, PEM_write_bio_RSAPrivateKey, PEM_write_RSAPrivateKey, PEM_read_bio_RSAPublicKey, PEM_read_RSAPublicKey, PEM_write_bio_RSAPublicKey, PEM_write_RSAPublicKey, PEM_read_bio_RSA_PUBKEY, PEM_read_RSA_PUBKEY, PEM_write_bio_RSA_PUBKEY, PEM_write_RSA_PUBKEY, PEM_read_bio_DSAPrivateKey, PEM_read_DSAPrivateKey, PEM_write_bio_DSAPrivateKey, PEM_write_DSAPrivateKey, PEM_read_bio_DSA_PUBKEY, PEM_read_DSA_PUBKEY, PEM_write_bio_DSA_PUBKEY, PEM_write_DSA_PUBKEY, PEM_read_bio_DSAparams, PEM_read_DSAparams, PEM_write_bio_DSAparams, PEM_write_DSAparams, PEM_read_bio_DHparams, PEM_read_DHparams, PEM_write_bio_DHparams, PEM_write_DHparams, PEM_read_bio_X509, PEM_read_X509, PEM_write_bio_X509, PEM_write_X509, PEM_read_bio_X509_AUX, PEM_read_X509_AUX, PEM_write_bio_X509_AUX, PEM_write_X509_AUX, PEM_read_bio_X509_REQ, PEM_read_X509_REQ, PEM_write_bio_X509_REQ, PEM_write_X509_REQ, PEM_write_bio_X509_REQ_NEW, PEM_write_X509_REQ_NEW, PEM_read_bio_X509_CRL, PEM_read_X509_CRL, PEM_write_bio_X509_CRL, PEM_write_X509_CRL, PEM_read_bio_PKCS7, PEM_read_PKCS7, PEM_write_bio_PKCS7, PEM_write_PKCS7, PEM_read_bio_NETSCAPE_CERT_SEQUENCE, PEM_read_NETSCAPE_CERT_SEQUENCE, PEM_write_bio_NETSCAPE_CERT_SEQUENCE, PEM_write_NETSCAPE_CERT_SEQUENCE - PEM routines |
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
diff --git a/src/lib/libssl/src/doc/crypto/threads.pod b/src/lib/libssl/src/doc/crypto/threads.pod index 3df4ecd776..dc0e9391dc 100644 --- a/src/lib/libssl/src/doc/crypto/threads.pod +++ b/src/lib/libssl/src/doc/crypto/threads.pod | |||
| @@ -2,7 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | CRYPTO_set_locking_callback, CRYPTO_set_id_callback, CRYPTO_num_locks, | 5 | CRYPTO_THREADID_set_callback, CRYPTO_THREADID_get_callback, |
| 6 | CRYPTO_THREADID_current, CRYPTO_THREADID_cmp, CRYPTO_THREADID_cpy, | ||
| 7 | CRYPTO_THREADID_hash, CRYPTO_set_locking_callback, CRYPTO_num_locks, | ||
| 6 | CRYPTO_set_dynlock_create_callback, CRYPTO_set_dynlock_lock_callback, | 8 | CRYPTO_set_dynlock_create_callback, CRYPTO_set_dynlock_lock_callback, |
| 7 | CRYPTO_set_dynlock_destroy_callback, CRYPTO_get_new_dynlockid, | 9 | CRYPTO_set_dynlock_destroy_callback, CRYPTO_get_new_dynlockid, |
| 8 | CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support | 10 | CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support |
| @@ -11,14 +13,26 @@ CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support | |||
| 11 | 13 | ||
| 12 | #include <openssl/crypto.h> | 14 | #include <openssl/crypto.h> |
| 13 | 15 | ||
| 14 | void CRYPTO_set_locking_callback(void (*locking_function)(int mode, | 16 | /* Don't use this structure directly. */ |
| 15 | int n, const char *file, int line)); | 17 | typedef struct crypto_threadid_st |
| 16 | 18 | { | |
| 17 | void CRYPTO_set_id_callback(unsigned long (*id_function)(void)); | 19 | void *ptr; |
| 20 | unsigned long val; | ||
| 21 | } CRYPTO_THREADID; | ||
| 22 | /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */ | ||
| 23 | void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val); | ||
| 24 | void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr); | ||
| 25 | int CRYPTO_THREADID_set_callback(void (*threadid_func)(CRYPTO_THREADID *)); | ||
| 26 | void (*CRYPTO_THREADID_get_callback(void))(CRYPTO_THREADID *); | ||
| 27 | void CRYPTO_THREADID_current(CRYPTO_THREADID *id); | ||
| 28 | int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, | ||
| 29 | const CRYPTO_THREADID *b); | ||
| 30 | void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, | ||
| 31 | const CRYPTO_THREADID *src); | ||
| 32 | unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id); | ||
| 18 | 33 | ||
| 19 | int CRYPTO_num_locks(void); | 34 | int CRYPTO_num_locks(void); |
| 20 | 35 | ||
| 21 | |||
| 22 | /* struct CRYPTO_dynlock_value needs to be defined by the user */ | 36 | /* struct CRYPTO_dynlock_value needs to be defined by the user */ |
| 23 | struct CRYPTO_dynlock_value; | 37 | struct CRYPTO_dynlock_value; |
| 24 | 38 | ||
| @@ -50,7 +64,8 @@ CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support | |||
| 50 | =head1 DESCRIPTION | 64 | =head1 DESCRIPTION |
| 51 | 65 | ||
| 52 | OpenSSL can safely be used in multi-threaded applications provided | 66 | OpenSSL can safely be used in multi-threaded applications provided |
| 53 | that at least two callback functions are set. | 67 | that at least two callback functions are set, locking_function and |
| 68 | threadid_func. | ||
| 54 | 69 | ||
| 55 | locking_function(int mode, int n, const char *file, int line) is | 70 | locking_function(int mode, int n, const char *file, int line) is |
| 56 | needed to perform locking on shared data structures. | 71 | needed to perform locking on shared data structures. |
| @@ -65,10 +80,42 @@ B<CRYPTO_LOCK>, and releases it otherwise. | |||
| 65 | B<file> and B<line> are the file number of the function setting the | 80 | B<file> and B<line> are the file number of the function setting the |
| 66 | lock. They can be useful for debugging. | 81 | lock. They can be useful for debugging. |
| 67 | 82 | ||
| 68 | id_function(void) is a function that returns a thread ID, for example | 83 | threadid_func(CRYPTO_THREADID *id) is needed to record the currently-executing |
| 69 | pthread_self() if it returns an integer (see NOTES below). It isn't | 84 | thread's identifier into B<id>. The implementation of this callback should not |
| 70 | needed on Windows nor on platforms where getpid() returns a different | 85 | fill in B<id> directly, but should use CRYPTO_THREADID_set_numeric() if thread |
| 71 | ID for each thread (see NOTES below). | 86 | IDs are numeric, or CRYPTO_THREADID_set_pointer() if they are pointer-based. |
| 87 | If the application does not register such a callback using | ||
| 88 | CRYPTO_THREADID_set_callback(), then a default implementation is used - on | ||
| 89 | Windows and BeOS this uses the system's default thread identifying APIs, and on | ||
| 90 | all other platforms it uses the address of B<errno>. The latter is satisfactory | ||
| 91 | for thread-safety if and only if the platform has a thread-local error number | ||
| 92 | facility. | ||
| 93 | |||
| 94 | Once threadid_func() is registered, or if the built-in default implementation is | ||
| 95 | to be used; | ||
| 96 | |||
| 97 | =over 4 | ||
| 98 | |||
| 99 | =item * | ||
| 100 | CRYPTO_THREADID_current() records the currently-executing thread ID into the | ||
| 101 | given B<id> object. | ||
| 102 | |||
| 103 | =item * | ||
| 104 | CRYPTO_THREADID_cmp() compares two thread IDs (returning zero for equality, ie. | ||
| 105 | the same semantics as memcmp()). | ||
| 106 | |||
| 107 | =item * | ||
| 108 | CRYPTO_THREADID_cpy() duplicates a thread ID value, | ||
| 109 | |||
| 110 | =item * | ||
| 111 | CRYPTO_THREADID_hash() returns a numeric value usable as a hash-table key. This | ||
| 112 | is usually the exact numeric or pointer-based thread ID used internally, however | ||
| 113 | this also handles the unusual case where pointers are larger than 'long' | ||
| 114 | variables and the platform's thread IDs are pointer-based - in this case, mixing | ||
| 115 | is done to attempt to produce a unique numeric value even though it is not as | ||
| 116 | wide as the platform's true thread IDs. | ||
| 117 | |||
| 118 | =back | ||
| 72 | 119 | ||
| 73 | Additionally, OpenSSL supports dynamic locks, and sometimes, some parts | 120 | Additionally, OpenSSL supports dynamic locks, and sometimes, some parts |
| 74 | of OpenSSL need it for better performance. To enable this, the following | 121 | of OpenSSL need it for better performance. To enable this, the following |
| @@ -140,22 +187,6 @@ You can find out if OpenSSL was configured with thread support: | |||
| 140 | Also, dynamic locks are currently not used internally by OpenSSL, but | 187 | Also, dynamic locks are currently not used internally by OpenSSL, but |
| 141 | may do so in the future. | 188 | may do so in the future. |
| 142 | 189 | ||
| 143 | Defining id_function(void) has it's own issues. Generally speaking, | ||
| 144 | pthread_self() should be used, even on platforms where getpid() gives | ||
| 145 | different answers in each thread, since that may depend on the machine | ||
| 146 | the program is run on, not the machine where the program is being | ||
| 147 | compiled. For instance, Red Hat 8 Linux and earlier used | ||
| 148 | LinuxThreads, whose getpid() returns a different value for each | ||
| 149 | thread. Red Hat 9 Linux and later use NPTL, which is | ||
| 150 | Posix-conformant, and has a getpid() that returns the same value for | ||
| 151 | all threads in a process. A program compiled on Red Hat 8 and run on | ||
| 152 | Red Hat 9 will therefore see getpid() returning the same value for | ||
| 153 | all threads. | ||
| 154 | |||
| 155 | There is still the issue of platforms where pthread_self() returns | ||
| 156 | something other than an integer. This is a bit unusual, and this | ||
| 157 | manual has no cookbook solution for that case. | ||
| 158 | |||
| 159 | =head1 EXAMPLES | 190 | =head1 EXAMPLES |
| 160 | 191 | ||
| 161 | B<crypto/threads/mttest.c> shows examples of the callback functions on | 192 | B<crypto/threads/mttest.c> shows examples of the callback functions on |
| @@ -163,10 +194,14 @@ Solaris, Irix and Win32. | |||
| 163 | 194 | ||
| 164 | =head1 HISTORY | 195 | =head1 HISTORY |
| 165 | 196 | ||
| 166 | CRYPTO_set_locking_callback() and CRYPTO_set_id_callback() are | 197 | CRYPTO_set_locking_callback() is |
| 167 | available in all versions of SSLeay and OpenSSL. | 198 | available in all versions of SSLeay and OpenSSL. |
| 168 | CRYPTO_num_locks() was added in OpenSSL 0.9.4. | 199 | CRYPTO_num_locks() was added in OpenSSL 0.9.4. |
| 169 | All functions dealing with dynamic locks were added in OpenSSL 0.9.5b-dev. | 200 | All functions dealing with dynamic locks were added in OpenSSL 0.9.5b-dev. |
| 201 | B<CRYPTO_THREADID> and associated functions were introduced in OpenSSL 1.0.0 | ||
| 202 | to replace (actually, deprecate) the previous CRYPTO_set_id_callback(), | ||
| 203 | CRYPTO_get_id_callback(), and CRYPTO_thread_id() functions which assumed | ||
| 204 | thread IDs to always be represented by 'unsigned long'. | ||
| 170 | 205 | ||
| 171 | =head1 SEE ALSO | 206 | =head1 SEE ALSO |
| 172 | 207 | ||
diff --git a/src/lib/libssl/src/doc/crypto/ui_compat.pod b/src/lib/libssl/src/doc/crypto/ui_compat.pod index 9ab3c69bf2..adf2ae5e53 100644 --- a/src/lib/libssl/src/doc/crypto/ui_compat.pod +++ b/src/lib/libssl/src/doc/crypto/ui_compat.pod | |||
| @@ -7,6 +7,8 @@ Compatibility user interface functions | |||
| 7 | 7 | ||
| 8 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
| 9 | 9 | ||
| 10 | #include <openssl/des_old.h> | ||
| 11 | |||
| 10 | int des_read_password(DES_cblock *key,const char *prompt,int verify); | 12 | int des_read_password(DES_cblock *key,const char *prompt,int verify); |
| 11 | int des_read_2passwords(DES_cblock *key1,DES_cblock *key2, | 13 | int des_read_2passwords(DES_cblock *key1,DES_cblock *key2, |
| 12 | const char *prompt,int verify); | 14 | const char *prompt,int verify); |
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod b/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod index f62a869a9b..eb772b55de 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod | |||
| @@ -11,7 +11,7 @@ SSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version, SSL_CIPHER_des | |||
| 11 | const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher); | 11 | const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher); |
| 12 | int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); | 12 | int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); |
| 13 | char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher); | 13 | char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher); |
| 14 | char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int size); | 14 | char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int size); |
| 15 | 15 | ||
| 16 | =head1 DESCRIPTION | 16 | =head1 DESCRIPTION |
| 17 | 17 | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_new.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_new.pod index 465220a75c..73e8c47f9a 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_new.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_new.pod | |||
| @@ -8,7 +8,7 @@ SSL_CTX_new - create a new SSL_CTX object as framework for TLS/SSL enabled funct | |||
| 8 | 8 | ||
| 9 | #include <openssl/ssl.h> | 9 | #include <openssl/ssl.h> |
| 10 | 10 | ||
| 11 | SSL_CTX *SSL_CTX_new(SSL_METHOD *method); | 11 | SSL_CTX *SSL_CTX_new(const SSL_METHOD *method); |
| 12 | 12 | ||
| 13 | =head1 DESCRIPTION | 13 | =head1 DESCRIPTION |
| 14 | 14 | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_mode.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_mode.pod index 9822544e5e..8cb669daeb 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_mode.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_mode.pod | |||
| @@ -61,6 +61,16 @@ deal with read/write operations returning without success report. The | |||
| 61 | flag SSL_MODE_AUTO_RETRY will cause read/write operations to only | 61 | flag SSL_MODE_AUTO_RETRY will cause read/write operations to only |
| 62 | return after the handshake and successful completion. | 62 | return after the handshake and successful completion. |
| 63 | 63 | ||
| 64 | =item SSL_MODE_RELEASE_BUFFERS | ||
| 65 | |||
| 66 | When we no longer need a read buffer or a write buffer for a given SSL, | ||
| 67 | then release the memory we were using to hold it. Released memory is | ||
| 68 | either appended to a list of unused RAM chunks on the SSL_CTX, or simply | ||
| 69 | freed if the list of unused chunks would become longer than | ||
| 70 | SSL_CTX->freelist_max_len, which defaults to 32. Using this flag can | ||
| 71 | save around 34k per idle SSL connection. | ||
| 72 | This flag has no effect on SSL v2 connections, or on DTLS connections. | ||
| 73 | |||
| 64 | =back | 74 | =back |
| 65 | 75 | ||
| 66 | =head1 RETURN VALUES | 76 | =head1 RETURN VALUES |
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 eaed190809..310db84b31 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 | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME |
| 4 | 4 | ||
| 5 | SSL_CTX_set_options, SSL_set_options, SSL_CTX_get_options, SSL_get_options - manipulate SSL engine options | 5 | SSL_CTX_set_options, SSL_set_options, SSL_CTX_clear_options, SSL_clear_options, SSL_CTX_get_options, SSL_get_options, SSL_get_secure_renegotiation_support - manipulate SSL options |
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS |
| 8 | 8 | ||
| @@ -11,26 +11,41 @@ SSL_CTX_set_options, SSL_set_options, SSL_CTX_get_options, SSL_get_options - man | |||
| 11 | long SSL_CTX_set_options(SSL_CTX *ctx, long options); | 11 | long SSL_CTX_set_options(SSL_CTX *ctx, long options); |
| 12 | long SSL_set_options(SSL *ssl, long options); | 12 | long SSL_set_options(SSL *ssl, long options); |
| 13 | 13 | ||
| 14 | long SSL_CTX_clear_options(SSL_CTX *ctx, long options); | ||
| 15 | long SSL_clear_options(SSL *ssl, long options); | ||
| 16 | |||
| 14 | long SSL_CTX_get_options(SSL_CTX *ctx); | 17 | long SSL_CTX_get_options(SSL_CTX *ctx); |
| 15 | long SSL_get_options(SSL *ssl); | 18 | long SSL_get_options(SSL *ssl); |
| 16 | 19 | ||
| 20 | long SSL_get_secure_renegotiation_support(SSL *ssl); | ||
| 21 | |||
| 17 | =head1 DESCRIPTION | 22 | =head1 DESCRIPTION |
| 18 | 23 | ||
| 24 | Note: all these functions are implemented using macros. | ||
| 25 | |||
| 19 | SSL_CTX_set_options() adds the options set via bitmask in B<options> to B<ctx>. | 26 | SSL_CTX_set_options() adds the options set via bitmask in B<options> to B<ctx>. |
| 20 | Options already set before are not cleared! | 27 | Options already set before are not cleared! |
| 21 | 28 | ||
| 22 | SSL_set_options() adds the options set via bitmask in B<options> to B<ssl>. | 29 | SSL_set_options() adds the options set via bitmask in B<options> to B<ssl>. |
| 23 | Options already set before are not cleared! | 30 | Options already set before are not cleared! |
| 24 | 31 | ||
| 32 | SSL_CTX_clear_options() clears the options set via bitmask in B<options> | ||
| 33 | to B<ctx>. | ||
| 34 | |||
| 35 | SSL_clear_options() clears the options set via bitmask in B<options> to B<ssl>. | ||
| 36 | |||
| 25 | SSL_CTX_get_options() returns the options set for B<ctx>. | 37 | SSL_CTX_get_options() returns the options set for B<ctx>. |
| 26 | 38 | ||
| 27 | SSL_get_options() returns the options set for B<ssl>. | 39 | SSL_get_options() returns the options set for B<ssl>. |
| 28 | 40 | ||
| 41 | SSL_get_secure_renegotiation_support() indicates whether the peer supports | ||
| 42 | secure renegotiation. | ||
| 43 | |||
| 29 | =head1 NOTES | 44 | =head1 NOTES |
| 30 | 45 | ||
| 31 | The behaviour of the SSL library can be changed by setting several options. | 46 | The behaviour of the SSL library can be changed by setting several options. |
| 32 | The options are coded as bitmasks and can be combined by a logical B<or> | 47 | The options are coded as bitmasks and can be combined by a logical B<or> |
| 33 | operation (|). Options can only be added but can never be reset. | 48 | operation (|). |
| 34 | 49 | ||
| 35 | SSL_CTX_set_options() and SSL_set_options() affect the (external) | 50 | SSL_CTX_set_options() and SSL_set_options() affect the (external) |
| 36 | protocol behaviour of the SSL library. The (internal) behaviour of | 51 | protocol behaviour of the SSL library. The (internal) behaviour of |
| @@ -199,26 +214,117 @@ Do not use the TLSv1 protocol. | |||
| 199 | 214 | ||
| 200 | When performing renegotiation as a server, always start a new session | 215 | When performing renegotiation as a server, always start a new session |
| 201 | (i.e., session resumption requests are only accepted in the initial | 216 | (i.e., session resumption requests are only accepted in the initial |
| 202 | handshake). This option is not needed for clients. | 217 | handshake). This option is not needed for clients. |
| 203 | 218 | ||
| 204 | =item SSL_OP_NO_TICKET | 219 | =item SSL_OP_NO_TICKET |
| 205 | 220 | ||
| 206 | Normally clients and servers will, where possible, transparently make use | 221 | Normally clients and servers will, where possible, transparently make use |
| 207 | of RFC4507bis tickets for stateless session resumption if extension support | 222 | of RFC4507bis tickets for stateless session resumption. |
| 208 | is explicitly set when OpenSSL is compiled. | ||
| 209 | 223 | ||
| 210 | If this option is set this functionality is disabled and tickets will | 224 | If this option is set this functionality is disabled and tickets will |
| 211 | not be used by clients or servers. | 225 | not be used by clients or servers. |
| 212 | 226 | ||
| 227 | =item SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION | ||
| 228 | |||
| 229 | Allow legacy insecure renegotiation between OpenSSL and unpatched clients or | ||
| 230 | servers. See the B<SECURE RENEGOTIATION> section for more details. | ||
| 231 | |||
| 232 | =item SSL_OP_LEGACY_SERVER_CONNECT | ||
| 233 | |||
| 234 | Allow legacy insecure renegotiation between OpenSSL and unpatched servers | ||
| 235 | B<only>: this option is currently set by default. See the | ||
| 236 | B<SECURE RENEGOTIATION> section for more details. | ||
| 237 | |||
| 213 | =back | 238 | =back |
| 214 | 239 | ||
| 240 | =head1 SECURE RENEGOTIATION | ||
| 241 | |||
| 242 | OpenSSL 0.9.8m and later always attempts to use secure renegotiation as | ||
| 243 | described in RFC5746. This counters the prefix attack described in | ||
| 244 | CVE-2009-3555 and elsewhere. | ||
| 245 | |||
| 246 | The deprecated and highly broken SSLv2 protocol does not support | ||
| 247 | renegotiation at all: its use is B<strongly> discouraged. | ||
| 248 | |||
| 249 | This attack has far reaching consequences which application writers should be | ||
| 250 | aware of. In the description below an implementation supporting secure | ||
| 251 | renegotiation is referred to as I<patched>. A server not supporting secure | ||
| 252 | renegotiation is referred to as I<unpatched>. | ||
| 253 | |||
| 254 | The following sections describe the operations permitted by OpenSSL's secure | ||
| 255 | renegotiation implementation. | ||
| 256 | |||
| 257 | =head2 Patched client and server | ||
| 258 | |||
| 259 | Connections and renegotiation are always permitted by OpenSSL implementations. | ||
| 260 | |||
| 261 | =head2 Unpatched client and patched OpenSSL server | ||
| 262 | |||
| 263 | The initial connection suceeds but client renegotiation is denied by the | ||
| 264 | server with a B<no_renegotiation> warning alert if TLS v1.0 is used or a fatal | ||
| 265 | B<handshake_failure> alert in SSL v3.0. | ||
| 266 | |||
| 267 | If the patched OpenSSL server attempts to renegotiate a fatal | ||
| 268 | B<handshake_failure> alert is sent. This is because the server code may be | ||
| 269 | unaware of the unpatched nature of the client. | ||
| 270 | |||
| 271 | If the option B<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION> is set then | ||
| 272 | renegotiation B<always> succeeds. | ||
| 273 | |||
| 274 | B<NB:> a bug in OpenSSL clients earlier than 0.9.8m (all of which are | ||
| 275 | unpatched) will result in the connection hanging if it receives a | ||
| 276 | B<no_renegotiation> alert. OpenSSL versions 0.9.8m and later will regard | ||
| 277 | a B<no_renegotiation> alert as fatal and respond with a fatal | ||
| 278 | B<handshake_failure> alert. This is because the OpenSSL API currently has | ||
| 279 | no provision to indicate to an application that a renegotiation attempt | ||
| 280 | was refused. | ||
| 281 | |||
| 282 | =head2 Patched OpenSSL client and unpatched server. | ||
| 283 | |||
| 284 | If the option B<SSL_OP_LEGACY_SERVER_CONNECT> or | ||
| 285 | B<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION> is set then initial connections | ||
| 286 | and renegotiation between patched OpenSSL clients and unpatched servers | ||
| 287 | succeeds. If neither option is set then initial connections to unpatched | ||
| 288 | servers will fail. | ||
| 289 | |||
| 290 | The option B<SSL_OP_LEGACY_SERVER_CONNECT> is currently set by default even | ||
| 291 | though it has security implications: otherwise it would be impossible to | ||
| 292 | connect to unpatched servers (i.e. all of them initially) and this is clearly | ||
| 293 | not acceptable. Renegotiation is permitted because this does not add any | ||
| 294 | additional security issues: during an attack clients do not see any | ||
| 295 | renegotiations anyway. | ||
| 296 | |||
| 297 | As more servers become patched the option B<SSL_OP_LEGACY_SERVER_CONNECT> will | ||
| 298 | B<not> be set by default in a future version of OpenSSL. | ||
| 299 | |||
| 300 | OpenSSL client applications wishing to ensure they can connect to unpatched | ||
| 301 | servers should always B<set> B<SSL_OP_LEGACY_SERVER_CONNECT> | ||
| 302 | |||
| 303 | OpenSSL client applications that want to ensure they can B<not> connect to | ||
| 304 | unpatched servers (and thus avoid any security issues) should always B<clear> | ||
| 305 | B<SSL_OP_LEGACY_SERVER_CONNECT> using SSL_CTX_clear_options() or | ||
| 306 | SSL_clear_options(). | ||
| 307 | |||
| 308 | The difference between the B<SSL_OP_LEGACY_SERVER_CONNECT> and | ||
| 309 | B<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION> options is that | ||
| 310 | B<SSL_OP_LEGACY_SERVER_CONNECT> enables initial connections and secure | ||
| 311 | renegotiation between OpenSSL clients and unpatched servers B<only>, while | ||
| 312 | B<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION> allows initial connections | ||
| 313 | and renegotiation between OpenSSL and unpatched clients or servers. | ||
| 314 | |||
| 215 | =head1 RETURN VALUES | 315 | =head1 RETURN VALUES |
| 216 | 316 | ||
| 217 | SSL_CTX_set_options() and SSL_set_options() return the new options bitmask | 317 | SSL_CTX_set_options() and SSL_set_options() return the new options bitmask |
| 218 | after adding B<options>. | 318 | after adding B<options>. |
| 219 | 319 | ||
| 320 | SSL_CTX_clear_options() and SSL_clear_options() return the new options bitmask | ||
| 321 | after clearing B<options>. | ||
| 322 | |||
| 220 | SSL_CTX_get_options() and SSL_get_options() return the current bitmask. | 323 | SSL_CTX_get_options() and SSL_get_options() return the current bitmask. |
| 221 | 324 | ||
| 325 | SSL_get_secure_renegotiation_support() returns 1 is the peer supports | ||
| 326 | secure renegotiation and 0 if it does not. | ||
| 327 | |||
| 222 | =head1 SEE ALSO | 328 | =head1 SEE ALSO |
| 223 | 329 | ||
| 224 | L<ssl(3)|ssl(3)>, L<SSL_new(3)|SSL_new(3)>, L<SSL_clear(3)|SSL_clear(3)>, | 330 | L<ssl(3)|ssl(3)>, L<SSL_new(3)|SSL_new(3)>, L<SSL_clear(3)|SSL_clear(3)>, |
| @@ -241,4 +347,11 @@ Versions up to OpenSSL 0.9.6c do not include the countermeasure that | |||
| 241 | can be disabled with this option (in OpenSSL 0.9.6d, it was always | 347 | can be disabled with this option (in OpenSSL 0.9.6d, it was always |
| 242 | enabled). | 348 | enabled). |
| 243 | 349 | ||
| 350 | SSL_CTX_clear_options() and SSL_clear_options() were first added in OpenSSL | ||
| 351 | 0.9.8m. | ||
| 352 | |||
| 353 | B<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION>, B<SSL_OP_LEGACY_SERVER_CONNECT> | ||
| 354 | and the function SSL_get_secure_renegotiation_support() were first added in | ||
| 355 | OpenSSL 0.9.8m. | ||
| 356 | |||
| 244 | =cut | 357 | =cut |
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_ssl_version.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_ssl_version.pod index 0020180965..254f2b4397 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_ssl_version.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_ssl_version.pod | |||
| @@ -9,9 +9,9 @@ SSL_CTX_set_ssl_version, SSL_set_ssl_method, SSL_get_ssl_method | |||
| 9 | 9 | ||
| 10 | #include <openssl/ssl.h> | 10 | #include <openssl/ssl.h> |
| 11 | 11 | ||
| 12 | int SSL_CTX_set_ssl_version(SSL_CTX *ctx, SSL_METHOD *method); | 12 | int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *method); |
| 13 | int SSL_set_ssl_method(SSL *s, SSL_METHOD *method); | 13 | int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); |
| 14 | SSL_METHOD *SSL_get_ssl_method(SSL *ssl); | 14 | const SSL_METHOD *SSL_get_ssl_method(SSL *ssl); |
| 15 | 15 | ||
| 16 | =head1 DESCRIPTION | 16 | =head1 DESCRIPTION |
| 17 | 17 | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_library_init.pod b/src/lib/libssl/src/doc/ssl/SSL_library_init.pod index ecf3c4858e..8766776fea 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_library_init.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_library_init.pod | |||
| @@ -15,7 +15,7 @@ SSL_library_init, OpenSSL_add_ssl_algorithms, SSLeay_add_ssl_algorithms | |||
| 15 | 15 | ||
| 16 | =head1 DESCRIPTION | 16 | =head1 DESCRIPTION |
| 17 | 17 | ||
| 18 | SSL_library_init() registers the available ciphers and digests. | 18 | SSL_library_init() registers the available SSL/TLS ciphers and digests. |
| 19 | 19 | ||
| 20 | OpenSSL_add_ssl_algorithms() and SSLeay_add_ssl_algorithms() are synonyms | 20 | OpenSSL_add_ssl_algorithms() and SSLeay_add_ssl_algorithms() are synonyms |
| 21 | for SSL_library_init(). | 21 | for SSL_library_init(). |
| @@ -23,27 +23,32 @@ for SSL_library_init(). | |||
| 23 | =head1 NOTES | 23 | =head1 NOTES |
| 24 | 24 | ||
| 25 | SSL_library_init() must be called before any other action takes place. | 25 | SSL_library_init() must be called before any other action takes place. |
| 26 | SSL_library_init() is not reentrant. | ||
| 26 | 27 | ||
| 27 | =head1 WARNING | 28 | =head1 WARNING |
| 28 | 29 | ||
| 29 | SSL_library_init() only registers ciphers. Another important initialization | 30 | SSL_library_init() adds ciphers and digests used directly and indirectly by |
| 30 | is the seeding of the PRNG (Pseudo Random Number Generator), which has to | 31 | SSL/TLS. |
| 31 | be performed separately. | ||
| 32 | 32 | ||
| 33 | =head1 EXAMPLES | 33 | =head1 EXAMPLES |
| 34 | 34 | ||
| 35 | A typical TLS/SSL application will start with the library initialization, | 35 | A typical TLS/SSL application will start with the library initialization, |
| 36 | will provide readable error messages and will seed the PRNG. | 36 | and provide readable error messages. |
| 37 | 37 | ||
| 38 | SSL_load_error_strings(); /* readable error messages */ | 38 | SSL_load_error_strings(); /* readable error messages */ |
| 39 | SSL_library_init(); /* initialize library */ | 39 | SSL_library_init(); /* initialize library */ |
| 40 | actions_to_seed_PRNG(); | ||
| 41 | 40 | ||
| 42 | =head1 RETURN VALUES | 41 | =head1 RETURN VALUES |
| 43 | 42 | ||
| 44 | SSL_library_init() always returns "1", so it is safe to discard the return | 43 | SSL_library_init() always returns "1", so it is safe to discard the return |
| 45 | value. | 44 | value. |
| 46 | 45 | ||
| 46 | =head1 NOTES | ||
| 47 | |||
| 48 | OpenSSL 0.9.8o and 1.0.0a and later added SHA2 algorithms to SSL_library_init(). | ||
| 49 | Applications which need to use SHA2 in earlier versions of OpenSSL should call | ||
| 50 | OpenSSL_add_all_algorithms() as well. | ||
| 51 | |||
| 47 | =head1 SEE ALSO | 52 | =head1 SEE ALSO |
| 48 | 53 | ||
| 49 | L<ssl(3)|ssl(3)>, L<SSL_load_error_strings(3)|SSL_load_error_strings(3)>, | 54 | L<ssl(3)|ssl(3)>, L<SSL_load_error_strings(3)|SSL_load_error_strings(3)>, |
diff --git a/src/lib/libssl/src/doc/ssl/ssl.pod b/src/lib/libssl/src/doc/ssl/ssl.pod index 266697d221..2b6004ee32 100644 --- a/src/lib/libssl/src/doc/ssl/ssl.pod +++ b/src/lib/libssl/src/doc/ssl/ssl.pod | |||
| @@ -130,39 +130,39 @@ protocol methods defined in B<SSL_METHOD> structures. | |||
| 130 | 130 | ||
| 131 | =over 4 | 131 | =over 4 |
| 132 | 132 | ||
| 133 | =item SSL_METHOD *B<SSLv2_client_method>(void); | 133 | =item const SSL_METHOD *B<SSLv2_client_method>(void); |
| 134 | 134 | ||
| 135 | Constructor for the SSLv2 SSL_METHOD structure for a dedicated client. | 135 | Constructor for the SSLv2 SSL_METHOD structure for a dedicated client. |
| 136 | 136 | ||
| 137 | =item SSL_METHOD *B<SSLv2_server_method>(void); | 137 | =item const SSL_METHOD *B<SSLv2_server_method>(void); |
| 138 | 138 | ||
| 139 | Constructor for the SSLv2 SSL_METHOD structure for a dedicated server. | 139 | Constructor for the SSLv2 SSL_METHOD structure for a dedicated server. |
| 140 | 140 | ||
| 141 | =item SSL_METHOD *B<SSLv2_method>(void); | 141 | =item const SSL_METHOD *B<SSLv2_method>(void); |
| 142 | 142 | ||
| 143 | Constructor for the SSLv2 SSL_METHOD structure for combined client and server. | 143 | Constructor for the SSLv2 SSL_METHOD structure for combined client and server. |
| 144 | 144 | ||
| 145 | =item SSL_METHOD *B<SSLv3_client_method>(void); | 145 | =item const SSL_METHOD *B<SSLv3_client_method>(void); |
| 146 | 146 | ||
| 147 | Constructor for the SSLv3 SSL_METHOD structure for a dedicated client. | 147 | Constructor for the SSLv3 SSL_METHOD structure for a dedicated client. |
| 148 | 148 | ||
| 149 | =item SSL_METHOD *B<SSLv3_server_method>(void); | 149 | =item const SSL_METHOD *B<SSLv3_server_method>(void); |
| 150 | 150 | ||
| 151 | Constructor for the SSLv3 SSL_METHOD structure for a dedicated server. | 151 | Constructor for the SSLv3 SSL_METHOD structure for a dedicated server. |
| 152 | 152 | ||
| 153 | =item SSL_METHOD *B<SSLv3_method>(void); | 153 | =item const SSL_METHOD *B<SSLv3_method>(void); |
| 154 | 154 | ||
| 155 | Constructor for the SSLv3 SSL_METHOD structure for combined client and server. | 155 | Constructor for the SSLv3 SSL_METHOD structure for combined client and server. |
| 156 | 156 | ||
| 157 | =item SSL_METHOD *B<TLSv1_client_method>(void); | 157 | =item const SSL_METHOD *B<TLSv1_client_method>(void); |
| 158 | 158 | ||
| 159 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated client. | 159 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated client. |
| 160 | 160 | ||
| 161 | =item SSL_METHOD *B<TLSv1_server_method>(void); | 161 | =item cosnt SSL_METHOD *B<TLSv1_server_method>(void); |
| 162 | 162 | ||
| 163 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated server. | 163 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated server. |
| 164 | 164 | ||
| 165 | =item SSL_METHOD *B<TLSv1_method>(void); | 165 | =item const SSL_METHOD *B<TLSv1_method>(void); |
| 166 | 166 | ||
| 167 | Constructor for the TLSv1 SSL_METHOD structure for combined client and server. | 167 | Constructor for the TLSv1 SSL_METHOD structure for combined client and server. |
| 168 | 168 | ||
| @@ -249,7 +249,7 @@ protocol context defined in the B<SSL_CTX> structure. | |||
| 249 | 249 | ||
| 250 | =item long B<SSL_CTX_need_tmp_RSA>(SSL_CTX *ctx); | 250 | =item long B<SSL_CTX_need_tmp_RSA>(SSL_CTX *ctx); |
| 251 | 251 | ||
| 252 | =item SSL_CTX *B<SSL_CTX_new>(SSL_METHOD *meth); | 252 | =item SSL_CTX *B<SSL_CTX_new>(const SSL_METHOD *meth); |
| 253 | 253 | ||
| 254 | =item int B<SSL_CTX_remove_session>(SSL_CTX *ctx, SSL_SESSION *c); | 254 | =item int B<SSL_CTX_remove_session>(SSL_CTX *ctx, SSL_SESSION *c); |
| 255 | 255 | ||
| @@ -327,7 +327,7 @@ protocol context defined in the B<SSL_CTX> structure. | |||
| 327 | 327 | ||
| 328 | =item void B<SSL_CTX_set_session_cache_mode>(SSL_CTX *ctx, int mode); | 328 | =item void B<SSL_CTX_set_session_cache_mode>(SSL_CTX *ctx, int mode); |
| 329 | 329 | ||
| 330 | =item int B<SSL_CTX_set_ssl_version>(SSL_CTX *ctx, SSL_METHOD *meth); | 330 | =item int B<SSL_CTX_set_ssl_version>(SSL_CTX *ctx, const SSL_METHOD *meth); |
| 331 | 331 | ||
| 332 | =item void B<SSL_CTX_set_timeout>(SSL_CTX *ctx, long t); | 332 | =item void B<SSL_CTX_set_timeout>(SSL_CTX *ctx, long t); |
| 333 | 333 | ||
| @@ -374,6 +374,15 @@ session instead of a context. | |||
| 374 | 374 | ||
| 375 | =item int B<SSL_CTX_use_certificate_file>(SSL_CTX *ctx, char *file, int type); | 375 | =item int B<SSL_CTX_use_certificate_file>(SSL_CTX *ctx, char *file, int type); |
| 376 | 376 | ||
| 377 | =item void B<SSL_CTX_set_psk_client_callback>(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)); | ||
| 378 | |||
| 379 | =item int B<SSL_CTX_use_psk_identity_hint>(SSL_CTX *ctx, const char *hint); | ||
| 380 | |||
| 381 | =item void B<SSL_CTX_set_psk_server_callback>(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)); | ||
| 382 | |||
| 383 | |||
| 384 | |||
| 385 | |||
| 377 | =back | 386 | =back |
| 378 | 387 | ||
| 379 | =head2 DEALING WITH SESSIONS | 388 | =head2 DEALING WITH SESSIONS |
| @@ -512,7 +521,7 @@ connection defined in the B<SSL> structure. | |||
| 512 | 521 | ||
| 513 | =item int B<SSL_get_shutdown>(const SSL *ssl); | 522 | =item int B<SSL_get_shutdown>(const SSL *ssl); |
| 514 | 523 | ||
| 515 | =item SSL_METHOD *B<SSL_get_ssl_method>(SSL *ssl); | 524 | =item const SSL_METHOD *B<SSL_get_ssl_method>(SSL *ssl); |
| 516 | 525 | ||
| 517 | =item int B<SSL_get_state>(const SSL *ssl); | 526 | =item int B<SSL_get_state>(const SSL *ssl); |
| 518 | 527 | ||
| @@ -596,7 +605,7 @@ connection defined in the B<SSL> structure. | |||
| 596 | 605 | ||
| 597 | =item void B<SSL_set_shutdown>(SSL *ssl, int mode); | 606 | =item void B<SSL_set_shutdown>(SSL *ssl, int mode); |
| 598 | 607 | ||
| 599 | =item int B<SSL_set_ssl_method>(SSL *ssl, SSL_METHOD *meth); | 608 | =item int B<SSL_set_ssl_method>(SSL *ssl, const SSL_METHOD *meth); |
| 600 | 609 | ||
| 601 | =item void B<SSL_set_time>(SSL *ssl, long t); | 610 | =item void B<SSL_set_time>(SSL *ssl, long t); |
| 602 | 611 | ||
| @@ -650,6 +659,16 @@ connection defined in the B<SSL> structure. | |||
| 650 | 659 | ||
| 651 | =item int B<SSL_write>(SSL *ssl, const void *buf, int num); | 660 | =item int B<SSL_write>(SSL *ssl, const void *buf, int num); |
| 652 | 661 | ||
| 662 | =item void B<SSL_set_psk_client_callback>(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)); | ||
| 663 | |||
| 664 | =item int B<SSL_use_psk_identity_hint>(SSL *ssl, const char *hint); | ||
| 665 | |||
| 666 | =item void B<SSL_set_psk_server_callback>(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)); | ||
| 667 | |||
| 668 | =item const char *B<SSL_get_psk_identity_hint>(SSL *ssl); | ||
| 669 | |||
| 670 | =item const char *B<SSL_get_psk_identity>(SSL *ssl); | ||
| 671 | |||
| 653 | =back | 672 | =back |
| 654 | 673 | ||
| 655 | =head1 SEE ALSO | 674 | =head1 SEE ALSO |
| @@ -726,7 +745,10 @@ L<SSL_write(3)|SSL_write(3)>, | |||
| 726 | L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>, | 745 | L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>, |
| 727 | L<SSL_SESSION_get_ex_new_index(3)|SSL_SESSION_get_ex_new_index(3)>, | 746 | L<SSL_SESSION_get_ex_new_index(3)|SSL_SESSION_get_ex_new_index(3)>, |
| 728 | L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)>, | 747 | L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)>, |
| 729 | L<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)> | 748 | L<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)>, |
| 749 | L<SSL_CTX_set_psk_client_callback(3)|SSL_CTX_set_psk_client_callback(3)>, | ||
| 750 | L<SSL_CTX_use_psk_identity_hint(3)|SSL_CTX_use_psk_identity_hint(3)>, | ||
| 751 | L<SSL_get_psk_identity(3)|SSL_get_psk_identity(3)> | ||
| 730 | 752 | ||
| 731 | =head1 HISTORY | 753 | =head1 HISTORY |
| 732 | 754 | ||
diff --git a/src/lib/libssl/src/doc/ssleay.txt b/src/lib/libssl/src/doc/ssleay.txt index a8b04d7059..4d2e714868 100644 --- a/src/lib/libssl/src/doc/ssleay.txt +++ b/src/lib/libssl/src/doc/ssleay.txt | |||
| @@ -20,7 +20,7 @@ don't do that. | |||
| 20 | ==== readme ======================================================== | 20 | ==== readme ======================================================== |
| 21 | 21 | ||
| 22 | This is the old 0.6.6 docuementation. Most of the cipher stuff is still | 22 | This is the old 0.6.6 docuementation. Most of the cipher stuff is still |
| 23 | relevent but I'm working (very slowly) on new docuemtation. | 23 | relevent but I'm working (very slowly) on new documentation. |
| 24 | The current version can be found online at | 24 | The current version can be found online at |
| 25 | 25 | ||
| 26 | http://www.cryptsoft.com/ssleay/doc | 26 | http://www.cryptsoft.com/ssleay/doc |
| @@ -548,8 +548,8 @@ application, ssleay. This one program is composed of many programs that | |||
| 548 | can all be compiled independantly. | 548 | can all be compiled independantly. |
| 549 | 549 | ||
| 550 | ssleay has 3 modes of operation. | 550 | ssleay has 3 modes of operation. |
| 551 | 1) If the ssleay binaray has the name of one of its component programs, it | 551 | 1) If the ssleay binary has the name of one of its component programs, it |
| 552 | executes that program and then exits. This can be achieve by using hard or | 552 | executes that program and then exits. This can be achieved by using hard or |
| 553 | symbolic links, or failing that, just renaming the binary. | 553 | symbolic links, or failing that, just renaming the binary. |
| 554 | 2) If the first argument to ssleay is the name of one of the component | 554 | 2) If the first argument to ssleay is the name of one of the component |
| 555 | programs, that program runs that program and then exits. | 555 | programs, that program runs that program and then exits. |
| @@ -1185,7 +1185,7 @@ typedef struct bio_st | |||
| 1185 | example is for BIO_s_sock(). A socket needs to be | 1185 | example is for BIO_s_sock(). A socket needs to be |
| 1186 | assigned to the BIO before it can be used. | 1186 | assigned to the BIO before it can be used. |
| 1187 | - 'shutdown', this flag indicates if the underlying | 1187 | - 'shutdown', this flag indicates if the underlying |
| 1188 | comunication primative being used should be closed/freed | 1188 | communication primitive being used should be closed/freed |
| 1189 | when the BIO is closed. | 1189 | when the BIO is closed. |
| 1190 | - 'flags' is used to hold extra state. It is primarily used | 1190 | - 'flags' is used to hold extra state. It is primarily used |
| 1191 | to hold information about why a non-blocking operation | 1191 | to hold information about why a non-blocking operation |
| @@ -1799,7 +1799,7 @@ int BN_set_word(BIGNUM *a, unsigned long w); | |||
| 1799 | 1799 | ||
| 1800 | unsigned long BN_get_word(BIGNUM *a); | 1800 | unsigned long BN_get_word(BIGNUM *a); |
| 1801 | Returns 'a' in an unsigned long. Not remarkably, often 'a' will | 1801 | Returns 'a' in an unsigned long. Not remarkably, often 'a' will |
| 1802 | be biger than a word, in which case 0xffffffffL is returned. | 1802 | be bigger than a word, in which case 0xffffffffL is returned. |
| 1803 | 1803 | ||
| 1804 | Word Operations | 1804 | Word Operations |
| 1805 | These functions are much more efficient that the normal bignum arithmetic | 1805 | These functions are much more efficient that the normal bignum arithmetic |
| @@ -2058,7 +2058,7 @@ Now you will notice that macros like | |||
| 2058 | PEM_ASN1_write((int (*)())i2d_X509,PEM_STRING_X509,fp, \ | 2058 | PEM_ASN1_write((int (*)())i2d_X509,PEM_STRING_X509,fp, \ |
| 2059 | (char *)x, NULL,NULL,0,NULL) | 2059 | (char *)x, NULL,NULL,0,NULL) |
| 2060 | Don't do encryption normally. If you want to PEM encrypt your X509 structure, | 2060 | Don't do encryption normally. If you want to PEM encrypt your X509 structure, |
| 2061 | either just call PEM_ASN1_write directly or just define you own | 2061 | either just call PEM_ASN1_write directly or just define your own |
| 2062 | macro variant. As you can see, this macro just sets all encryption related | 2062 | macro variant. As you can see, this macro just sets all encryption related |
| 2063 | parameters to NULL. | 2063 | parameters to NULL. |
| 2064 | 2064 | ||
| @@ -5566,7 +5566,7 @@ These 2 functions create and destroy SSL_CTX structures | |||
| 5566 | 5566 | ||
| 5567 | The SSL_CTX has a session_cache_mode which is by default, | 5567 | The SSL_CTX has a session_cache_mode which is by default, |
| 5568 | in SSL_SESS_CACHE_SERVER mode. What this means is that the library | 5568 | in SSL_SESS_CACHE_SERVER mode. What this means is that the library |
| 5569 | will automatically add new session-id's to the cache apon sucsessful | 5569 | will automatically add new session-id's to the cache upon successful |
| 5570 | SSL_accept() calls. | 5570 | SSL_accept() calls. |
| 5571 | If SSL_SESS_CACHE_CLIENT is set, then client certificates are also added | 5571 | If SSL_SESS_CACHE_CLIENT is set, then client certificates are also added |
| 5572 | to the cache. | 5572 | to the cache. |
| @@ -5580,12 +5580,12 @@ SSL_SESS_NO_CACHE_BOTH - Either SSL_accept() or SSL_connect(). | |||
| 5580 | If SSL_SESS_CACHE_NO_AUTO_CLEAR is set, old timed out sessions are | 5580 | If SSL_SESS_CACHE_NO_AUTO_CLEAR is set, old timed out sessions are |
| 5581 | not automatically removed each 255, SSL_connect()s or SSL_accept()s. | 5581 | not automatically removed each 255, SSL_connect()s or SSL_accept()s. |
| 5582 | 5582 | ||
| 5583 | By default, apon every 255 successful SSL_connect() or SSL_accept()s, | 5583 | By default, upon every 255 successful SSL_connect() or SSL_accept()s, |
| 5584 | the cache is flush. Please note that this could be expensive on | 5584 | the cache is flush. Please note that this could be expensive on |
| 5585 | a heavily loaded SSL server, in which case, turn this off and | 5585 | a heavily loaded SSL server, in which case, turn this off and |
| 5586 | clear the cache of old entries 'manually' (with one of the functions | 5586 | clear the cache of old entries 'manually' (with one of the functions |
| 5587 | listed below) every few hours. Perhaps I should up this number, it is hard | 5587 | listed below) every few hours. Perhaps I should up this number, it is hard |
| 5588 | to say. Remember, the '255' new calls is just a mechanims to get called | 5588 | to say. Remember, the '255' new calls is just a mechanism to get called |
| 5589 | every now and then, in theory at most 255 new session-id's will have been | 5589 | every now and then, in theory at most 255 new session-id's will have been |
| 5590 | added but if 100 are added every minute, you would still have | 5590 | added but if 100 are added every minute, you would still have |
| 5591 | 500 in the cache before any would start being flushed (assuming a 3 minute | 5591 | 500 in the cache before any would start being flushed (assuming a 3 minute |
| @@ -5628,10 +5628,10 @@ if copy is 1. Otherwise, the reference count is not modified. | |||
| 5628 | void SSL_CTX_sess_set_get_cb(ctx,cb) sets the callback and | 5628 | void SSL_CTX_sess_set_get_cb(ctx,cb) sets the callback and |
| 5629 | int (*cb)()SSL_CTX_sess_get_get_cb(ctx) returns the callback. | 5629 | int (*cb)()SSL_CTX_sess_get_get_cb(ctx) returns the callback. |
| 5630 | 5630 | ||
| 5631 | These callbacks are basically indended to be used by processes to | 5631 | These callbacks are basically intended to be used by processes to |
| 5632 | send their session-id's to other processes. I currently have not implemented | 5632 | send their session-id's to other processes. I currently have not implemented |
| 5633 | non-blocking semantics for these callbacks, it is upto the appication | 5633 | non-blocking semantics for these callbacks, it is upto the application |
| 5634 | to make the callbacks effiecent if they require blocking (perhaps | 5634 | to make the callbacks efficient if they require blocking (perhaps |
| 5635 | by 'saving' them and then 'posting them' when control returns from | 5635 | by 'saving' them and then 'posting them' when control returns from |
| 5636 | the SSL_accept(). | 5636 | the SSL_accept(). |
| 5637 | 5637 | ||
| @@ -6589,7 +6589,7 @@ This information can be used to recall the functions when the 'error' | |||
| 6589 | condition has dissapeared. | 6589 | condition has dissapeared. |
| 6590 | 6590 | ||
| 6591 | After the connection has been made, information can be retrived about the | 6591 | After the connection has been made, information can be retrived about the |
| 6592 | SSL session and the session-id values that have been decided apon. | 6592 | SSL session and the session-id values that have been decided upon. |
| 6593 | The 'peer' certificate can be retrieved. | 6593 | The 'peer' certificate can be retrieved. |
| 6594 | 6594 | ||
| 6595 | The session-id values include | 6595 | The session-id values include |
diff --git a/src/lib/libssl/src/doc/standards.txt b/src/lib/libssl/src/doc/standards.txt index a5ce778f8e..7bada8d35f 100644 --- a/src/lib/libssl/src/doc/standards.txt +++ b/src/lib/libssl/src/doc/standards.txt | |||
| @@ -69,6 +69,10 @@ PKCS#12: Personal Information Exchange Syntax Standard, version 1.0. | |||
| 69 | 3174 US Secure Hash Algorithm 1 (SHA1). D. Eastlake 3rd, P. Jones. | 69 | 3174 US Secure Hash Algorithm 1 (SHA1). D. Eastlake 3rd, P. Jones. |
| 70 | September 2001. (Format: TXT=35525 bytes) (Status: INFORMATIONAL) | 70 | September 2001. (Format: TXT=35525 bytes) (Status: INFORMATIONAL) |
| 71 | 71 | ||
| 72 | 3161 Internet X.509 Public Key Infrastructure, Time-Stamp Protocol (TSP) | ||
| 73 | C. Adams, P. Cain, D. Pinkas, R. Zuccherato. August 2001 | ||
| 74 | (Status: PROPOSED STANDARD) | ||
| 75 | |||
| 72 | 3268 Advanced Encryption Standard (AES) Ciphersuites for Transport | 76 | 3268 Advanced Encryption Standard (AES) Ciphersuites for Transport |
| 73 | Layer Security (TLS). P. Chown. June 2002. (Format: TXT=13530 bytes) | 77 | Layer Security (TLS). P. Chown. June 2002. (Format: TXT=13530 bytes) |
| 74 | (Status: PROPOSED STANDARD) | 78 | (Status: PROPOSED STANDARD) |
