X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=doc%2Fssl%2FSSL_CTX_set_options.pod;h=1498bd4f1e45a885b341e4c89e94107d1c855984;hp=fe164feaabba7b514a2716824690fbccda8bd15f;hb=f2ab7d13921890e40c847fba3d22c936a2681f6b;hpb=1b65ce7db33c8bbb0194d0d7013cccf492fd3c2f diff --git a/doc/ssl/SSL_CTX_set_options.pod b/doc/ssl/SSL_CTX_set_options.pod index fe164feaab..1498bd4f1e 100644 --- a/doc/ssl/SSL_CTX_set_options.pod +++ b/doc/ssl/SSL_CTX_set_options.pod @@ -17,10 +17,10 @@ SSL_CTX_set_options, SSL_set_options, SSL_CTX_get_options, SSL_get_options - man =head1 DESCRIPTION SSL_CTX_set_options() adds the options set via bitmask in B to B. -Options already set before are not cleared. +Options already set before are not cleared! SSL_set_options() adds the options set via bitmask in B to B. -Options already set before are not cleared. +Options already set before are not cleared! SSL_CTX_get_options() returns the options set for B. @@ -32,7 +32,12 @@ The behaviour of the SSL library can be changed by setting several options. The options are coded as bitmasks and can be combined by a logical B operation (|). Options can only be added but can never be reset. -During a handshake, the option settings of the SSL object used. When +SSL_CTX_set_options() and SSL_set_options() affect the (external) +protocol behaviour of the SSL library. The (internal) behaviour of +the API can be changed by using the similar +L and SSL_set_modes() functions. + +During a handshake, the option settings of the SSL object are used. When a new SSL object is created from a context using SSL_new(), the current option setting is copied. Changes to B do not affect already created SSL objects. SSL_clear() does not affect the settings. @@ -53,7 +58,7 @@ Netscape-Commerce/1.12, when talking SSLv2, accepts a 32 byte challenge but then appears to only use 16 bytes when generating the encryption keys. Using 16 bytes is ok but it should be ok to use 32. According to the SSLv3 spec, one should use 32 bytes for the challenge -when opperating in SSLv2/v3 compatablity mode, but as mentioned above, +when operating in SSLv2/v3 compatibility mode, but as mentioned above, this breaks this server so 16 bytes is the way to go. =item SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG @@ -95,45 +100,61 @@ doing a re-connect, always takes the first cipher in the cipher list. ... -=item SSL_OP_TLS_ROLLBACK_BUG - -Disable version rollback attack detection. - -During the client key exchange, the client must send the same information -about acceptable SSL/TLS protocol levels as during the first hello. Some -clients violate this rule by adapting to the server's answer. (Example: -the client sends a SSLv2 hello and accepts up to SSLv3.1=TLSv1, the server -only understands up to SSLv3. In this case the client must still use the -same SSLv3.1=TLSv1 announcement. Some clients step down to SSLv3 with respect -to the server's answer and violate the version rollback protection.) - =item SSL_OP_ALL All of the above bug workarounds. =back -It is save and recommended to use SSL_OP_ALL to enable the bug workaround +It is safe and recommended to use SSL_OP_ALL to enable the bug workaround options. The following B options are available: =over 4 +=item SSL_OP_TLS_ROLLBACK_BUG + +Disable version rollback attack detection. + +During the client key exchange, the client must send the same information +about acceptable SSL/TLS protocol levels as during the first hello. Some +clients violate this rule by adapting to the server's answer. (Example: +the client sends a SSLv2 hello and accepts up to SSLv3.1=TLSv1, the server +only understands up to SSLv3. In this case the client must still use the +same SSLv3.1=TLSv1 announcement. Some clients step down to SSLv3 with respect +to the server's answer and violate the version rollback protection.) + =item SSL_OP_SINGLE_DH_USE -Always create a new key when using temporary DH parameters. +Always create a new key when using temporary/ephemeral DH parameters +(see L). +This option must be used to prevent small subgroup attacks, when +the DH parameters were not generated using "strong" primes +(e.g. when using DSA-parameters, see L). +If "strong" primes were used, it is not strictly necessary to generate +a new DH key during each handshake but it is also recommendet. +SSL_OP_SINGLE_DH_USE should therefore be enabled whenever +temporary/ephemeral DH parameters are used. =item SSL_OP_EPHEMERAL_RSA -Also use the temporary RSA key when doing RSA operations. +Always use ephemeral (temporary) RSA key when doing RSA operations +(see L). +According to the specifications this is only done, when a RSA key +can only be used for signature operations (namely under export ciphers +with restricted RSA keylength). By setting this option, ephemeral +RSA keys are always used. This option breaks compatibility with the +SSL/TLS specifications and may lead to interoperability problems with +clients and should therefore never be used. Ciphers with EDH (ephemeral +Diffie-Hellman) key exchange should be used instead. =item SSL_OP_CIPHER_SERVER_PREFERENCE When choosing a cipher, use the server's preferences instead of the client preferences. When not set, the SSL server will always follow the clients preferences. When set, the SSLv3/TLSv1 server will choose following its -own preferences. Because of the different procotol, for SSLv2 the server +own preferences. Because of the different protocol, for SSLv2 the server will send his list of preferences to the client and the client chooses. =item SSL_OP_PKCS1_CHECK_1 @@ -150,11 +171,6 @@ If we accept a netscape connection, demand a client cert, have a non-self-sighed CA which does not have it's CA in netscape, and the browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta -=item SSL_OP_NON_EXPORT_FIRST - -On servers try to use non-export (stronger) ciphers first. This option does -not work under all circumstances (in the code it is declared "broken"). - =item SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG ... @@ -182,12 +198,17 @@ SSL_CTX_get_options() and SSL_get_options() return the current bitmask. =head1 SEE ALSO -L, L, L +L, L, L, +L, +L, +L =head1 HISTORY SSL_OP_CIPHER_SERVER_PREFERENCE has been added in OpenSSL 0.9.7. -SSL_OP_TLS_ROLLBACK_BUG has been added in OpenSSL 0.9.6. +SSL_OP_TLS_ROLLBACK_BUG has been added in OpenSSL 0.9.6 and was automatically +enabled with SSL_OP_ALL. As of 0.9.7 it is no longer included in SSL_OP_ALL +and must be explicitely set. =cut