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]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #include <netinet/in.h> /* struct sockaddr_in */
29 #include <sys/types.h>
30 #include <sys/socket.h>
32 #include <inet/kssl/kssl.h>
36 usage_delete(boolean_t do_print
)
39 (void) fprintf(stderr
, "Usage:\n");
40 (void) fprintf(stderr
,
41 "kssladm delete [-v] [<server_address>] <server_port>\n");
45 do_delete(int argc
, char *argv
[])
47 struct sockaddr_in6 server_addr
;
59 while ((c
= getopt(argc
, argv
, "v")) != -1) {
73 } else if (pcnt
== 2) {
75 port
= argv
[optind
+ 1];
78 if (parse_and_set_addr(addr
, port
, &server_addr
) < 0) {
82 if (kssl_send_command((char *)&server_addr
, KSSL_DELETE_ENTRY
) < 0) {
83 perror("Error deleting entry");
88 (void) printf("Successfully loaded cert and key\n");
94 return (SMF_EXIT_ERR_CONFIG
);