tls.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /*
  2. * SSL/TLS interface definition
  3. * Copyright (c) 2004-2013, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef TLS_H
  9. #define TLS_H
  10. struct tls_connection;
  11. struct tls_keys {
  12. const u8 *client_random;
  13. size_t client_random_len;
  14. const u8 *server_random;
  15. size_t server_random_len;
  16. };
  17. enum tls_event {
  18. TLS_CERT_CHAIN_SUCCESS,
  19. TLS_CERT_CHAIN_FAILURE,
  20. TLS_PEER_CERTIFICATE,
  21. TLS_ALERT
  22. };
  23. /*
  24. * Note: These are used as identifier with external programs and as such, the
  25. * values must not be changed.
  26. */
  27. enum tls_fail_reason {
  28. TLS_FAIL_UNSPECIFIED = 0,
  29. TLS_FAIL_UNTRUSTED = 1,
  30. TLS_FAIL_REVOKED = 2,
  31. TLS_FAIL_NOT_YET_VALID = 3,
  32. TLS_FAIL_EXPIRED = 4,
  33. TLS_FAIL_SUBJECT_MISMATCH = 5,
  34. TLS_FAIL_ALTSUBJECT_MISMATCH = 6,
  35. TLS_FAIL_BAD_CERTIFICATE = 7,
  36. TLS_FAIL_SERVER_CHAIN_PROBE = 8,
  37. TLS_FAIL_DOMAIN_SUFFIX_MISMATCH = 9,
  38. TLS_FAIL_DOMAIN_MISMATCH = 10,
  39. };
  40. #define TLS_MAX_ALT_SUBJECT 10
  41. union tls_event_data {
  42. struct {
  43. int depth;
  44. const char *subject;
  45. enum tls_fail_reason reason;
  46. const char *reason_txt;
  47. const struct wpabuf *cert;
  48. } cert_fail;
  49. struct {
  50. int depth;
  51. const char *subject;
  52. const struct wpabuf *cert;
  53. const u8 *hash;
  54. size_t hash_len;
  55. const char *altsubject[TLS_MAX_ALT_SUBJECT];
  56. int num_altsubject;
  57. } peer_cert;
  58. struct {
  59. int is_local;
  60. const char *type;
  61. const char *description;
  62. } alert;
  63. };
  64. struct tls_config {
  65. const char *opensc_engine_path;
  66. const char *pkcs11_engine_path;
  67. const char *pkcs11_module_path;
  68. int fips_mode;
  69. int cert_in_cb;
  70. const char *openssl_ciphers;
  71. void (*event_cb)(void *ctx, enum tls_event ev,
  72. union tls_event_data *data);
  73. void *cb_ctx;
  74. };
  75. #define TLS_CONN_ALLOW_SIGN_RSA_MD5 BIT(0)
  76. #define TLS_CONN_DISABLE_TIME_CHECKS BIT(1)
  77. #define TLS_CONN_DISABLE_SESSION_TICKET BIT(2)
  78. #define TLS_CONN_REQUEST_OCSP BIT(3)
  79. #define TLS_CONN_REQUIRE_OCSP BIT(4)
  80. #define TLS_CONN_DISABLE_TLSv1_1 BIT(5)
  81. #define TLS_CONN_DISABLE_TLSv1_2 BIT(6)
  82. #define TLS_CONN_EAP_FAST BIT(7)
  83. /**
  84. * struct tls_connection_params - Parameters for TLS connection
  85. * @ca_cert: File or reference name for CA X.509 certificate in PEM or DER
  86. * format
  87. * @ca_cert_blob: ca_cert as inlined data or %NULL if not used
  88. * @ca_cert_blob_len: ca_cert_blob length
  89. * @ca_path: Path to CA certificates (OpenSSL specific)
  90. * @subject_match: String to match in the subject of the peer certificate or
  91. * %NULL to allow all subjects
  92. * @altsubject_match: String to match in the alternative subject of the peer
  93. * certificate or %NULL to allow all alternative subjects
  94. * @suffix_match: String to suffix match in the dNSName or CN of the peer
  95. * certificate or %NULL to allow all domain names. This may allow subdomains an
  96. * wildcard certificates. Each domain name label must have a full match.
  97. * @domain_match: String to match in the dNSName or CN of the peer
  98. * certificate or %NULL to allow all domain names. This requires a full,
  99. * case-insensitive match.
  100. * @client_cert: File or reference name for client X.509 certificate in PEM or
  101. * DER format
  102. * @client_cert_blob: client_cert as inlined data or %NULL if not used
  103. * @client_cert_blob_len: client_cert_blob length
  104. * @private_key: File or reference name for client private key in PEM or DER
  105. * format (traditional format (RSA PRIVATE KEY) or PKCS#8 (PRIVATE KEY)
  106. * @private_key_blob: private_key as inlined data or %NULL if not used
  107. * @private_key_blob_len: private_key_blob length
  108. * @private_key_passwd: Passphrase for decrypted private key, %NULL if no
  109. * passphrase is used.
  110. * @dh_file: File name for DH/DSA data in PEM format, or %NULL if not used
  111. * @dh_blob: dh_file as inlined data or %NULL if not used
  112. * @dh_blob_len: dh_blob length
  113. * @engine: 1 = use engine (e.g., a smartcard) for private key operations
  114. * (this is OpenSSL specific for now)
  115. * @engine_id: engine id string (this is OpenSSL specific for now)
  116. * @ppin: pointer to the pin variable in the configuration
  117. * (this is OpenSSL specific for now)
  118. * @key_id: the private key's id when using engine (this is OpenSSL
  119. * specific for now)
  120. * @cert_id: the certificate's id when using engine
  121. * @ca_cert_id: the CA certificate's id when using engine
  122. * @openssl_ciphers: OpenSSL cipher configuration
  123. * @flags: Parameter options (TLS_CONN_*)
  124. * @ocsp_stapling_response: DER encoded file with cached OCSP stapling response
  125. * or %NULL if OCSP is not enabled
  126. *
  127. * TLS connection parameters to be configured with tls_connection_set_params()
  128. * and tls_global_set_params().
  129. *
  130. * Certificates and private key can be configured either as a reference name
  131. * (file path or reference to certificate store) or by providing the same data
  132. * as a pointer to the data in memory. Only one option will be used for each
  133. * field.
  134. */
  135. struct tls_connection_params {
  136. const char *ca_cert;
  137. const u8 *ca_cert_blob;
  138. size_t ca_cert_blob_len;
  139. const char *ca_path;
  140. const char *subject_match;
  141. const char *altsubject_match;
  142. const char *suffix_match;
  143. const char *domain_match;
  144. const char *client_cert;
  145. const u8 *client_cert_blob;
  146. size_t client_cert_blob_len;
  147. const char *private_key;
  148. const u8 *private_key_blob;
  149. size_t private_key_blob_len;
  150. const char *private_key_passwd;
  151. const char *dh_file;
  152. const u8 *dh_blob;
  153. size_t dh_blob_len;
  154. /* OpenSSL specific variables */
  155. int engine;
  156. const char *engine_id;
  157. const char *pin;
  158. const char *key_id;
  159. const char *cert_id;
  160. const char *ca_cert_id;
  161. const char *openssl_ciphers;
  162. unsigned int flags;
  163. const char *ocsp_stapling_response;
  164. };
  165. /**
  166. * tls_init - Initialize TLS library
  167. * @conf: Configuration data for TLS library
  168. * Returns: Context data to be used as tls_ctx in calls to other functions,
  169. * or %NULL on failure.
  170. *
  171. * Called once during program startup and once for each RSN pre-authentication
  172. * session. In other words, there can be two concurrent TLS contexts. If global
  173. * library initialization is needed (i.e., one that is shared between both
  174. * authentication types), the TLS library wrapper should maintain a reference
  175. * counter and do global initialization only when moving from 0 to 1 reference.
  176. */
  177. void * tls_init(const struct tls_config *conf);
  178. /**
  179. * tls_deinit - Deinitialize TLS library
  180. * @tls_ctx: TLS context data from tls_init()
  181. *
  182. * Called once during program shutdown and once for each RSN pre-authentication
  183. * session. If global library deinitialization is needed (i.e., one that is
  184. * shared between both authentication types), the TLS library wrapper should
  185. * maintain a reference counter and do global deinitialization only when moving
  186. * from 1 to 0 references.
  187. */
  188. void tls_deinit(void *tls_ctx);
  189. /**
  190. * tls_get_errors - Process pending errors
  191. * @tls_ctx: TLS context data from tls_init()
  192. * Returns: Number of found error, 0 if no errors detected.
  193. *
  194. * Process all pending TLS errors.
  195. */
  196. int tls_get_errors(void *tls_ctx);
  197. /**
  198. * tls_connection_init - Initialize a new TLS connection
  199. * @tls_ctx: TLS context data from tls_init()
  200. * Returns: Connection context data, conn for other function calls
  201. */
  202. struct tls_connection * tls_connection_init(void *tls_ctx);
  203. /**
  204. * tls_connection_deinit - Free TLS connection data
  205. * @tls_ctx: TLS context data from tls_init()
  206. * @conn: Connection context data from tls_connection_init()
  207. *
  208. * Release all resources allocated for TLS connection.
  209. */
  210. void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn);
  211. /**
  212. * tls_connection_established - Has the TLS connection been completed?
  213. * @tls_ctx: TLS context data from tls_init()
  214. * @conn: Connection context data from tls_connection_init()
  215. * Returns: 1 if TLS connection has been completed, 0 if not.
  216. */
  217. int tls_connection_established(void *tls_ctx, struct tls_connection *conn);
  218. /**
  219. * tls_connection_shutdown - Shutdown TLS connection
  220. * @tls_ctx: TLS context data from tls_init()
  221. * @conn: Connection context data from tls_connection_init()
  222. * Returns: 0 on success, -1 on failure
  223. *
  224. * Shutdown current TLS connection without releasing all resources. New
  225. * connection can be started by using the same conn without having to call
  226. * tls_connection_init() or setting certificates etc. again. The new
  227. * connection should try to use session resumption.
  228. */
  229. int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn);
  230. enum {
  231. TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED = -3,
  232. TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED = -2
  233. };
  234. /**
  235. * tls_connection_set_params - Set TLS connection parameters
  236. * @tls_ctx: TLS context data from tls_init()
  237. * @conn: Connection context data from tls_connection_init()
  238. * @params: Connection parameters
  239. * Returns: 0 on success, -1 on failure,
  240. * TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED (-2) on possible PIN error causing
  241. * PKCS#11 engine failure, or
  242. * TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED (-3) on failure to verify the
  243. * PKCS#11 engine private key.
  244. */
  245. int __must_check
  246. tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
  247. const struct tls_connection_params *params);
  248. /**
  249. * tls_global_set_params - Set TLS parameters for all TLS connection
  250. * @tls_ctx: TLS context data from tls_init()
  251. * @params: Global TLS parameters
  252. * Returns: 0 on success, -1 on failure,
  253. * TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED (-2) on possible PIN error causing
  254. * PKCS#11 engine failure, or
  255. * TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED (-3) on failure to verify the
  256. * PKCS#11 engine private key.
  257. */
  258. int __must_check tls_global_set_params(
  259. void *tls_ctx, const struct tls_connection_params *params);
  260. /**
  261. * tls_global_set_verify - Set global certificate verification options
  262. * @tls_ctx: TLS context data from tls_init()
  263. * @check_crl: 0 = do not verify CRLs, 1 = verify CRL for the user certificate,
  264. * 2 = verify CRL for all certificates
  265. * Returns: 0 on success, -1 on failure
  266. */
  267. int __must_check tls_global_set_verify(void *tls_ctx, int check_crl);
  268. /**
  269. * tls_connection_set_verify - Set certificate verification options
  270. * @tls_ctx: TLS context data from tls_init()
  271. * @conn: Connection context data from tls_connection_init()
  272. * @verify_peer: 1 = verify peer certificate
  273. * Returns: 0 on success, -1 on failure
  274. */
  275. int __must_check tls_connection_set_verify(void *tls_ctx,
  276. struct tls_connection *conn,
  277. int verify_peer);
  278. /**
  279. * tls_connection_get_keys - Get random data from TLS connection
  280. * @tls_ctx: TLS context data from tls_init()
  281. * @conn: Connection context data from tls_connection_init()
  282. * @keys: Structure of client/server random data (filled on success)
  283. * Returns: 0 on success, -1 on failure
  284. */
  285. int __must_check tls_connection_get_keys(void *tls_ctx,
  286. struct tls_connection *conn,
  287. struct tls_keys *keys);
  288. /**
  289. * tls_connection_prf - Use TLS-PRF to derive keying material
  290. * @tls_ctx: TLS context data from tls_init()
  291. * @conn: Connection context data from tls_connection_init()
  292. * @label: Label (e.g., description of the key) for PRF
  293. * @server_random_first: seed is 0 = client_random|server_random,
  294. * 1 = server_random|client_random
  295. * @skip_keyblock: Skip TLS key block from the beginning of PRF output
  296. * @out: Buffer for output data from TLS-PRF
  297. * @out_len: Length of the output buffer
  298. * Returns: 0 on success, -1 on failure
  299. *
  300. * This function is optional to implement if tls_connection_get_keys() provides
  301. * access to master secret and server/client random values. If these values are
  302. * not exported from the TLS library, tls_connection_prf() is required so that
  303. * further keying material can be derived from the master secret. If not
  304. * implemented, the function will still need to be defined, but it can just
  305. * return -1. Example implementation of this function is in tls_prf_sha1_md5()
  306. * when it is called with seed set to client_random|server_random (or
  307. * server_random|client_random).
  308. */
  309. int __must_check tls_connection_prf(void *tls_ctx,
  310. struct tls_connection *conn,
  311. const char *label,
  312. int server_random_first,
  313. int skip_keyblock,
  314. u8 *out, size_t out_len);
  315. /**
  316. * tls_connection_handshake - Process TLS handshake (client side)
  317. * @tls_ctx: TLS context data from tls_init()
  318. * @conn: Connection context data from tls_connection_init()
  319. * @in_data: Input data from TLS server
  320. * @appl_data: Pointer to application data pointer, or %NULL if dropped
  321. * Returns: Output data, %NULL on failure
  322. *
  323. * The caller is responsible for freeing the returned output data. If the final
  324. * handshake message includes application data, this is decrypted and
  325. * appl_data (if not %NULL) is set to point this data. The caller is
  326. * responsible for freeing appl_data.
  327. *
  328. * This function is used during TLS handshake. The first call is done with
  329. * in_data == %NULL and the library is expected to return ClientHello packet.
  330. * This packet is then send to the server and a response from server is given
  331. * to TLS library by calling this function again with in_data pointing to the
  332. * TLS message from the server.
  333. *
  334. * If the TLS handshake fails, this function may return %NULL. However, if the
  335. * TLS library has a TLS alert to send out, that should be returned as the
  336. * output data. In this case, tls_connection_get_failed() must return failure
  337. * (> 0).
  338. *
  339. * tls_connection_established() should return 1 once the TLS handshake has been
  340. * completed successfully.
  341. */
  342. struct wpabuf * tls_connection_handshake(void *tls_ctx,
  343. struct tls_connection *conn,
  344. const struct wpabuf *in_data,
  345. struct wpabuf **appl_data);
  346. struct wpabuf * tls_connection_handshake2(void *tls_ctx,
  347. struct tls_connection *conn,
  348. const struct wpabuf *in_data,
  349. struct wpabuf **appl_data,
  350. int *more_data_needed);
  351. /**
  352. * tls_connection_server_handshake - Process TLS handshake (server side)
  353. * @tls_ctx: TLS context data from tls_init()
  354. * @conn: Connection context data from tls_connection_init()
  355. * @in_data: Input data from TLS peer
  356. * @appl_data: Pointer to application data pointer, or %NULL if dropped
  357. * Returns: Output data, %NULL on failure
  358. *
  359. * The caller is responsible for freeing the returned output data.
  360. */
  361. struct wpabuf * tls_connection_server_handshake(void *tls_ctx,
  362. struct tls_connection *conn,
  363. const struct wpabuf *in_data,
  364. struct wpabuf **appl_data);
  365. /**
  366. * tls_connection_encrypt - Encrypt data into TLS tunnel
  367. * @tls_ctx: TLS context data from tls_init()
  368. * @conn: Connection context data from tls_connection_init()
  369. * @in_data: Plaintext data to be encrypted
  370. * Returns: Encrypted TLS data or %NULL on failure
  371. *
  372. * This function is used after TLS handshake has been completed successfully to
  373. * send data in the encrypted tunnel. The caller is responsible for freeing the
  374. * returned output data.
  375. */
  376. struct wpabuf * tls_connection_encrypt(void *tls_ctx,
  377. struct tls_connection *conn,
  378. const struct wpabuf *in_data);
  379. /**
  380. * tls_connection_decrypt - Decrypt data from TLS tunnel
  381. * @tls_ctx: TLS context data from tls_init()
  382. * @conn: Connection context data from tls_connection_init()
  383. * @in_data: Encrypted TLS data
  384. * Returns: Decrypted TLS data or %NULL on failure
  385. *
  386. * This function is used after TLS handshake has been completed successfully to
  387. * receive data from the encrypted tunnel. The caller is responsible for
  388. * freeing the returned output data.
  389. */
  390. struct wpabuf * tls_connection_decrypt(void *tls_ctx,
  391. struct tls_connection *conn,
  392. const struct wpabuf *in_data);
  393. struct wpabuf * tls_connection_decrypt2(void *tls_ctx,
  394. struct tls_connection *conn,
  395. const struct wpabuf *in_data,
  396. int *more_data_needed);
  397. /**
  398. * tls_connection_resumed - Was session resumption used
  399. * @tls_ctx: TLS context data from tls_init()
  400. * @conn: Connection context data from tls_connection_init()
  401. * Returns: 1 if current session used session resumption, 0 if not
  402. */
  403. int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn);
  404. enum {
  405. TLS_CIPHER_NONE,
  406. TLS_CIPHER_RC4_SHA /* 0x0005 */,
  407. TLS_CIPHER_AES128_SHA /* 0x002f */,
  408. TLS_CIPHER_RSA_DHE_AES128_SHA /* 0x0031 */,
  409. TLS_CIPHER_ANON_DH_AES128_SHA /* 0x0034 */
  410. };
  411. /**
  412. * tls_connection_set_cipher_list - Configure acceptable cipher suites
  413. * @tls_ctx: TLS context data from tls_init()
  414. * @conn: Connection context data from tls_connection_init()
  415. * @ciphers: Zero (TLS_CIPHER_NONE) terminated list of allowed ciphers
  416. * (TLS_CIPHER_*).
  417. * Returns: 0 on success, -1 on failure
  418. */
  419. int __must_check tls_connection_set_cipher_list(void *tls_ctx,
  420. struct tls_connection *conn,
  421. u8 *ciphers);
  422. /**
  423. * tls_get_cipher - Get current cipher name
  424. * @tls_ctx: TLS context data from tls_init()
  425. * @conn: Connection context data from tls_connection_init()
  426. * @buf: Buffer for the cipher name
  427. * @buflen: buf size
  428. * Returns: 0 on success, -1 on failure
  429. *
  430. * Get the name of the currently used cipher.
  431. */
  432. int __must_check tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
  433. char *buf, size_t buflen);
  434. /**
  435. * tls_connection_enable_workaround - Enable TLS workaround options
  436. * @tls_ctx: TLS context data from tls_init()
  437. * @conn: Connection context data from tls_connection_init()
  438. * Returns: 0 on success, -1 on failure
  439. *
  440. * This function is used to enable connection-specific workaround options for
  441. * buffer SSL/TLS implementations.
  442. */
  443. int __must_check tls_connection_enable_workaround(void *tls_ctx,
  444. struct tls_connection *conn);
  445. /**
  446. * tls_connection_client_hello_ext - Set TLS extension for ClientHello
  447. * @tls_ctx: TLS context data from tls_init()
  448. * @conn: Connection context data from tls_connection_init()
  449. * @ext_type: Extension type
  450. * @data: Extension payload (%NULL to remove extension)
  451. * @data_len: Extension payload length
  452. * Returns: 0 on success, -1 on failure
  453. */
  454. int __must_check tls_connection_client_hello_ext(void *tls_ctx,
  455. struct tls_connection *conn,
  456. int ext_type, const u8 *data,
  457. size_t data_len);
  458. /**
  459. * tls_connection_get_failed - Get connection failure status
  460. * @tls_ctx: TLS context data from tls_init()
  461. * @conn: Connection context data from tls_connection_init()
  462. *
  463. * Returns >0 if connection has failed, 0 if not.
  464. */
  465. int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn);
  466. /**
  467. * tls_connection_get_read_alerts - Get connection read alert status
  468. * @tls_ctx: TLS context data from tls_init()
  469. * @conn: Connection context data from tls_connection_init()
  470. * Returns: Number of times a fatal read (remote end reported error) has
  471. * happened during this connection.
  472. */
  473. int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn);
  474. /**
  475. * tls_connection_get_write_alerts - Get connection write alert status
  476. * @tls_ctx: TLS context data from tls_init()
  477. * @conn: Connection context data from tls_connection_init()
  478. * Returns: Number of times a fatal write (locally detected error) has happened
  479. * during this connection.
  480. */
  481. int tls_connection_get_write_alerts(void *tls_ctx,
  482. struct tls_connection *conn);
  483. /**
  484. * tls_capabilities - Get supported TLS capabilities
  485. * @tls_ctx: TLS context data from tls_init()
  486. * Returns: Bit field of supported TLS capabilities (TLS_CAPABILITY_*)
  487. */
  488. unsigned int tls_capabilities(void *tls_ctx);
  489. typedef int (*tls_session_ticket_cb)
  490. (void *ctx, const u8 *ticket, size_t len, const u8 *client_random,
  491. const u8 *server_random, u8 *master_secret);
  492. int __must_check tls_connection_set_session_ticket_cb(
  493. void *tls_ctx, struct tls_connection *conn,
  494. tls_session_ticket_cb cb, void *ctx);
  495. void tls_connection_set_log_cb(struct tls_connection *conn,
  496. void (*log_cb)(void *ctx, const char *msg),
  497. void *ctx);
  498. #define TLS_BREAK_VERIFY_DATA BIT(0)
  499. #define TLS_BREAK_SRV_KEY_X_HASH BIT(1)
  500. #define TLS_BREAK_SRV_KEY_X_SIGNATURE BIT(2)
  501. #define TLS_DHE_PRIME_511B BIT(3)
  502. #define TLS_DHE_PRIME_767B BIT(4)
  503. #define TLS_DHE_PRIME_15 BIT(5)
  504. #define TLS_DHE_PRIME_58B BIT(6)
  505. #define TLS_DHE_NON_PRIME BIT(7)
  506. void tls_connection_set_test_flags(struct tls_connection *conn, u32 flags);
  507. int tls_get_library_version(char *buf, size_t buf_len);
  508. #endif /* TLS_H */