File: ContextFlags.go

package info (click to toggle)
golang-gopkg-jcmturner-gokrb5.v5 5.3.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, bullseye-backports, sid
  • size: 1,168 kB
  • sloc: makefile: 2
file content (36 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package gssapi

import "github.com/jcmturner/gofork/encoding/asn1"

/*
ContextFlags ::= BIT STRING {
  delegFlag       (0),
  mutualFlag      (1),
  replayFlag      (2),
  sequenceFlag    (3),
  anonFlag        (4),
  confFlag        (5),
  integFlag       (6)
} (SIZE (32))
*/

const (
	delegFlag    = 0
	mutualFlag   = 1
	replayFlag   = 2
	sequenceFlag = 3
	anonFlag     = 4
	confFlag     = 5
	integFlag    = 6
)

// ContextFlags flags for GSSAPI
type ContextFlags asn1.BitString

// NewContextFlags creates a new ContextFlags instance.
func NewContextFlags() ContextFlags {
	var c ContextFlags
	c.BitLength = 32
	c.Bytes = make([]byte, 4)
	return c
}