Edge RPC API. More...
#include "jsonrpc/jsonrpc.h"#include "common/pt_api_error_codes.h"#include "edge-core/server.h"#include "est_defs.h"#include "certificate-enrollment-client/ce_status.h"#include "certificate-enrollment-client/ce_defs.h"Go to the source code of this file.
| typedef struct edgeclient_request_context | edgeclient_request_context_t |
| The edgeclient request context data. | |
| void | init_protocol () |
| Initialize Edge RPC API. | |
| int | protocol_translator_register (json_t *request, json_t *json_params, json_t **result, void *userdata) |
| Register the protocol translator to Edge. More... | |
| int | device_register (json_t *request, json_t *json_params, json_t **result, void *userdata) |
| Register an endpoint device to Edge. More... | |
| int | device_unregister (json_t *request, json_t *json_params, json_t **result, void *userdata) |
| Unregister an endpoint device from Edge. More... | |
| int | write_value (json_t *request, json_t *json_params, json_t **result, void *userdata) |
| Write endpoint device values. More... | |
| int | certificate_renewal_list_set (json_t *request, json_t *json_params, json_t **result, void *userdata) |
| Set list of certificates to receive renewal status updates for. More... | |
| int | renew_certificate (json_t *request, json_t *json_params, json_t **result, void *userdata) |
| Initiate certificate renewal operation for a certificate. More... | |
| int | est_request_enrollment (json_t *request, json_t *json_params, json_t **result, void *userdata) |
| Requests an EST enrollment for a certificate. More... | |
| int | write_to_pt (edgeclient_request_context_t *ctx, void *userdata) |
| Writes the updated values to the protocol translator. More... | |
| int | certificate_renewal_notifier (const char *certificate_name, ce_status_e status, ce_initiator_e initiator, void *ctx) |
| Writes the certificate renewal status to the protocol translator. More... | |
| int | est_enrollment_result_notifier (est_enrollment_result_e result, struct cert_chain_context_s *cert_chain, void *ctx) |
| Sends the EST enrollment result to the protocol translator. More... | |
Edge RPC API.
Definition of the Edge RPC API.
RPC API provides functions to:
| int certificate_renewal_list_set | ( | json_t * | request, |
| json_t * | json_params, | ||
| json_t ** | result, | ||
| void * | userdata | ||
| ) |
Set list of certificates to receive renewal status updates for.
| request | The jsonrpc request. |
| json_params | The parameter portion of the jsonrpc request. |
| result | The jsonrpc result object to fill. |
| userdata | The user-supplied context data pointer. |
| int certificate_renewal_notifier | ( | const char * | certificate_name, |
| ce_status_e | status, | ||
| ce_initiator_e | initiator, | ||
| void * | ctx | ||
| ) |
Writes the certificate renewal status to the protocol translator.
| certificate_name | Name of certificate whose renewal process finished. |
| status | Status of the finished renewal process. |
| initiator | Initiator of the renewal process. 0 for PT initiated renew 1 for cloud initiated renew |
| ctx | Context pointer passed from server when initializing the client. |
| int device_register | ( | json_t * | request, |
| json_t * | json_params, | ||
| json_t ** | result, | ||
| void * | userdata | ||
| ) |
Register an endpoint device to Edge.
| request | The jsonrpc request. |
| json_params | The parameter portion of the jsonrpc request. |
| result | The jsonrpc result object to fill. |
| userdata | The user-supplied context data pointer. |
| int device_unregister | ( | json_t * | request, |
| json_t * | json_params, | ||
| json_t ** | result, | ||
| void * | userdata | ||
| ) |
Unregister an endpoint device from Edge.
| request | The jsonrpc request. |
| json_params | The parameter portion of the jsonrpc request. |
| result | The jsonrpc result object to fill. |
| userdata | The user-supplied context data pointer. |
| int est_enrollment_result_notifier | ( | est_enrollment_result_e | result, |
| struct cert_chain_context_s * | cert_chain, | ||
| void * | ctx | ||
| ) |
Sends the EST enrollment result to the protocol translator.
| result | Result of the finished EST enrollment process. |
| cert_chain | Structure containing the enrolled certificate or certificates. |
| ctx | Context pointer passed from server when initializing the client. |
| int est_request_enrollment | ( | json_t * | request, |
| json_t * | json_params, | ||
| json_t ** | result, | ||
| void * | userdata | ||
| ) |
Requests an EST enrollment for a certificate.
| request | The jsonrpc request. |
| json_params | The parameter portion of the jsonrpc request. |
| result | The jsonrpc result object to fill. |
| int protocol_translator_register | ( | json_t * | request, |
| json_t * | json_params, | ||
| json_t ** | result, | ||
| void * | userdata | ||
| ) |
Register the protocol translator to Edge.
| request | The jsonrpc request. |
| json_params | The parameter portion of the jsonrpc request. |
| result | The jsonrpc result object to fill. |
| userdata | The user-supplied context data pointer. |
| int renew_certificate | ( | json_t * | request, |
| json_t * | json_params, | ||
| json_t ** | result, | ||
| void * | userdata | ||
| ) |
Initiate certificate renewal operation for a certificate.
| request | The jsonrpc request. |
| json_params | The parameter portion of the jsonrpc request. |
| result | The jsonrpc result object to fill. |
| userdata | The user-supplied context data pointer. |
| int write_to_pt | ( | edgeclient_request_context_t * | ctx, |
| void * | userdata | ||
| ) |
Writes the updated values to the protocol translator.
| ctx | The user-supplied write context. |
| userdata | The user-supplied data. |
| int write_value | ( | json_t * | request, |
| json_t * | json_params, | ||
| json_t ** | result, | ||
| void * | userdata | ||
| ) |
Write endpoint device values.
| request | The jsonrpc request. |
| json_params | The parameter portion of the jsonrpc request. |
| result | The jsonrpc result object to fill. |
| userdata | The user-supplied context data pointer. |