diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-18 09:58:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-18 09:58:13 +0000 |
commit | 3e93f717e8dc916ce44f2e5b5f643259a716f68f (patch) | |
tree | 0ab9cafa945f76738fe1c1cc5ac1c0bcc0d4b716 /sys/crypto | |
parent | 906979d106be653cd0c2ceec860f1e3fd621190b (diff) |
export struct fcrypt to userland
Diffstat (limited to 'sys/crypto')
-rw-r--r-- | sys/crypto/cryptodev.c | 30 | ||||
-rw-r--r-- | sys/crypto/cryptodev.h | 32 |
2 files changed, 32 insertions, 30 deletions
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c index 070203f4004..5691f176da6 100644 --- a/sys/crypto/cryptodev.c +++ b/sys/crypto/cryptodev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptodev.c,v 1.42 2002/05/08 22:04:38 jason Exp $ */ +/* $OpenBSD: cryptodev.c,v 1.43 2002/05/18 09:58:12 deraadt Exp $ */ /* * Copyright (c) 2001 Theo de Raadt @@ -52,34 +52,6 @@ #include <crypto/cryptodev.h> #include <crypto/xform.h> -struct csession { - TAILQ_ENTRY(csession) next; - u_int64_t sid; - u_int32_t ses; - - u_int32_t cipher; - struct enc_xform *txform; - u_int32_t mac; - struct auth_hash *thash; - - caddr_t key; - int keylen; - u_char tmp_iv[EALG_MAX_BLOCK_LEN]; - - caddr_t mackey; - int mackeylen; - u_char tmp_mac[CRYPTO_MAX_MAC_LEN]; - - struct iovec iovec[IOV_MAX]; - struct uio uio; - int error; -}; - -struct fcrypt { - TAILQ_HEAD(csessionlist, csession) csessions; - int sesn; -}; - void cryptoattach(int); int cryptoopen(dev_t, int, int, struct proc *); diff --git a/sys/crypto/cryptodev.h b/sys/crypto/cryptodev.h index 0f3081614dd..7456c7dce81 100644 --- a/sys/crypto/cryptodev.h +++ b/sys/crypto/cryptodev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptodev.h,v 1.27 2002/04/24 23:24:32 deraadt Exp $ */ +/* $OpenBSD: cryptodev.h,v 1.28 2002/05/18 09:58:12 deraadt Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) @@ -282,6 +282,29 @@ struct crypt_op { #define CRSFEAT_DH 0x00000004 /* supports all basic DH ops */ #ifdef _KERNEL +struct csession { + TAILQ_ENTRY(csession) next; + u_int64_t sid; + u_int32_t ses; + + u_int32_t cipher; + struct enc_xform *txform; + u_int32_t mac; + struct auth_hash *thash; + + caddr_t key; + int keylen; + u_char tmp_iv[EALG_MAX_BLOCK_LEN]; + + caddr_t mackey; + int mackeylen; + u_char tmp_mac[CRYPTO_MAX_MAC_LEN]; + + struct iovec iovec[IOV_MAX]; + struct uio uio; + int error; +}; + int crypto_newsession(u_int64_t *, struct cryptoini *, int); int crypto_freesession(u_int64_t); int crypto_dispatch(struct cryptop *); @@ -309,4 +332,11 @@ int cuio_apply(struct uio *, int, int, struct cryptop *crypto_getreq(int); void crypto_freereq(struct cryptop *); #endif /* _KERNEL */ + +struct csession; +struct fcrypt { + TAILQ_HEAD(csessionlist, csession) csessions; + int sesn; +}; + #endif /* _CRYPTO_CRYPTO_H_ */ |