Virgil IoT KIT
Functions
prvs-server.h File Reference

PRVS for server. More...

#include <virgil/iot/protocols/snap/snap-structs.h>
#include <virgil/iot/protocols/snap/prvs/prvs-structs.h>
#include <virgil/iot/provision/provision.h>
#include <virgil/iot/secmodule/secmodule.h>

Go to the source code of this file.

Functions

const vs_snap_service_tvs_snap_prvs_server (vs_secmodule_impl_t *secmodule)
 PRVS Server SNAP Service implementation. More...
 

Detailed Description

PRVS for server.

PRVS is the provision service. PRVS Server is a device, PRVS Client is the factory server with factory initializer utility. Client prepares device's card, server signs it, and client saves this information.

PRVS Server usage

For server it is enough to prepare security module and pass it to the vs_snap_prvs_server initializer :

vs_secmodule_impl_t *secmodule_impl; // Security module implementation
vs_storage_op_ctx_t slots_storage_impl; // Slots storage implementation
const vs_snap_service_t *snap_prvs_server; // PRVS Server
// Initialize slots_storage_impl, secmodule_impl.
// You can use software implementation :
secmodule_impl = vs_soft_secmodule_impl(&slots_storage_impl);
snap_prvs_server = vs_snap_prvs_server(secmodule_impl);
STATUS_CHECK(vs_snap_register_service(snap_prvs_server), "Cannot register PRVS service");

Virgil IoT KIT manages PRVS Server service automatically by using Provision module.

Function Documentation

◆ vs_snap_prvs_server()

const vs_snap_service_t* vs_snap_prvs_server ( vs_secmodule_impl_t secmodule)

PRVS Server SNAP Service implementation.

This call returns PRVS Server implementation. It must be called before any PRVS call.

Parameters
[in]implCallback functions. Must not be NULL.
Returns
vs_snap_service_t SNAP service description. Use this pointer to call vs_snap_register_service.
vs_secmodule_impl_t
Security Module implementation.
Definition: secmodule.h:458
STATUS_CHECK
#define STATUS_CHECK(OPERATION, MESSAGE,...)
Status code check and perform goto terminate if non-successful.
Definition: status_code.h:145
vs_snap_service_t
SNAP service descriptor.
Definition: snap-structs.h:312
vs_snap_prvs_server
const vs_snap_service_t * vs_snap_prvs_server(vs_secmodule_impl_t *secmodule)
PRVS Server SNAP Service implementation.
vs_soft_secmodule_impl
vs_secmodule_impl_t * vs_soft_secmodule_impl(vs_storage_op_ctx_t *slots_storage_impl)
Initialize software crypto implementation.
vs_storage_op_ctx_t
Storage element context.
Definition: storage_hal.h:221
vs_snap_register_service
vs_status_e vs_snap_register_service(const vs_snap_service_t *service)
Register SNAP service.