xref: /titanic_53/usr/src/cmd/svr4pkg/pkgadm/pkgadm.h (revision 5c51f1241dbbdf2656d0e10011981411ed0c9673)
1*5c51f124SMoriah Waterland /*
2*5c51f124SMoriah Waterland  * CDDL HEADER START
3*5c51f124SMoriah Waterland  *
4*5c51f124SMoriah Waterland  * The contents of this file are subject to the terms of the
5*5c51f124SMoriah Waterland  * Common Development and Distribution License (the "License").
6*5c51f124SMoriah Waterland  * You may not use this file except in compliance with the License.
7*5c51f124SMoriah Waterland  *
8*5c51f124SMoriah Waterland  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*5c51f124SMoriah Waterland  * or http://www.opensolaris.org/os/licensing.
10*5c51f124SMoriah Waterland  * See the License for the specific language governing permissions
11*5c51f124SMoriah Waterland  * and limitations under the License.
12*5c51f124SMoriah Waterland  *
13*5c51f124SMoriah Waterland  * When distributing Covered Code, include this CDDL HEADER in each
14*5c51f124SMoriah Waterland  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*5c51f124SMoriah Waterland  * If applicable, add the following below this CDDL HEADER, with the
16*5c51f124SMoriah Waterland  * fields enclosed by brackets "[]" replaced with your own identifying
17*5c51f124SMoriah Waterland  * information: Portions Copyright [yyyy] [name of copyright owner]
18*5c51f124SMoriah Waterland  *
19*5c51f124SMoriah Waterland  * CDDL HEADER END
20*5c51f124SMoriah Waterland  */
21*5c51f124SMoriah Waterland 
22*5c51f124SMoriah Waterland /*
23*5c51f124SMoriah Waterland  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24*5c51f124SMoriah Waterland  * Use is subject to license terms.
25*5c51f124SMoriah Waterland  */
26*5c51f124SMoriah Waterland 
27*5c51f124SMoriah Waterland #ifndef _PKGADM_H
28*5c51f124SMoriah Waterland #define	_PKGADM_H
29*5c51f124SMoriah Waterland 
30*5c51f124SMoriah Waterland 
31*5c51f124SMoriah Waterland /*
32*5c51f124SMoriah Waterland  * Module:	patchutil.h
33*5c51f124SMoriah Waterland  * Description:	This module contains the interfaces for patchadd
34*5c51f124SMoriah Waterland  */
35*5c51f124SMoriah Waterland 
36*5c51f124SMoriah Waterland #ifdef __cplusplus
37*5c51f124SMoriah Waterland extern "C" {
38*5c51f124SMoriah Waterland #endif
39*5c51f124SMoriah Waterland 
40*5c51f124SMoriah Waterland #include <pkgerr.h>
41*5c51f124SMoriah Waterland #include <keystore.h>
42*5c51f124SMoriah Waterland #include "pkglib.h"
43*5c51f124SMoriah Waterland #include "libinst.h"
44*5c51f124SMoriah Waterland 
45*5c51f124SMoriah Waterland /* version of packaging interface */
46*5c51f124SMoriah Waterland #define	SUNW_PKGVERS	"1.0"
47*5c51f124SMoriah Waterland 
48*5c51f124SMoriah Waterland /* string comparitor abbreviators */
49*5c51f124SMoriah Waterland 
50*5c51f124SMoriah Waterland #define	ci_streq(a, b)		(strcasecmp((a), (b)) == 0)
51*5c51f124SMoriah Waterland #define	ci_strneq(a, b, c)	(strncasecmp((a), (b), (c)) == 0)
52*5c51f124SMoriah Waterland #define	streq(a, b)		(strcmp((a), (b)) == 0)
53*5c51f124SMoriah Waterland #define	strneq(a, b, c)		(strncmp((a), (b), (c)) == 0)
54*5c51f124SMoriah Waterland 
55*5c51f124SMoriah Waterland /* max l10n message length we will display */
56*5c51f124SMoriah Waterland #define	MSG_MAX			1024
57*5c51f124SMoriah Waterland 
58*5c51f124SMoriah Waterland /* main.c */
59*5c51f124SMoriah Waterland extern	void		log_msg(LogMsgType, const char *, ...);
60*5c51f124SMoriah Waterland extern	void		log_pkgerr(LogMsgType, PKG_ERR *);
61*5c51f124SMoriah Waterland extern	void		set_verbose(boolean_t);
62*5c51f124SMoriah Waterland extern	boolean_t	get_verbose(void);
63*5c51f124SMoriah Waterland /* lock.c */
64*5c51f124SMoriah Waterland extern int		admin_lock(int, char **);
65*5c51f124SMoriah Waterland /* listcert.c */
66*5c51f124SMoriah Waterland extern int		listcert(int, char **);
67*5c51f124SMoriah Waterland /* importcert.c */
68*5c51f124SMoriah Waterland extern int		addcert(int, char **);
69*5c51f124SMoriah Waterland /* removecert.c */
70*5c51f124SMoriah Waterland extern int		removecert(int, char **);
71*5c51f124SMoriah Waterland 
72*5c51f124SMoriah Waterland /* certs.c */
73*5c51f124SMoriah Waterland extern int		load_cert_and_key(PKG_ERR *, FILE *,
74*5c51f124SMoriah Waterland     keystore_encoding_format_t, char *, EVP_PKEY **, X509 **);
75*5c51f124SMoriah Waterland extern int		load_all_certs(PKG_ERR *, FILE *,
76*5c51f124SMoriah Waterland     keystore_encoding_format_t, char *, STACK_OF(X509) **);
77*5c51f124SMoriah Waterland 
78*5c51f124SMoriah Waterland #define	PKGADM_DBSTATUS_TEXT	"text"
79*5c51f124SMoriah Waterland 
80*5c51f124SMoriah Waterland #ifdef __cplusplus
81*5c51f124SMoriah Waterland }
82*5c51f124SMoriah Waterland #endif
83*5c51f124SMoriah Waterland 
84*5c51f124SMoriah Waterland #endif /* _PKGADM_H */
85