Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
yubihsm-shell.h
Go to the documentation of this file.
1/*
2 * Copyright 2015-2018 Yubico AB
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef YUBIHSM_SHELL_H
18#define YUBIHSM_SHELL_H
19
20#include <assert.h>
21
22#include <yubihsm.h>
23#include <ykyh.h>
24#include <cmdline.h>
25
26#define UNUSED(x) (void) (x)
27
37
38static const struct {
39 const char *name;
41} formats[] = {
42 {"base64", fmt_base64}, {"binary", fmt_binary}, {"hex", fmt_hex},
43 {"PEM", fmt_PEM}, {"password", fmt_password}, {"ASCII", fmt_ASCII},
44};
45
58
59int actions_run(struct gengetopt_args_info *args_info);
60int do_put_key(uint8_t *enc_key, uint8_t *mac_key, uint16_t key_id,
62
63#endif
unsigned short uint16_t
Definition stdint.h:125
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
ykyh_state * state
cmd_format in_fmt
yh_connector * connector
cmd_format out_fmt
char ** connector_list
int actions_run(struct gengetopt_args_info *args_info)
cmd_format
@ fmt_nofmt
@ fmt_ASCII
@ fmt_binary
@ fmt_PEM
@ fmt_hex
@ fmt_password
@ fmt_base64
const char * name
int do_put_key(uint8_t *enc_key, uint8_t *mac_key, uint16_t key_id, uint16_t domains, uint32_t capabilities, yh_session *ses)
cmd_format format
#define YH_MAX_SESSIONS
Max sessions the device may hold.
Definition yubihsm.h:105
yh_capabilities capabilities
uint16_t domains
uint16_t key_id
yh_session * ses