Class: PacketGen::Plugin::GSSAPI
- Inherits:
-
RASN1::Model
- Object
- RASN1::Model
- PacketGen::Plugin::GSSAPI
- Includes:
- Types::Fieldable
- Defined in:
- lib/packetgen/plugin/gssapi.rb
Overview
GSS API, from RFC 4178
GSSAPI ::= CHOICE {
init InitialContextToken,
token_resp NegTokenResp
}
InitialContextToken ::= [APPLICATION 0] IMPLICIT SEQUENCE {
oid OBJECT IDENTIFIER,
token_init NegTokenInit
}
NegTokenInit ::= [0] EXPLICIT SEQUENCE {
mechTypes [0] MechTypeList,
reqFlags [1] BIT STRING OPTIONAL, -- No more used
mechToken [2] OCTET STRING OPTIONAL,
mechListMIC [3] OCTET STRING OPTIONAL,
}
NegTokenResp ::= [1] EXPLICIT SEQUENCE {
negState [0] ENUMERATED {
accept-completed (0),
accept-incomplete (1),
reject (2),
request-mic (3)
} OPTIONAL,
supportedMech [1] MechType OPTIONAL,
responseToken [2] OCTET STRING OPTIONAL,
mechListMIC [3] OCTET STRING OPTIONAL,
}
Defined Under Namespace
Classes: NegTokenInit, NegTokenInitEnvelop, NegTokenResp
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ GSSAPI
constructor
A new instance of GSSAPI.
-
#read(str) ⇒ self
Populate Object from
str
. - #to_human ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ GSSAPI
Returns a new instance of GSSAPI.
112 113 114 115 116 |
# File 'lib/packetgen/plugin/gssapi.rb', line 112 def initialize(args={}) token = args.delete(:token) super self[:gssapi].chosen = token == :init ? 0 : 1 end |
Instance Method Details
#read(str) ⇒ self
Populate Object from str
121 122 123 124 125 126 |
# File 'lib/packetgen/plugin/gssapi.rb', line 121 def read(str) return self if str.nil? parse!(str, ber: true) self end |
#to_human ⇒ Object
128 129 130 |
# File 'lib/packetgen/plugin/gssapi.rb', line 128 def to_human inspect end |