ksslimpl.h revision 847061414af83968a5942c9af9d73f6a44e43402
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _INET_KSSL_KSSLIMPL_H
#define _INET_KSSL_KSSLIMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Certificate structure. The msg field is the BER data of the
* certificate.
*/
typedef struct Certificate {
int len;
/* Generic linked chain type */
typedef struct kssl_chain_s {
struct kssl_chain_s *next;
void *item;
} kssl_chain_t;
/* Proxies chain. follows the generic kssl_chain_t layout */
typedef struct kssl_proxy_s {
struct kssl_proxy_s *next;
void *proxy_bound;
} kssl_proxy_t;
/* Fallback endpoints chain. Ditto. */
typedef struct kssl_fallback_s {
struct kssl_fallback_s *next;
void *fallback_bound;
/*
* Structure to support using a non-extractable key in
* a crypto provider. We keep the token label and pin so
* that we can reauthenticate when needed.
*/
typedef struct kssl_session_info_s {
char toklabel[CRYPTO_EXT_SIZE_LABEL];
int pinlen;
char tokpin[1];
/* kssl_entry_t structure. */
typedef struct kssl_entry_s {
} kssl_entry_t;
typedef struct mech_to_cipher_s {
char *name;
#define KSSL_ENTRY_REFHOLD(kssl_entry) { \
}
#define KSSL_ENTRY_REFRELE(kssl_entry) { \
membar_exit(); \
kssl_free_entry((kssl_entry)); \
} \
}
#define KSSL_SSL_REFHOLD(ssl) { \
}
#define KSSL_SSL_REFRELE(ssl) { \
membar_exit(); \
kssl_free_context((ssl)); \
} \
}
} else { \
}
extern crypto_mechanism_t rsa_x509_mech;
extern crypto_mechanism_t hmac_md5_mech;
extern crypto_mechanism_t hmac_sha1_mech;
extern crypto_call_flag_t kssl_call_flag;
extern KSSLCipherDef cipher_defs[];
extern int kssl_enabled;
extern int kssl_cache_count;
extern struct kmem_cache *kssl_cache;
#define KSSL_TAB_INITSIZE 4
extern kssl_entry_t **kssl_entry_tab;
extern int kssl_entry_tab_size;
extern int kssl_entry_tab_nentries;
extern kmutex_t kssl_tab_mutex;
typedef struct kssl_stats {
} kssl_stats_t;
extern kssl_stats_t *kssl_statp;
#define IS_SSL_PORT 1
#define IS_PROXY_PORT 2
extern void kssl_free_entry(kssl_entry_t *);
extern void kssl_free_context(ssl_t *);
kssl_callback_t, void *);
extern int kssl_get_obj_handle(kssl_entry_t *);
extern void kssl_prov_evnt(uint32_t, void *);
#ifdef __cplusplus
}
#endif
#endif /* _INET_KSSL_KSSLIMPL_H */