p≡p JSON adapter
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.

760 lines
27 KiB

  1. ### Detailed Function reference for the p≡p JSON Server Adapter. Version “(38) Frankenberg”, API version 0.15.0 ###
  2. Output parameters are denoted by a **⇑** , InOut parameters are denoted by a **⇕** after the parameter type.
  3. Nota bene: This list was created manually from the "authorative API description" and might be outdated.
  4. #### Message API ####
  5. ##### MIME_encrypt_message( String mimetext, Integer size, StringList extra, String⇑ mime_ciphertext, PEP_enc_format env_format, Integer flags) #####
  6. encrypt a MIME message, with MIME output
  7. ```
  8. parameters:
  9. mimetext (in) MIME encoded text to encrypt
  10. size (in) size of input mime text
  11. extra (in) extra keys for encryption
  12. mime_ciphertext (out) encrypted, encoded message
  13. enc_format (in) encrypted format
  14. flags (in) flags to set special encryption features
  15. return value:
  16. PEP_STATUS_OK if everything worked
  17. PEP_BUFFER_TOO_SMALL if encoded message size is too big to handle
  18. PEP_CANNOT_CREATE_TEMP_FILE
  19. if there are issues with temp files; in
  20. this case errno will contain the underlying
  21. error
  22. PEP_OUT_OF_MEMORY if not enough memory could be allocated
  23. ```
  24. *Caveat:* the encrypted, encoded mime text will go to the ownership of the caller; mimetext
  25. will remain in the ownership of the caller
  26. ##### MIME_encrypt_message_for_self( Identity target_id, String mimetext, Integer size, StringList extra, String⇑ mime_ciphertext, PEP_enc_format enc_format, Integer flags) #####
  27. encrypt MIME message for user's identity only, ignoring recipients and other identities from
  28. the message, with MIME output
  29. ```
  30. parameters:
  31. target_id (in) self identity this message should be encrypted for
  32. mimetext (in) MIME encoded text to encrypt
  33. size (in) size of input mime text
  34. extra (in) extra keys for encryption
  35. mime_ciphertext (out) encrypted, encoded message
  36. enc_format (in) encrypted format
  37. flags (in) flags to set special encryption features
  38. return value:
  39. PEP_STATUS_OK if everything worked
  40. PEP_BUFFER_TOO_SMALL if encoded message size is too big to handle
  41. PEP_CANNOT_CREATE_TEMP_FILE
  42. if there are issues with temp files; in
  43. this case errno will contain the underlying
  44. error
  45. PEP_OUT_OF_MEMORY if not enough memory could be allocated
  46. caveat:
  47. the encrypted, encoded mime text will go to the ownership of the caller; mimetext
  48. will remain in the ownership of the caller
  49. ```
  50. ##### MIME_decrypt_message(String mimetext, Integer size, String⇑ mime_plaintext, StringList⇑ keylist, PEP_rating⇑ rating, Integer⇕ flags, String⇑ modified_src)
  51. decrypt a MIME message, with MIME output
  52. ```
  53. parameters:
  54. mimetext (in) MIME encoded text to decrypt
  55. size (in) size of mime text to decode (in order to decrypt)
  56. mime_plaintext (out) decrypted, encoded message
  57. keylist (out) stringlist with keyids
  58. rating (out) rating for the message
  59. flags (inout) flags to signal special decryption features
  60. modified_src (out) modified source string, if decrypt had reason to change it
  61. return value:
  62. decrypt status if everything worked with MIME encode/decode,
  63. the status of the decryption is returned
  64. (PEP_STATUS_OK or decryption error status)
  65. PEP_BUFFER_TOO_SMALL if encoded message size is too big to handle
  66. PEP_CANNOT_CREATE_TEMP_FILE
  67. if there are issues with temp files; in
  68. this case errno will contain the underlying
  69. error
  70. PEP_OUT_OF_MEMORY if not enough memory could be allocated
  71. flag values:
  72. in:
  73. PEP_decrypt_flag_untrusted_server
  74. used to signal that decrypt function should engage in behaviour
  75. specified for when the server storing the source is untrusted.
  76. out:
  77. PEP_decrypt_flag_own_private_key
  78. private key was imported for one of our addresses (NOT trusted
  79. or set to be used - handshake/trust is required for that)
  80. PEP_decrypt_flag_src_modified
  81. indicates that the modified_src field should contain a modified
  82. version of the source, at the moment always as a result of the
  83. input flags.
  84. PEP_decrypt_flag_consume
  85. used by sync
  86. PEP_decrypt_flag_ignore
  87. used by sync
  88. caveat:
  89. the decrypted, encoded mime text will go to the ownership of the caller; mimetext
  90. will remain in the ownership of the caller
  91. ```
  92. ##### startKeySync()
  93. Start Key Synchronization for the current session.
  94. ##### stopKeySync()
  95. Stop Key Synchronization for the current session.
  96. ##### startKeyserverLookup()
  97. Start a global thread for Keyserver Lookup. This thread handles all keyserver communication for all sessions.
  98. ##### stopKeyserverLookup()
  99. Stop the global thread for Keyserver Lookup.
  100. ##### encrypt_message(Message src, StringList extra_keys, Message⇑ dst, PEP_enc_format enc_format, Integer flags)
  101. encrypt message in memory
  102. ```
  103. parameters:
  104. src (in) message to encrypt
  105. extra_keys (in) extra keys for encryption
  106. dst (out) pointer to new encrypted message or NULL on failure
  107. enc_format (in) encrypted format
  108. flags (in) flags to set special encryption features
  109. return value:
  110. PEP_STATUS_OK on success
  111. PEP_KEY_NOT_FOUND at least one of the receipient keys
  112. could not be found
  113. PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has
  114. an ambiguous name
  115. PEP_GET_KEY_FAILED cannot retrieve key
  116. PEP_UNENCRYPTED no recipients with usable key,
  117. message is left unencrypted,
  118. and key is attached to it
  119. ```
  120. ##### encrypt_message_and_add_priv_key( Message src, Message⇑ dst, String to_fingerprint, PEP_enc_format enc_format, Integer flags)
  121. encrypt message in memory, adding an encrypted private key (encrypted separately and sent within the inner message)
  122. ```
  123. parameters:
  124. session (in) session handle
  125. src (in) message to encrypt
  126. dst (out) pointer to new encrypted message or NULL if no
  127. encryption could take place
  128. to_fpr fingerprint of the recipient key to which the private key
  129. should be encrypted
  130. enc_format (in) encrypted format
  131. flags (in) flags to set special encryption features
  132. return value:
  133. PEP_STATUS_OK on success
  134. PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has
  135. an ambiguous name
  136. PEP_UNENCRYPTED on demand or no recipients with usable
  137. key, is left unencrypted, and key is
  138. attached to it
  139. caveat:
  140. the ownershop of src remains with the caller
  141. the ownership of dst goes to the caller
  142. ```
  143. ##### encrypt_message_for_self(Identity target_id, Message src, Message⇑ dst, PEP_enc_format enc_format, Integer flags)
  144. encrypt message in memory for user's identity only,
  145. ignoring recipients and other identities from
  146. the message.
  147. ```
  148. parameters:
  149. target_id (in) self identity this message should be encrypted for
  150. src (in) message to encrypt
  151. dst (out) pointer to new encrypted message or NULL on failure
  152. enc_format (in) encrypted format
  153. flags (in) flags to set special encryption features
  154. return value: (FIXME: This may not be correct or complete)
  155. PEP_STATUS_OK on success
  156. PEP_KEY_NOT_FOUND at least one of the receipient keys
  157. could not be found
  158. PEP_KEY_HAS_AMBIG_NAME at least one of the receipient keys has
  159. an ambiguous name
  160. PEP_GET_KEY_FAILED cannot retrieve key
  161. ```
  162. *Caveat:* message is NOT encrypted for identities other than the target_id (and then,
  163. only if the target_id refers to self!)
  164. ##### decrypt_message(Message⇕ src, Message⇑ dst, StringList⇑ keylist, PEP_rating⇑ rating, Integer⇕ flags)
  165. decrypt message in memory
  166. ```
  167. parameters:
  168. src (inout) message to decrypt
  169. dst (out) pointer to new decrypted message or NULL on failure
  170. keylist (out) stringlist with keyids
  171. rating (out) rating for the message
  172. flags (inout) flags to signal special decryption features
  173. return value:
  174. error status
  175. or PEP_DECRYPTED if message decrypted but not verified
  176. or PEP_CANNOT_REENCRYPT if message was decrypted (and possibly
  177. verified) but a reencryption operation is expected by the caller
  178. and failed
  179. or PEP_STATUS_OK on success
  180. flag values:
  181. in:
  182. PEP_decrypt_flag_untrusted_server
  183. used to signal that decrypt function should engage in behaviour
  184. specified for when the server storing the source is untrusted
  185. out:
  186. PEP_decrypt_flag_own_private_key
  187. private key was imported for one of our addresses (NOT trusted
  188. or set to be used - handshake/trust is required for that)
  189. PEP_decrypt_flag_src_modified
  190. indicates that the src object has been modified. At the moment,
  191. this is always as a direct result of the behaviour driven
  192. by the input flags. This flag is the ONLY value that should be
  193. relied upon to see if such changes have taken place.
  194. PEP_decrypt_flag_consume
  195. used by sync
  196. PEP_decrypt_flag_ignore
  197. used by sync
  198. caveat:
  199. the ownership of src remains with the caller - however, the contents
  200. might be modified (strings freed and allocated anew or set to NULL,
  201. etc) intentionally; when this happens, PEP_decrypt_flag_src_modified
  202. is set.
  203. the ownership of dst goes to the caller
  204. the ownership of keylist goes to the caller
  205. if src is unencrypted this function returns PEP_UNENCRYPTED and sets
  206. dst to NULL
  207. ```
  208. ##### outgoing_message_rating(Message msg, PEP_rating⇑ rating)
  209. get rating for an outgoing message
  210. ```
  211. parameters:
  212. msg (in) message to get the rating for
  213. rating (out) rating for the message
  214. return value:
  215. error status or PEP_STATUS_OK on success
  216. caveat:
  217. msg->from must point to a valid pEp_identity
  218. msg->dir must be PEP_dir_outgoing
  219. ```
  220. ##### re_evaluate_message_rating(Message msg, StringList keylist, PEP_rating enc_status, PEP_rating⇑ rating)
  221. re-evaluate already decrypted message rating
  222. ```
  223. parameters:
  224. msg (in) message to get the rating for
  225. keylist (in) decrypted message recipients keys fpr
  226. enc_status (in) original rating for the decrypted message
  227. rating (out) rating for the message
  228. return value:
  229. PEP_ILLEGAL_VALUE if decrypted message doesn't contain
  230. X-EncStatus optional field and x_enc_status is
  231. pEp_rating_udefined
  232. or if decrypted message doesn't contain
  233. X-Keylist optional field and x_keylist is NULL
  234. PEP_OUT_OF_MEMORY if not enough memory could be allocated
  235. caveat:
  236. msg->from must point to a valid pEp_identity
  237. ```
  238. ##### identity_rating(Identity ident, PEP_rating⇑ rating)
  239. get rating for a single identity
  240. ```
  241. parameters:
  242. ident (in) identity to get the rating for
  243. rating (out) rating for the identity
  244. return value:
  245. error status or PEP_STATUS_OK on success
  246. ```
  247. ##### get_gpg_path(String⇑)
  248. get path of gpg binary.
  249. #### MIME message handling ####
  250. ##### mime_decode_message(String mime_message, Integer message_lenght, Message msg)
  251. #### pEp Engine Core API ####
  252. ##### get_trustwords(Identity id1, Identity id2, Language lang, String⇑ words, Integer⇑ wsize, Bool full)
  253. get full trustwords string for a *pair* of identities
  254. ```
  255. parameters:
  256. id1 (in) identity of first party in communication - fpr can't be NULL
  257. id2 (in) identity of second party in communication - fpr can't be NULL
  258. lang (in) C string with ISO 639-1 language code
  259. words (out) pointer to C string with all trustwords UTF-8 encoded,
  260. separated by a blank each
  261. NULL if language is not supported or trustword
  262. wordlist is damaged or unavailable
  263. wsize (out) length of full trustwords string
  264. full (in) if true, generate ALL trustwords for these identities.
  265. else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
  266. subset in next version)
  267. return value:
  268. PEP_STATUS_OK trustwords retrieved
  269. PEP_OUT_OF_MEMORY out of memory
  270. PEP_TRUSTWORD_NOT_FOUND at least one trustword not found
  271. ```
  272. ##### get_languagelist(String⇑ languages)
  273. get the list of languages
  274. ```
  275. parameters:
  276. languages (out) languages as string in double quoted CSV format
  277. column 1 is the ISO 639-1 language code
  278. column 2 is the name of the language
  279. ```
  280. ##### is_pep_user(Identity id, Bool⇑ ia_pwp)
  281. returns true if the USER corresponding to this identity has been listed in the *person* table as a pEp user
  282. ```
  283. parameters:
  284. identity (in) - identity containing the user_id to check (this is
  285. the only part of the struct we require to be set)
  286. is_pep (out) - boolean pointer - will return true or false by
  287. reference with respect to whether or not user is
  288. a known pep user
  289. ```
  290. ##### config_passive_mode(Bool enable)
  291. enable passive mode
  292. * parameters: enable (in) flag if enabled or disabled
  293. ##### config_unencrypted_subject(Bool enable)
  294. disable subject encryption
  295. * parameters: enable (in) flag if enabled or disabled
  296. #### Identity Management API ####
  297. ##### get_identity(String address, String user_id, Identity⇑ identity)
  298. get identity information
  299. ```
  300. parameters:
  301. address (in) string with communication address, UTF-8 encoded
  302. user_id (in) unique string to identify person that identity is refering to
  303. identity (out) pEp_identity structure with results or NULL if failure
  304. ```
  305. ##### set_identity(Identity)
  306. set identity information
  307. ```
  308. parameters:
  309. identity (in) pEp_identity structure
  310. return value:
  311. PEP_STATUS_OK = 0 encryption and signing succeeded
  312. PEP_CANNOT_SET_PERSON writing to table person failed
  313. PEP_CANNOT_SET_PGP_KEYPAIR writing to table pgp_keypair failed
  314. PEP_CANNOT_SET_IDENTITY writing to table identity failed
  315. PEP_COMMIT_FAILED SQL commit failed
  316. PEP_KEY_BLACKLISTED Key blacklisted, cannot set identity
  317. caveat:
  318. address, fpr, user_id and username must be given
  319. ```
  320. ##### mark_as_comprimized(String fpr)
  321. mark key in trust db as compromized
  322. * parameters: fpr (in) fingerprint of key to mark
  323. ##### identity_rating(Identity ident, PEP_rating⇑ rating)
  324. get rating for a single identity
  325. ```
  326. parameters:
  327. ident (in) identity to get the rating for
  328. rating (out) rating for the identity
  329. return value:
  330. error status or PEP_STATUS_OK on success
  331. ```
  332. ##### outgoing_message_rating(Message msg, PEP_rating⇑ rating)
  333. get rating for an outgoing message
  334. ```
  335. parameters:
  336. msg (in) message to get the rating for
  337. rating (out) rating for the message
  338. return value:
  339. error status or PEP_STATUS_OK on success
  340. caveat:
  341. msg->from must point to a valid pEp_identity
  342. msg->dir must be PEP_dir_outgoing
  343. ```
  344. ##### set_identity_flags(Identity⇕ identity, Integer flags)
  345. update identity flags on existing identity
  346. ```
  347. parameters:
  348. identity (in,out) pointer to pEp_identity structure
  349. flags (in) new value for flags
  350. return value:
  351. PEP_STATUS_OK = 0 encryption and signing succeeded
  352. PEP_CANNOT_SET_IDENTITY update of identity failed
  353. caveat:
  354. address and user_id must be given in identity
  355. ```
  356. ##### unset_identity_flags(Identity⇕ identity, Integer flags)
  357. update identity flags on existing identity
  358. ```
  359. parameters:
  360. identity (in,out) pointer to pEp_identity structure
  361. flags (in) new value for flags
  362. return value:
  363. PEP_STATUS_OK = 0 encryption and signing succeeded
  364. PEP_CANNOT_SET_IDENTITY update of identity failed
  365. caveat:
  366. address and user_id must be given in identity
  367. ```
  368. #### Low level Key Management API ####
  369. ##### generate_keypair(Identity⇕ identity)
  370. generate a new key pair and add it to the key ring
  371. ```
  372. parameters:
  373. identity (inout) pEp_identity structure
  374. return value:
  375. PEP_STATUS_OK = 0 encryption and signing succeeded
  376. PEP_ILLEGAL_VALUE illegal values for identity fields given
  377. PEP_CANNOT_CREATE_KEY key engine is on strike
  378. caveat:
  379. address and username fields must be set to UTF-8 strings
  380. the fpr field must be set to NULL
  381. ```
  382. ##### delete_keypair(String fpr)
  383. delete a public key or a key pair from the key ring
  384. ```
  385. parameters:
  386. fpr (in) string with key id or fingerprint of the public key
  387. return value:
  388. PEP_STATUS_OK = 0 key was successfully deleted
  389. PEP_KEY_NOT_FOUND key not found
  390. PEP_ILLEGAL_VALUE not a valid key id or fingerprint
  391. PEP_KEY_HAS_AMBIG_NAME fpr does not uniquely identify a key
  392. PEP_OUT_OF_MEMORY out of memory
  393. ```
  394. ##### import_key(String key_data, Integer size, IdentityList⇑ private_keys)
  395. import key from data
  396. ```
  397. parameters:
  398. key_data (in) key data, i.e. ASCII armored OpenPGP key
  399. size (in) amount of data to handle
  400. private_keys (out) list of private keys that have been imported
  401. return value:
  402. PEP_STATUS_OK = 0 key was successfully imported
  403. PEP_OUT_OF_MEMORY out of memory
  404. PEP_ILLEGAL_VALUE there is no key data to import
  405. ```
  406. ##### export_key(String fpr, String⇑ key_data, Integer⇑ size)
  407. export ascii armored key
  408. ```
  409. parameters:
  410. fpr (in) key id or fingerprint of key
  411. key_data (out) ASCII armored OpenPGP key
  412. size (out) amount of data to handle
  413. return value:
  414. PEP_STATUS_OK = 0 key was successfully exported
  415. PEP_OUT_OF_MEMORY out of memory
  416. PEP_KEY_NOT_FOUND key not found
  417. ```
  418. ##### find_keys(String pattern, StringList⇑ keylist)
  419. find keys in keyring
  420. ```
  421. parameters:
  422. pattern (in) key id, user id or address to search for as UTF-8 string
  423. keylist (out) list of fingerprints found or NULL on error
  424. ```
  425. ##### get_trust(Identity⇕ identity)
  426. get the trust level a key has for a person
  427. ```
  428. parameters:
  429. identity (inout) user_id and fpr to check as UTF-8 strings (in)
  430. user_id and comm_type as result (out)
  431. ```
  432. This function modifies the given identity struct; the struct remains in
  433. the ownership of the caller.
  434. If the trust level cannot be determined identity->comm_type is set
  435. to PEP_ct_unknown.
  436. ##### own_key_is_listed(String fpr, Bool⇑ listed)
  437. returns true id key is listed as own key
  438. ```
  439. parameters:
  440. fpr (in) fingerprint of key to test
  441. listed (out) flags if key is own
  442. ```
  443. ##### own_identities_retrieve(IdentityList⇑ own_identities)
  444. retrieve all own identities
  445. ```
  446. parameters:
  447. own_identities (out) list of own identities
  448. ```
  449. ##### set_own_key( Identity⇕ id, String fpr)
  450. mark key as own key
  451. ```
  452. parameters:
  453. me (inout) own identity this key is used for
  454. fpr (in) fingerprint of the key to mark as own key
  455. ```
  456. ##### undo_last_mistrust()
  457. reset identity and trust status for the last`identity in this session marked
  458. as mistrusted to their cached values from the time of mistrust
  459. ```
  460. parameters:
  461. (none)
  462. return value:
  463. PEP_STATUS_OK if identity and trust were successfully restored.
  464. Otherwise, error status from attempts to set.
  465. caveat:
  466. only works for this session, and only once. cache is invalidated
  467. upon use.
  468.   WILL NOT WORK ON MISTRUSTED OWN KEY
  469. ```
  470. ##### myself(Identity⇕ identity)
  471. ensures that the own identity is being complete
  472. ```
  473. parameters:
  474. identity (inout) identity of local user. At least .address, .username, .user_id must be set.
  475. return value:
  476. PEP_STATUS_OK if identity could be completed or was already complete, any other value on error
  477. caveat:
  478. This function generates a keypair on demand; because it's synchronous
  479. it can need a decent amount of time to return.
  480. If you need to do this asynchronous, you need to return an identity
  481. with retrieve_next_identity() where pEp_identity.me is true.
  482. ```
  483. ##### update_identity(Identity⇕)
  484. update identity information
  485. ```
  486. parameters:
  487. identity (inout) identity information of communication partner
  488. (identity->fpr is OUT ONLY)
  489. return value:
  490. PEP_STATUS_OK if identity could be updated,
  491. PEP_GET_KEY_FAILED for own identity that must be completed (myself())
  492. any other value on error
  493. caveat:
  494. if this function returns PEP_ct_unknown or PEP_ct_key_expired in
  495. identity->comm_type, the caller must insert the identity into the
  496. asynchronous management implementation, so retrieve_next_identity()
  497. will return this identity later
  498. at least identity->address must be a non-empty UTF-8 string as input
  499. update_identity() never writes flags; use set_identity_flags() for
  500. writing
  501. this function NEVER reads the incoming fpr, only writes to it.
  502. ```
  503. ##### trust_personal_key(Identity)
  504. mark a key as trusted with a person
  505. ```
  506. parameters:
  507. ident (in) person and key to trust in
  508. caveat:
  509. the fields user_id, address and fpr must be supplied
  510. ```
  511. ##### key_mistrusted(Identity)
  512. mark key as being compromized
  513. ```
  514. parameters:
  515. ident (in) person and key which was compromized
  516. ```
  517. ##### key_reset_trust(Identity)
  518. undo trust_personal_key and key_mistrusted() for keys we don't own
  519. ```
  520. parameters:
  521. ident (in) person and key which was compromized
  522. ```
  523. ##### least_trust(String fpr, PEP_comm_type⇑ comm_type)
  524. get the least known trust level for a key in the database
  525. ```
  526. parameters:
  527. fpr (in) fingerprint of key to check
  528. comm_type (out) least comm_type as result (out)
  529. ```
  530. If the trust level cannot be determined comm_type is set to PEP_ct_unknown.
  531. ##### get_key_rating(String fpr, PEP_comm_type⇑ comm_type)
  532. get the rating a bare key has
  533. ```
  534. parameters:
  535. fpr (in) unique identifyer for key as UTF-8 string
  536. comm_type (out) key rating
  537. ```
  538. Iif an error occurs, *comm_type is set to PEP_ct_unknown and an error is returned
  539. ##### renew_key(String fpr, Timestamp ts)
  540. renew an expired key
  541. ```
  542. parameters:
  543. fpr (in) ID of key to renew as UTF-8 string
  544. ts (in) timestamp when key should expire or NULL for default
  545. ```
  546. ##### revoke(String fpr, String reason)
  547. revoke a key
  548. ```
  549. parameters:
  550. fpr (in) ID of key to revoke as UTF-8 string
  551. reason (in) text with reason for revoke as UTF-8 string
  552. or NULL if reason unknown
  553. caveat:
  554. reason text must not include empty lines
  555. this function is meant for internal use only; better use
  556. key_mistrusted() of keymanagement API
  557. ```
  558. ##### key_expired(String fpr, Integer when, Bool⇑ expired)
  559. flags if a key is already expired
  560. ```
  561. parameters:
  562. fpr (in) ID of key to check as UTF-8 string
  563. when (in) UTC time of when should expiry be considered
  564. expired (out) flag if key expired
  565. ```
  566. #### from blacklist.h & OpenPGP_compat.h ####
  567. ##### blacklist_add(String fpr)
  568. add to blacklist
  569. * parameters: fpr (in) fingerprint of key to blacklist
  570. ##### blacklist_delete(String fpr)
  571. delete from blacklist
  572. * parameters: fpr (in) fingerprint of key to blacklist
  573. ##### blacklist_is_listed(String fpr, Bool⇑ listed)
  574. is_listed in blacklist
  575. ```
  576. parameters:
  577. session (in) session to use
  578. fpr (in) fingerprint of key to blacklist
  579. listted (out)
  580. ```
  581. ##### blacklist_retrieve(StringList⇑ blacklist)
  582. retrieve full blacklist of key fingerprints
  583. * parameters: blacklist (out) copy of blacklist
  584. ##### OpenPGP_list_keyinfo(String search_pattern, StringPairList⇑ keyinfo_list)
  585. get a key/UID list for pattern matches in keyring ("" to return entire keyring), filtering out revoked keys in the results
  586. ```
  587. parameters:
  588. search_pattern (in) search pattern - either an fpr, or something within the UID, or "" for all keys
  589. keyinfo_list (out) a key/value pair list for each key / UID combination
  590. ```
  591. #### Event Listener & Results ####
  592. ##### registerEventListener(String address, Integer port, String security_context)
  593. Register an address/port pair where a JSON-RPC call shall be made to, when the Engine wants to call the client application.
  594. These RPC calls are authenticated with a security_context parameter that is given to all calls (and can be different from the security_context
  595. that is used for calls from the client to the JSON Server Adapter).
  596. Currently there are two functions that can be called:
  597. * messageToSend( Message )
  598. * notifyHandshake( Identity self, Identity partner, sync_handshake_signal sig )
  599. ##### unregisterEventListener(String address, Integer port, String security_context)
  600. Unregister a previous registered JSON-RPC listener.
  601. ##### deliverHandshakeResult(Identity partner, PEP_sync_handshake_result result)
  602. give the result of the handshake dialog back to the Engine
  603. ```
  604. parameters:
  605. partner (in) the parther of the handshake
  606. result (in) handshake result
  607. ```
  608. #### Other ####
  609. ##### serverVersion()
  610. Returns a struct with SemVer-compatible ABI version, the codename of the
  611. JSON Adapter version etc.
  612. ##### version()
  613. Returns a codename for the current JSON Server Adapter's version.
  614. ##### getGpgEnvironment()
  615. Returns a struct holding 3 members
  616. * gnupg_path
  617. * gnupg_home environment variable, if set
  618. * gpg_agent_info environment variable, if set.
  619. ##### shutdown()
  620. shutdown the JSON Adapter