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
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]
25 * Copyright (c) 1997, by Sun Microsystems, Inc.
26 * All rights reserved.
33 #pragma ident "%Z%%M% %I% %E% SMI"
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
);
54 __dh_release_buffer(gss_buffer_t b
);
57 __dh_is_valid_QOP(dh_qop_t qop
);
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
);
64 __QOPUnSeal(dh_qop_t qop
, gss_buffer_t input
, int conf_req
,
65 dh_key_set_t keys
, gss_buffer_t output
);
68 __cmpsig(dh_signature_t
, dh_signature_t
);
71 __verify_sig(dh_token_t
, dh_qop_t
, dh_key_set_t
, dh_signature_t
);
74 __get_sig_size(dh_qop_t
, unsigned int *);
77 __mk_sig(dh_qop_t
, char *, long, gss_buffer_t
, dh_key_set_t
, dh_signature_t
);
80 __alloc_sig(dh_qop_t
, dh_signature_t
);
83 __dh_is_valid_QOP(dh_qop_t
);
86 __free_signature(dh_signature_t
);
92 #endif /* _CRYPTO_H_ */