/*
* 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
*/
/*
*/
#ifndef _INET_KSSL_KSSLPROTO_H
#define _INET_KSSL_KSSLPROTO_H
#ifdef __cplusplus
extern "C" {
#endif
#define KSSL_READ 0
#define KSSL_ENCRYPT 0
#define MSG_INIT 0
/*
* More than enough for the cipher suite that needs the
* largest key material (AES_256_CBC_SHA needs 136 bytes).
*/
/*
* The following constants try to insure an input buffer is optimally aligned
* 64byte input block to avoid a copy. Our goal is to reach 4 byte alignment
* starting form the 3rd MAC block (input buffer starts in the 3rd block). The
* 3rd block includes the first 53 (MD5 SSL3 MAC) or 57 (SHA1 SSL3 MAC) bytes
* of the input buffer. This means input buffer should start at offset 3
* within a 4 byte word so that its next block is 4 byte aligned. Since the
* SSL3 record header is 5 bytes long it should start at at offset 2 within a
* 4 byte word. To insure the next record (for buffers that don't fit into 1
* SSL3 record) also starts at offset 2 within a 4 byte word the previous
* record length should be 3 mod 8 since 5 + 3 mod 8 is 0 i.e. the next record
* starts at the same offset within a 4 byte word as the the previous record.
*/
/* session state */
typedef struct sslSessionIDStr {
} sslSessionID;
/* An element of the session cache */
typedef struct kssl_sid_ent {
typedef enum {
typedef enum {
hello_request = 0,
typedef struct SSL3HandshakeMsgStr {
int state;
int msglen;
int msglen_bytes;
typedef struct KSSLJOBStr {
char *buf;
int status;
} KSSLJOB;
typedef struct {
} SSL3Hashes;
typedef enum {
close_notify = 0,
typedef enum {
typedef enum {
wait_client_hello = 0,
typedef enum {
} SSL3Sender;
typedef enum {
mac_md5 = 0,
/* The SSL bulk cipher definition */
typedef enum {
cipher_null = 0,
typedef struct ssl3CipherSuiteDefStr {
int keyblksz;
typedef void (*hashinit_func_t)(void *);
typedef struct KSSLMACDefStr {
int hashsz;
int padsz;
} KSSLMACDef;
typedef struct KSSLCipherDefStr {
int bsize;
int keysz;
typedef union KSSL_HASHCTXUnion {
} KSSL_HASHCTX;
typedef struct KSSLCipherSpecStr {
int mac_hashsz;
int mac_padsz;
void (*MAC_HashInit)(void *);
int cipher_bsize;
int cipher_keysz;
/*
* SSL connection state. This one hangs off of a ksslf_t structure.
*/
typedef struct ssl_s {
void *cke_callback_arg;
int pending_keyblksz;
int sslcnt;
} ssl_t;
extern int kssl_spec_init(ssl_t *, int);
#ifdef __cplusplus
}
#endif
#endif /* _INET_KSSL_KSSLPROTO_H */