catssl_setciphers - set algorithms to be used in SSL negotiation
#include <cat/cat.h>
int catssl_setciphers(catssl_info *info, int ciphermask);
This function sets the set of algorithms to be used for authentication and
data stream encryption. The SSL handshake will prefer the strongest cipher
that is supported by both sides. The ciphermask argument should be an ORed combination of any of the following:
- CAT_STRONG_CIPHERS
-
Use strong ciphers that may be subject to export control, if available. In
an export version of the SDK, this bit would have no effect.
- CAT_EXPORT_CIPHERS
-
Use exportable ciphers.
- CAT_NULL_CIPHER
-
Support authentication with no line encryption. The network data is still
packed into SSL frames. This cipher should not normally be used.
- CAT_REQUIRE_CIPHERS
-
Make the function return an error if any of the requested ciphers are
unavailable.
- CAT_DEFAULT_CIPHERS
-
Equivalent to (
CAT_STRONG_CIPHERS | CAT_EXPORT_CIPHERS
), which means ``use the strongest cipher available.''
Unavailable ciphers are ignored (unless CAT_REQUIRE_CIPHERS is set).
The function returns CAT_OK if successful. If all requested ciphers are unavailable, the function
returns an error code.
cat, catssl