Lines Matching +full:pin +full:- +full:count
2 * Copyright (c) 2018-2022 Yubico AB. All rights reserved.
3 * Use of this source code is governed by a BSD-style
5 * SPDX-License-Identifier: BSD-2-Clause
30 #include "../openbsd-compat/openbsd-compat.h"
32 #include "../openbsd-compat/posix_win.h"
40 char *pin; in get_pin() local
42 int r, ok = -1; in get_pin()
44 if ((pin = calloc(1, PINBUF_LEN)) == NULL) { in get_pin()
48 if ((r = snprintf(prompt, sizeof(prompt), "Enter PIN for %s: ", in get_pin()
53 if (!readpassphrase(prompt, pin, PINBUF_LEN, RPP_ECHO_OFF)) { in get_pin()
61 freezero(pin, PINBUF_LEN); in get_pin()
62 pin = NULL; in get_pin()
65 return pin; in get_pin()
74 if (file == NULL || strcmp(file, "-") == 0) in open_write()
90 if (file == NULL || strcmp(file, "-") == 0) { in open_read()
112 return (-1); in base10()
114 return (-1); in base10()
116 return (-1); in base10()
118 return (-1); in base10()
124 xxd(const void *buf, size_t count) in xxd() argument
131 for (i = 0; i < count; i++) { in xxd()
133 if ((i + 1) % 16 == 0 && i + 1 < count) in xxd()
153 return (-1); in string_read()
156 line[n - 1] = '\0'; /* trim \n */ in string_read()
184 int r, ok = -1; in get_devopt()
202 *val = -1; in get_devopt()
253 int ok = -1; in write_es256_pubkey()
291 int ok = -1; in write_es384_pubkey()
361 int ok = -1; in write_rsa_pubkey()
423 int ok = -1; in write_eddsa_pubkey()
505 return (-1); in cose_type()
546 int fd, ok = -1; in read_file()
581 if (fd != -1) { in read_file()
596 int fd, ok = -1; in write_file()
614 if (fd != -1) { in write_file()