You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

656 lines
24 KiB

8 years ago
7 years ago
7 years ago
7 years ago
8 years ago
1 year ago
8 years ago
8 years ago
7 years ago
8 years ago
8 years ago
1 year ago
1 year ago
8 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 years ago
8 years ago
7 years ago
8 years ago
1 year ago
1 year ago
7 years ago
7 years ago
1 year ago
1 year ago
7 years ago
7 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years ago
1 year ago
1 year ago
3 years ago
3 years ago
3 years ago
8 years ago
  1. /**
  2. * @file message_api.h
  3. * @brief pEp engine API for message handling and evaluation and related functions
  4. * @license GNU General Public License 3.0 - see LICENSE.txt
  5. */
  6. #ifndef MESSAGE_API_H
  7. #define MESSAGE_API_H
  8. #include "pEpEngine.h"
  9. #include "keymanagement.h"
  10. #include "message.h"
  11. #include "cryptotech.h"
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. /**
  16. * @enum PEP_encrypt_flags
  17. *
  18. * @brief TODO
  19. *
  20. */
  21. typedef enum _PEP_encrypt_flags {
  22. // "default" means whatever the default behaviour for the function is.
  23. PEP_encrypt_flag_default = 0x0,
  24. PEP_encrypt_flag_force_encryption = 0x1,
  25. // This flag is for special use cases and should not be used
  26. // by normal pEp clients!
  27. PEP_encrypt_flag_force_unsigned = 0x2,
  28. PEP_encrypt_flag_force_no_attached_key = 0x4,
  29. // This is used for outer messages (used to wrap the real message)
  30. // This is only used internally and (eventually) by transport functions
  31. PEP_encrypt_flag_inner_message = 0x8,
  32. // This is mainly used by pEp clients to send private keys to
  33. // their own PGP-only device
  34. PEP_encrypt_flag_force_version_1 = 0x10,
  35. PEP_encrypt_flag_key_reset_only = 0x20,
  36. // This flag is used to let internal functions know that an encryption
  37. // call is being used as part of a reencryption operation
  38. PEP_encrypt_reencrypt = 0x40
  39. } PEP_encrypt_flags;
  40. typedef unsigned int PEP_encrypt_flags_t;
  41. /**
  42. * @enum message_wrap_type
  43. *
  44. * @brief TODO
  45. *
  46. */
  47. typedef enum _message_wrap_type {
  48. PEP_message_unwrapped, // 1.0 or anything we don't wrap
  49. PEP_message_default, // typical inner/outer message 2.0
  50. PEP_message_transport, // e.g. for onion layers
  51. PEP_message_key_reset // for wrapped key reset information
  52. } message_wrap_type;
  53. /**
  54. * <!-- encrypt_message() -->
  55. *
  56. * @brief Encrypt message in memory
  57. *
  58. * @param[in] session session handle
  59. * @param[in,out] src message to encrypt - usually in-only, but can be
  60. * in-out for unencrypted messages; in that case,
  61. * we may attach the key and decorate the message
  62. * @param[in] extra extra keys for encryption
  63. * @param[out] dst pointer to new encrypted message or NULL if no
  64. * encryption could take place
  65. * @param[in] enc_format The desired format this message should be encrypted with
  66. * @param[in] flags flags to set special encryption features
  67. *
  68. * @retval PEP_STATUS_OK on success
  69. * @retval PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has
  70. * an ambiguous name
  71. * @retval PEP_UNENCRYPTED on demand or no recipients with usable
  72. * key, is left unencrypted, and key is
  73. * attached to it
  74. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  75. * @retval PEP_OUT_OF_MEMORY out of memory
  76. * @retval any other value on error
  77. *
  78. * @warning the ownership of src remains with the caller
  79. * the ownership of dst goes to the caller
  80. *
  81. * enc_format PEP_enc_inline_EA:
  82. * internal format of the encrypted attachments is changing, see
  83. * https://dev.pep.foundation/Engine/ElevatedAttachments
  84. *
  85. * Only use this for transports without support for attachments
  86. * when attached data must be sent inline
  87. *
  88. */
  89. DYNAMIC_API PEP_STATUS encrypt_message(
  90. PEP_SESSION session,
  91. message *src,
  92. stringlist_t *extra,
  93. message **dst,
  94. PEP_enc_format enc_format,
  95. PEP_encrypt_flags_t flags
  96. );
  97. /**
  98. * <!-- encrypt_message_and_add_priv_key() -->
  99. *
  100. * @brief Encrypt message in memory, adding an encrypted private
  101. * key (encrypted separately and sent within the inner message)
  102. *
  103. * @param[in] session session handle
  104. * @param[in] src message to encrypt
  105. * @param[out] dst pointer to new encrypted message or NULL if no
  106. * encryption could take place
  107. * @param[in] to_fpr fingerprint of the recipient key to which the private key
  108. * should be encrypted
  109. * @param[in] enc_format encrypted format
  110. * @param[in] flags flags to set special encryption features
  111. *
  112. * @retval PEP_STATUS_OK on success
  113. * @retval PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has
  114. * an ambiguous name
  115. * @retval PEP_UNENCRYPTED on demand or no recipients with usable
  116. * key, is left unencrypted, and key is
  117. * attached to it
  118. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  119. * @retval PEP_OUT_OF_MEMORY out of memory
  120. * @retval PEP_UNKNOWN_ERROR
  121. * @retval any other value on error
  122. *
  123. * @warning the ownershop of src remains with the caller
  124. * the ownership of dst goes to the caller
  125. *
  126. */
  127. DYNAMIC_API PEP_STATUS encrypt_message_and_add_priv_key(
  128. PEP_SESSION session,
  129. message *src,
  130. message **dst,
  131. const char* to_fpr,
  132. PEP_enc_format enc_format,
  133. PEP_encrypt_flags_t flags
  134. );
  135. /**
  136. * <!-- encrypt_message_for_self() -->
  137. *
  138. * @brief Encrypt message in memory for user's identity only,
  139. * ignoring recipients and other identities from
  140. * the message
  141. *
  142. * @param[in] session session handle
  143. * @param[in] target_id self identity this message should be encrypted for
  144. * @param[in] src message to encrypt
  145. * @param[in] extra extra keys for encryption
  146. * @param[out] dst pointer to new encrypted message or NULL on failure
  147. * @param[in] enc_format encrypted format
  148. * @param[in] flags flags to set special encryption features
  149. *
  150. * @retval PEP_STATUS_OK on success
  151. * @retval PEP_KEY_NOT_FOUND at least one of the receipient keys
  152. * could not be found
  153. * @retval PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has
  154. * an ambiguous name
  155. * @retval PEP_GET_KEY_FAILED cannot retrieve key
  156. * @retval PEP_CANNOT_FIND_IDENTITY
  157. * @retval PEP_ILLEGAL_VALUE
  158. * @retval PEP_OUT_OF_MEMORY
  159. *
  160. * @warning the ownership of src remains with the caller
  161. * the ownership of target_id remains w/ caller
  162. * the ownership of dst goes to the caller
  163. * message is NOT encrypted for identities other than the target_id (and then,
  164. * only if the target_id refers to self!)
  165. *
  166. */
  167. DYNAMIC_API PEP_STATUS encrypt_message_for_self(
  168. PEP_SESSION session,
  169. pEp_identity* target_id,
  170. message *src,
  171. stringlist_t* extra,
  172. message **dst,
  173. PEP_enc_format enc_format,
  174. PEP_encrypt_flags_t flags
  175. );
  176. /**
  177. * @enum PEP_rating
  178. *
  179. * @brief TODO
  180. *
  181. */
  182. typedef enum _PEP_rating {
  183. PEP_rating_undefined = 0,
  184. // no color
  185. PEP_rating_cannot_decrypt = 1,
  186. PEP_rating_have_no_key = 2,
  187. PEP_rating_unencrypted = 3,
  188. PEP_rating_unreliable = 5,
  189. PEP_rating_b0rken = -2,
  190. // yellow
  191. PEP_rating_reliable = 6,
  192. // green
  193. PEP_rating_trusted = 7,
  194. PEP_rating_trusted_and_anonymized = 8,
  195. PEP_rating_fully_anonymous = 9,
  196. // red
  197. PEP_rating_mistrust = -1,
  198. PEP_rating_under_attack = -3
  199. } PEP_rating;
  200. /**
  201. * @enum PEP_color
  202. *
  203. * @brief TODO
  204. *
  205. */
  206. typedef enum _PEP_color {
  207. PEP_color_no_color = 0,
  208. PEP_color_yellow,
  209. PEP_color_green,
  210. PEP_color_red = -1,
  211. } PEP_color;
  212. /**
  213. * <!-- color_from_rating() -->
  214. *
  215. * @brief Calculate color from rating
  216. *
  217. * @param[in] rating rating
  218. *
  219. * @retval PEP_color color representing the rating
  220. */
  221. DYNAMIC_API PEP_color color_from_rating(PEP_rating rating);
  222. /**
  223. * @enum PEP_decrypt_flags
  224. *
  225. * @brief TODO
  226. *
  227. */
  228. typedef enum _PEP_decrypt_flags {
  229. PEP_decrypt_flag_own_private_key = 0x1,
  230. PEP_decrypt_flag_consume = 0x2,
  231. PEP_decrypt_flag_ignore = 0x4,
  232. PEP_decrypt_flag_src_modified = 0x8,
  233. // input flags
  234. PEP_decrypt_flag_untrusted_server = 0x100,
  235. PEP_decrypt_flag_dont_trigger_sync = 0x200
  236. } PEP_decrypt_flags;
  237. typedef unsigned int PEP_decrypt_flags_t;
  238. /**
  239. * <!-- decrypt_message() -->
  240. *
  241. * @brief Decrypt message in memory
  242. *
  243. * @param[in] session session handle
  244. * @param[in,out] src message to decrypt - see warning about identities below
  245. * @param[out] dst pointer to new decrypted message or NULL on failure
  246. * @param[in,out] keylist in: stringlist with additional keyids for reencryption if needed
  247. * (will be freed and replaced with output keylist)
  248. * out: stringlist with keyids used for signing and encryption. first
  249. * first key is signer, additional keys are the ones it was encrypted
  250. * to. Only signer and whichever of the user's keys was used are
  251. * reliable
  252. * @param[out] rating rating for the message
  253. * @param[in,out] flags flags to signal special decryption features
  254. *
  255. * @retval <ERROR> any error status
  256. * @retval PEP_DECRYPTED if message decrypted but not verified
  257. * @retval PEP_CANNOT_REENCRYPT if message was decrypted (and possibly
  258. * verified) but a reencryption operation is expected by the caller
  259. * and failed
  260. * @retval PEP_STATUS_OK on success
  261. *
  262. * @note Flags above are as follows:
  263. * @verbatim
  264. * ---------------------------------------------------------------------------------------------|
  265. * Incoming flags |
  266. * ---------------------------------------------------------------------------------------------|
  267. * Flag | Description |
  268. * --------------------------------------|------------------------------------------------------|
  269. * PEP_decrypt_flag_untrusted_server | used to signal that decrypt function should engage |
  270. * | in behaviour specified for when the server storing |
  271. * | the source is untrusted. |
  272. * ---------------------------------------------------------------------------------------------|
  273. * Outgoing flags |
  274. * ---------------------------------------------------------------------------------------------|
  275. * PEP_decrypt_flag_own_private_key | private key was imported for one of our addresses |
  276. * | (NOT trusted or set to be used - handshake/trust is |
  277. * | required for that) |
  278. * | |
  279. * PEP_decrypt_flag_src_modified | indicates that the modified_src field should contain |
  280. * | a modified version of the source, at the moment |
  281. * | always as a result of the input flags. |
  282. * | |
  283. * PEP_decrypt_flag_consume | used by sync to indicate this was a pEp internal |
  284. * | message and should be consumed externally without |
  285. * | showing it as a normal message to the user |
  286. * | |
  287. * PEP_decrypt_flag_ignore | used by sync |
  288. * ---------------------------------------------------------------------------------------------| @endverbatim
  289. *
  290. * @ownership src remains with the caller; HOWEVER, the contents
  291. * might be modified (strings freed and allocated anew or set to NULL,
  292. * etc) intentionally; when this happens, PEP_decrypt_flag_src_modified
  293. * is set.
  294. * @ownership dst goes to the caller
  295. * @ownership contents of keylist goes to the caller
  296. * @note if src is unencrypted this function returns PEP_UNENCRYPTED and sets
  297. * dst to NULL
  298. * @note if src->enc_format is PEP_enc_inline_EA on input then elevated attachments
  299. * will be expected
  300. *
  301. *
  302. * @warning decrypt_message RELIES on the fact that identity information provided in src for recips and
  303. * sender is AS TAKEN FROM THE ORIGINAL PARSED MESSAGE. This means that if update_identity or
  304. * myself is called on those identities by the caller before passing the message struct to decrypt_message,
  305. * the caller will have to cache and restore those to their original state before sending them
  306. * to this function. ADAPTERS AND APPLICATIONS PLEASE TAKE NOTE OF THIS. (Obviously, this doesn't
  307. * include information like user_ids, but we very specifically need the incoming usernames preserved
  308. * so that they can be handled by the internal algorithm appropriately)
  309. */
  310. DYNAMIC_API PEP_STATUS decrypt_message(
  311. PEP_SESSION session,
  312. message *src,
  313. message **dst,
  314. stringlist_t **keylist,
  315. PEP_rating *rating,
  316. PEP_decrypt_flags_t *flags
  317. );
  318. /**
  319. * <!-- own_message_private_key_details() -->
  320. *
  321. * @brief Details on own key in own message
  322. *
  323. * @param[in] session session handle
  324. * @param[in] msg message to decrypt
  325. * @param[out] ident identity containing uid, address and fpr of key
  326. * note:
  327. * In order to obtain details about key to be possibly imported
  328. * as a replacement of key currently used as own identity,
  329. * application passes message that have been previously flagged by
  330. * decrypt_message() as own message containing own key to this function
  331. *
  332. * @retval PEP_STATUS_OK on success
  333. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  334. * @retval any other value on error
  335. *
  336. * @warning the ownership of msg remains with the caller
  337. * the ownership of ident goes to the caller
  338. * msg MUST be encrypted so that this function can check own signature
  339. *
  340. */
  341. DYNAMIC_API PEP_STATUS own_message_private_key_details(
  342. PEP_SESSION session,
  343. message *msg,
  344. pEp_identity **ident
  345. );
  346. /**
  347. * <!-- outgoing_message_rating() -->
  348. *
  349. * @brief Get rating for an outgoing message
  350. *
  351. * @param[in] session session handle
  352. * @param[in] msg message to get the rating for
  353. * @param[out] rating rating for the message
  354. *
  355. *
  356. * @retval PEP_STATUS_OK
  357. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  358. *
  359. * @warning msg->from must point to a valid pEp_identity
  360. * msg->dir must be PEP_dir_outgoing
  361. * the ownership of msg remains with the caller
  362. *
  363. */
  364. DYNAMIC_API PEP_STATUS outgoing_message_rating(
  365. PEP_SESSION session,
  366. message *msg,
  367. PEP_rating *rating
  368. );
  369. /**
  370. * <!-- outgoing_message_rating_preview() -->
  371. *
  372. * @brief Get rating preview
  373. *
  374. * @param[in] session session handle
  375. * @param[in] msg message to get the rating for
  376. * @param[out] rating rating preview for the message
  377. *
  378. * @retval PEP_STATUS_OK
  379. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  380. *
  381. * @warning msg->from must point to a valid pEp_identity
  382. * msg->dir must be PEP_dir_outgoing
  383. * the ownership of msg remains with the caller
  384. *
  385. */
  386. DYNAMIC_API PEP_STATUS outgoing_message_rating_preview(
  387. PEP_SESSION session,
  388. message *msg,
  389. PEP_rating *rating
  390. );
  391. /**
  392. * <!-- identity_rating() -->
  393. *
  394. * @brief Get rating for a single identity
  395. *
  396. * @param[in] session session handle
  397. * @param[in] ident identity to get the rating for
  398. * @param[out] rating rating for the identity
  399. * @retval PEP_STATUS_OK
  400. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  401. * @retval any other value on error
  402. *
  403. * @warning the ownership of ident remains with the caller
  404. *
  405. */
  406. DYNAMIC_API PEP_STATUS identity_rating(
  407. PEP_SESSION session,
  408. pEp_identity *ident,
  409. PEP_rating *rating
  410. );
  411. /**
  412. * <!-- get_binary_path() -->
  413. *
  414. * @brief Retrieve path of cryptotech binary if available
  415. *
  416. * @param[in] tech cryptotech to get the binary for
  417. * @param[out] path path to cryptotech binary or NULL if not available
  418. * **path is owned by the library, do not change it!
  419. *
  420. *
  421. */
  422. DYNAMIC_API PEP_STATUS get_binary_path(PEP_cryptotech tech, const char **path);
  423. /**
  424. * <!-- get_trustwords() -->
  425. *
  426. * @brief Get full trustwords string for a *pair* of identities
  427. *
  428. * @param[in] session session handle
  429. * @param[in] id1 identity of first party in communication - fpr can't be NULL
  430. * @param[in] id2 identity of second party in communication - fpr can't be NULL
  431. * @param[in] lang C string with ISO 639-1 language code
  432. * @param[out] words pointer to C string with all trustwords UTF-8 encoded,
  433. * separated by a blank each
  434. * NULL if language is not supported or trustword
  435. * wordlist is damaged or unavailable
  436. * @param[out] wsize length of full trustwords string
  437. * @param[in] full if true, generate ALL trustwords for these identities.
  438. * else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
  439. * subset in next version)
  440. *
  441. * @retval PEP_STATUS_OK trustwords retrieved
  442. * @retval PEP_OUT_OF_MEMORY out of memory
  443. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  444. * @retval PEP_TRUSTWORD_NOT_FOUND at least one trustword not found
  445. *
  446. * @warning the word pointer goes to the ownership of the caller
  447. * the caller is responsible to free() it (on Windoze use pEp_free())
  448. *
  449. */
  450. DYNAMIC_API PEP_STATUS get_trustwords(
  451. PEP_SESSION session, const pEp_identity* id1, const pEp_identity* id2,
  452. const char* lang, char **words, size_t *wsize, bool full
  453. );
  454. /**
  455. * <!-- get_message_trustwords() -->
  456. *
  457. * @brief Get full trustwords string for message sender and reciever identities
  458. *
  459. * @param[in] session session handle
  460. * @param[in] msg message to get sender identity from
  461. * @param[in] keylist NULL if message to be decrypted,
  462. * keylist returned by decrypt_message() otherwise
  463. * @param[in] received_by identity for account receiving message can't be NULL
  464. * @param[in] lang C string with ISO 639-1 language code
  465. * @param[out] words pointer to C string with all trustwords UTF-8 encoded,
  466. * separated by a blank each
  467. * NULL if language is not supported or trustword
  468. * wordlist is damaged or unavailable
  469. * @param[in] full if true, generate ALL trustwords for these identities.
  470. * else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
  471. * subset in next version)
  472. *
  473. * @retval PEP_STATUS_OK trustwords retrieved
  474. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  475. * @retval PEP_OUT_OF_MEMORY out of memory
  476. * @retval PEP_TRUSTWORD_NOT_FOUND at least one trustword not found
  477. * @retval PEP_CANNOT_FIND_IDENTITY identity not found
  478. * @retval error status of decrypt_message() if decryption fails.
  479. *
  480. * @warning the word pointer goes to the ownership of the caller
  481. * the caller is responsible to free() it (on Windoze use pEp_free())
  482. *
  483. */
  484. DYNAMIC_API PEP_STATUS get_message_trustwords(
  485. PEP_SESSION session,
  486. message *msg,
  487. stringlist_t *keylist,
  488. pEp_identity* received_by,
  489. const char* lang, char **words, bool full
  490. );
  491. /**
  492. * <!-- get_trustwords_for_fprs() -->
  493. *
  494. * @brief Get full trustwords string for a pair of fingerprints
  495. *
  496. * @param[in] session session handle
  497. * @param[in] fpr1 fingerprint 1
  498. * @param[in] fpr2 fingerprint 2
  499. * @param[in] lang C string with ISO 639-1 language code
  500. * @param[out] words pointer to C string with all trustwords UTF-8 encoded,
  501. * separated by a blank each
  502. * NULL if language is not supported or trustword
  503. * wordlist is damaged or unavailable
  504. * @param[out] wsize length of full trustwords string
  505. * @param[in] full if true, generate ALL trustwords for these identities.
  506. * else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
  507. * subset in next version)
  508. *
  509. * @retval PEP_STATUS_OK trustwords retrieved
  510. * @retval PEP_OUT_OF_MEMORY out of memory
  511. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  512. * @retval PEP_TRUSTWORD_NOT_FOUND at least one trustword not found
  513. *
  514. * @warning the word pointer goes to the ownership of the caller
  515. * the caller is responsible to free() it (on Windoze use pEp_free())
  516. *
  517. */
  518. DYNAMIC_API PEP_STATUS get_trustwords_for_fprs(
  519. PEP_SESSION session, const char* fpr1, const char* fpr2,
  520. const char* lang, char **words, size_t *wsize, bool full
  521. );
  522. /**
  523. * <!-- re_evaluate_message_rating() -->
  524. *
  525. * @brief Re-evaluate already decrypted message rating
  526. *
  527. * @param[in] session session handle
  528. * @param[in] msg message to get the rating for
  529. * @param[in] x_keylist decrypted message recipients keys fpr
  530. * @param[in] x_enc_status original rating for the decrypted message
  531. * @param[out] rating rating for the message
  532. *
  533. * @retval PEP_STATUS_OK
  534. * @retval PEP_ILLEGAL_VALUE if decrypted message doesn't contain
  535. * X-EncStatus optional field and x_enc_status is
  536. * pEp_rating_udefined
  537. * or if decrypted message doesn't contain
  538. * X-Keylist optional field and x_keylist is NULL
  539. * @retval PEP_OUT_OF_MEMORY if not enough memory could be allocated
  540. * @retval any other value on error
  541. *
  542. * @warning msg->from must point to a valid pEp_identity
  543. * the ownership of msg remains with the caller
  544. * the ownership of x_keylist remains with to the caller
  545. *
  546. */
  547. DYNAMIC_API PEP_STATUS re_evaluate_message_rating(
  548. PEP_SESSION session,
  549. message *msg,
  550. stringlist_t *x_keylist,
  551. PEP_rating x_enc_status,
  552. PEP_rating *rating
  553. );
  554. /**
  555. * <!-- get_key_rating_for_user() -->
  556. *
  557. * @brief Get the rating of a certain key for a certain user
  558. *
  559. * @param[in] session session handle
  560. * @param[in] user_id string with user ID
  561. * @param[in] fpr string with fingerprint
  562. * @param[out] rating rating of key for this user
  563. *
  564. * @retval PEP_STATUS_OK
  565. * @retval PEP_ILLEGAL_VALUE illegal parameter values
  566. * @retval PEP_OUT_OF_MEMORY out of memory
  567. * @retval PEP_RECORD_NOT_FOUND if no trust record for user_id
  568. * and fpr can be found
  569. * @retval any other value on error
  570. *
  571. *
  572. */
  573. DYNAMIC_API PEP_STATUS get_key_rating_for_user(
  574. PEP_SESSION session,
  575. const char *user_id,
  576. const char *fpr,
  577. PEP_rating *rating
  578. );
  579. /**
  580. * <!-- rating_from_comm_type() -->
  581. *
  582. * @brief Get the rating for a comm type
  583. *
  584. * @param[in] ct the comm type to deliver the rating for
  585. *
  586. * @retval PEP_rating rating value for comm type ct
  587. *
  588. *
  589. */
  590. DYNAMIC_API PEP_rating rating_from_comm_type(PEP_comm_type ct);
  591. #ifdef __cplusplus
  592. }
  593. #endif
  594. #endif