|
EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the crypt commands. More...
#include <libgen.h>#include "mac_mapper.h"#include "network_commands.h"#include "sqlite_macconn_writer.h"#include "supervisor.h"#include <eloop.h>#include "../ap/ap_config.h"#include "../ap/ap_service.h"#include "../capture/capture_service.h"#include "../crypt/crypt_service.h"#include "../utils/allocs.h"#include "../utils/base64.h"#include "../utils/log.h"#include "../utils/os.h"Functions | |
| int | put_crypt_cmd (struct supervisor_context *context, char *key, char *value) |
| PUT_CRYPT command. More... | |
| int | get_crypt_cmd (struct supervisor_context *context, char *key, char **value) |
| GET_CRYPT command. More... | |
| int | gen_randkey_cmd (struct supervisor_context *context, char *keyid, uint8_t size) |
| GEN_RANDKEY command. More... | |
| int | gen_privkey_cmd (struct supervisor_context *context, char *keyid, uint8_t size) |
| GEN_PRIVKEY command. More... | |
| int | gen_pubkey_cmd (struct supervisor_context *context, char *pubid, char *keyid) |
| GEN_PUBKEY command. More... | |
| int | gen_cert_cmd (struct supervisor_context *context, char *certid, char *keyid, struct certificate_meta *meta) |
| GEN_CERT command. More... | |
| char * | encrypt_blob_cmd (struct supervisor_context *context, char *keyid, char *ivid, char *blob) |
| ENCRYPT_BLOB command. More... | |
| char * | decrypt_blob_cmd (struct supervisor_context *context, char *keyid, char *ivid, char *blob) |
| DECRYPT_BLOB command. More... | |
| char * | sign_blob_cmd (struct supervisor_context *context, const char *keyid, const char *blob) |
| SIGN_BLOB command. More... | |
File containing the implementation of the crypt commands.
| char* decrypt_blob_cmd | ( | struct supervisor_context * | context, |
| char * | keyid, | ||
| char * | ivid, | ||
| char * | blob | ||
| ) |
DECRYPT_BLOB command.
| context | The supervisor structure instance |
| keyid | The private key id |
| ivid | The iv id |
| blob | The blob base64 string to decrypt |
| char* encrypt_blob_cmd | ( | struct supervisor_context * | context, |
| char * | keyid, | ||
| char * | ivid, | ||
| char * | blob | ||
| ) |
ENCRYPT_BLOB command.
| context | The supervisor structure instance |
| keyid | The private key id |
| ivid | The iv id |
| blob | The blob base64 string to encrypt |
| int gen_cert_cmd | ( | struct supervisor_context * | context, |
| char * | certid, | ||
| char * | keyid, | ||
| struct certificate_meta * | meta | ||
| ) |
GEN_CERT command.
| context | The supervisor structure instance |
| certid | The certificate id |
| keyid | The private key id |
| meta | The certificate metadata |
| int gen_privkey_cmd | ( | struct supervisor_context * | context, |
| char * | keyid, | ||
| uint8_t | size | ||
| ) |
GEN_PRIVKEY command.
| context | The supervisor structure instance |
| keyid | The key id |
| size | The key size in bytes |
| int gen_pubkey_cmd | ( | struct supervisor_context * | context, |
| char * | pubid, | ||
| char * | keyid | ||
| ) |
GEN_PUBKEY command.
| context | The supervisor structure instance |
| pubid | The public id |
| keyid | The private key id |
| int gen_randkey_cmd | ( | struct supervisor_context * | context, |
| char * | keyid, | ||
| uint8_t | size | ||
| ) |
GEN_RANDKEY command.
| context | The supervisor structure instance |
| keyid | The key id |
| size | The key size in bytes |
| int get_crypt_cmd | ( | struct supervisor_context * | context, |
| char * | key, | ||
| char ** | value | ||
| ) |
GET_CRYPT command.
Sets value to point new string containing the crypt output value. Please remember to os_free() the value when you're finished with using it.
| [in] | context | The supervisor structure instance |
| [in] | key | The crypt key |
| [out] | value | Pointer to crypt output value |
| int put_crypt_cmd | ( | struct supervisor_context * | context, |
| char * | key, | ||
| char * | value | ||
| ) |
PUT_CRYPT command.
| context | The supervisor structure instance |
| key | The crypt key |
| value | The crypt value |
| char* sign_blob_cmd | ( | struct supervisor_context * | context, |
| const char * | keyid, | ||
| const char * | blob | ||
| ) |
SIGN_BLOB command.
| context | The supervisor structure instance |
| keyid | The private key id |
| blob | The blob base64 string to sign |