8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / gss_mechs / mech_dh / backend / mech / crypto.h
blob5772adbbe8fd13d9244771d5815e215b1b48c5dc
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * crypto.h
25 * Copyright (c) 1997, by Sun Microsystems, Inc.
26 * All rights reserved.
30 #ifndef _CRYPTO_H_
31 #define _CRYPTO_H_
33 #pragma ident "%Z%%M% %I% %E% SMI"
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 #include <rpc/des_crypt.h>
40 #include <dh_gssapi.h>
41 #include <dhmech_prot.h>
42 #include "../crypto/md5.h"
44 typedef enum { ENCIPHER, DECIPHER } cipher_mode_t;
46 typedef OM_uint32 (*cipher_proc)(gss_buffer_t buf,
47 dh_key_set_t keys, cipher_mode_t mode);
48 typedef OM_uint32 (*verifier_proc)(gss_buffer_t tok, gss_buffer_t msg,
49 cipher_proc signer, dh_key_set_t keys, dh_signature_t signature);
51 /* Proto types */
53 void
54 __dh_release_buffer(gss_buffer_t b);
56 bool_t
57 __dh_is_valid_QOP(dh_qop_t qop);
59 OM_uint32
60 __QOPSeal(dh_qop_t qop, gss_buffer_t input, int conf_req,
61 dh_key_set_t keys, gss_buffer_t output, int *conf_ret);
63 OM_uint32
64 __QOPUnSeal(dh_qop_t qop, gss_buffer_t input, int conf_req,
65 dh_key_set_t keys, gss_buffer_t output);
67 bool_t
68 __cmpsig(dh_signature_t, dh_signature_t);
70 OM_uint32
71 __verify_sig(dh_token_t, dh_qop_t, dh_key_set_t, dh_signature_t);
73 OM_uint32
74 __get_sig_size(dh_qop_t, unsigned int *);
76 OM_uint32
77 __mk_sig(dh_qop_t, char *, long, gss_buffer_t, dh_key_set_t, dh_signature_t);
79 OM_uint32
80 __alloc_sig(dh_qop_t, dh_signature_t);
82 bool_t
83 __dh_is_valid_QOP(dh_qop_t);
85 void
86 __free_signature(dh_signature_t);
88 #ifdef __cplusplus
90 #endif
92 #endif /* _CRYPTO_H_ */