elfsign.h revision 4ff712c4da439d87cb85663f70011c823faa18c2
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_CRYPTO_ELFSIGN_H
#define _SYS_CRYPTO_ELFSIGN_H
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
/*
* Project Private structures and types used for communication between kcfd
* and KCF over the door.
*/
typedef enum ELFsign_status_e {
/* Version values for da_version in kcf_door_args_t */
#define KCF_KCFD_VERSION1 1
#define KCFD_FIPS140_INTCHECK 2
#define SIG_MAX_LENGTH 1024
#define ELF_SIGNATURE_SECTION ".SUNW_signature"
typedef struct kcf_door_arg_s {
short da_version;
union {
struct kcf_door_result_s { /* For response */
} result;
} da_u;
typedef uint32_t filesig_vers_t;
/*
* File Signature Structure
* Applicable to ELF and other file formats
*/
struct filesignatures {
union {
char filesig_data[1];
struct filesig { /* one of these for each signature */
union {
struct filesig_version1 {
char filesig_v1_data[1];
} filesig_v1;
struct filesig_version3 {
char filesig_v3_data[1];
} filesig_v3;
} _u2;
} filesig_sig;
} _u1;
};
(-sizeof (uint64_t)))
#define FILESIG_UNKNOWN 0 /* unrecognized version */
#ifndef _KERNEL
#define _PATH_KCFD_DOOR "/etc/svc/volatile/kcfd_door"
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CRYPTO_ELFSIGN_H */