common.h revision 49e212991a3065f7e499a4b29ae8d8eaf33f3135
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _PKTOOL_COMMON_H
#define _PKTOOL_COMMON_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This file contains data and functions shared between all the
* modules that comprise this tool.
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <cryptoutil.h>
#include <biginteger.h>
/* I18N helpers. */
#include <libintl.h>
#include <locale.h>
/* Defines used throughout */
/* Error codes */
#define PK_ERR_NONE 0
#define PK_ERR_USAGE 1
#define PK_ERR_QUIT 2
#define PK_ERR_PK11 3
#define PK_ERR_SYSTEM 4
#define PK_ERR_OPENSSL 5
/* Types of objects for searches. */
#define PK_PRIVATE_OBJ 0x0001
#define PK_PUBLIC_OBJ 0x0002
#define PK_CERT_OBJ 0x0010
#define PK_PRIKEY_OBJ 0x0020
#define PK_PUBKEY_OBJ 0x0040
#define PK_SECKEY_OBJ 0x0080
/* Constants for attribute templates. */
/* Common functions. */
char **buf);
char *buf);
extern char *optarg_av;
extern int optind_av;
#ifdef __cplusplus
}
#endif
#endif /* _PKTOOL_COMMON_H */