Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/krb5/src/appl/gss-sample/gss-misc.h
34907 views
1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
/*
3
* Copyright 1994 by OpenVision Technologies, Inc.
4
*
5
* Permission to use, copy, modify, distribute, and sell this software
6
* and its documentation for any purpose is hereby granted without fee,
7
* provided that the above copyright notice appears in all copies and
8
* that both that copyright notice and this permission notice appear in
9
* supporting documentation, and that the name of OpenVision not be used
10
* in advertising or publicity pertaining to distribution of the software
11
* without specific, written prior permission. OpenVision makes no
12
* representations about the suitability of this software for any
13
* purpose. It is provided "as is" without express or implied warranty.
14
*
15
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
19
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
* PERFORMANCE OF THIS SOFTWARE.
22
*/
23
24
/*
25
* $Id$
26
*/
27
28
#ifndef _GSSMISC_H_
29
#define _GSSMISC_H_
30
31
#include <gssapi/gssapi_generic.h>
32
#include <stdio.h>
33
34
extern FILE *display_file;
35
36
int send_token(int s, int flags, gss_buffer_t tok);
37
int recv_token(int s, int *flags, gss_buffer_t tok);
38
void display_status(char *msg, OM_uint32 maj_stat, OM_uint32 min_stat);
39
void display_ctx_flags(OM_uint32 flags);
40
void print_token(gss_buffer_t tok);
41
42
/* Token types */
43
#define TOKEN_NOOP (1<<0)
44
#define TOKEN_CONTEXT (1<<1)
45
#define TOKEN_DATA (1<<2)
46
#define TOKEN_MIC (1<<3)
47
48
/* Token flags */
49
#define TOKEN_CONTEXT_NEXT (1<<4)
50
#define TOKEN_WRAPPED (1<<5)
51
#define TOKEN_ENCRYPTED (1<<6)
52
#define TOKEN_SEND_MIC (1<<7)
53
54
extern gss_buffer_t empty_token;
55
56
#endif
57
58