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]
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
31 * Common routines and variables used by kssladm files.
38 #include <netinet/in.h>
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>")); \
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
);
77 #endif /* _KSSLADM_H */