Standard preamble:
========================================================================
..
.... Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.
If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.
Avoid warning from groff about undefined register 'F'.
.. . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\}
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================
Title "SSL_CTX_set1_curves 3"
way too many mistakes in technical documents.
\fISSL_CTX_set1_curves_list() sets the supported curves for ctx to string list. The string is a colon separated list of curve NIDs or names, for example \*(L"P-521:P-384:P-256\*(R".
\fISSL_set1_curves() and SSL_set1_curves_list() are similar except they set supported curves for the \s-1SSL\s0 structure ssl.
\fISSL_get1_curves() returns the set of supported curves sent by a client in the supported curves extension. It returns the total number of supported curves. The curves parameter can be \s-1NULL\s0 to simply return the number of curves for memory allocation purposes. The \fBcurves array is in the form of a set of curve NIDs in preference order. It can return zero if the client did not send a supported curves extension.
\fISSL_get_shared_curve() returns shared curve n for a server-side \s-1SSL\s0 ssl. If n is -1 then the total number of shared curves is returned, which may be zero. Other than for diagnostic purposes, most applications will only be interested in the first shared curve so n is normally set to zero. If the value n is out of range, NID_undef is returned.
\fISSL_CTX_set_ecdh_auto() and SSL_set_ecdh_auto() set automatic curve selection for server ctx or ssl to onoff. If onoff is 1 then the highest preference curve is automatically used for \s-1ECDH\s0 temporary keys used during key exchange.
All these functions are implemented as macros.
The functions SSL_CTX_set_ecdh_auto() and SSL_set_ecdh_auto() can be used to make a server always choose the most appropriate curve for a client. If set it will override any temporary \s-1ECDH\s0 parameters set by a server. Previous versions of OpenSSL could effectively only use a single \s-1ECDH\s0 curve set using a function such as SSL_CTX_set_ecdh_tmp(). Newer applications should just call:
.Vb 1 SSL_CTX_set_ecdh_auto(ctx, 1); .Ve
and they will automatically support \s-1ECDH\s0 using the most appropriate shared curve.
\fISSL_get1_curves() returns the number of curves, which may be zero.
\fISSL_get_shared_curve() returns the \s-1NID\s0 of shared curve n or NID_undef if there is no shared curve n; or the total number of shared curves if n is -1.
When called on a client ssl, SSL_get_shared_curve() has no meaning and returns -1.