8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / cmd-inet / usr.sbin / kssl / kssladm / kssladm.h
blob2029365f563c1fafa19e00a0c467d55700e117d6
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _KSSLADM_H
28 #define _KSSLADM_H
31 * Common routines and variables used by kssladm files.
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
38 #include <netinet/in.h>
39 #include <kmfapi.h>
41 #define SUCCESS 0
42 #define FAILURE 1
43 #define ERROR_USAGE 2
45 #define MAX_CHAIN_LENGTH 12
46 #define REPORT_KMF_ERROR(r, t, e) { \
47 (void) kmf_get_kmf_error_str(r, &e); \
48 (void) fprintf(stderr, t ": %s\n", \
49 (e != NULL ? e : "<unknown error>")); \
50 if (e) free(e); \
53 #define MAX_ATTR_CNT 8
55 extern boolean_t verbose;
57 extern int do_create(int argc, char *argv[]);
58 extern int do_delete(int argc, char *argv[]);
59 extern void usage_create(boolean_t do_print);
60 extern void usage_delete(boolean_t do_print);
62 extern int PEM_get_rsa_key_certs(KMF_HANDLE_T, const char *,
63 char *, KMF_RAW_KEY_DATA **, KMF_X509_DER_CERT **);
65 extern int PKCS12_get_rsa_key_certs(KMF_HANDLE_T, const char *,
66 const char *, KMF_RAW_KEY_DATA **, KMF_X509_DER_CERT **);
68 extern int get_passphrase(const char *password_file, char *buf, int buf_size);
69 extern int kssl_send_command(char *buf, int cmd);
70 extern int parse_and_set_addr(char *arg1, char *arg2,
71 struct sockaddr_in6 *addr);
73 #ifdef __cplusplus
75 #endif
77 #endif /* _KSSLADM_H */