2018-07-27 16:55:06 +03:00
|
|
|
package rfb
|
2017-06-13 01:52:07 +03:00
|
|
|
|
|
|
|
type SecurityType uint8
|
|
|
|
|
2017-06-26 14:22:27 +03:00
|
|
|
//go:generate stringer -type=SecurityType
|
|
|
|
|
2017-06-13 01:52:07 +03:00
|
|
|
const (
|
2017-06-26 17:30:47 +03:00
|
|
|
SecTypeUnknown SecurityType = SecurityType(0)
|
|
|
|
SecTypeNone SecurityType = SecurityType(1)
|
|
|
|
SecTypeVNC SecurityType = SecurityType(2)
|
|
|
|
SecTypeTight SecurityType = SecurityType(16)
|
|
|
|
SecTypeATEN SecurityType = SecurityType(16)
|
|
|
|
SecTypeVeNCrypt SecurityType = SecurityType(19)
|
2017-06-13 01:52:07 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type SecuritySubType uint32
|
|
|
|
|
2017-06-26 14:22:27 +03:00
|
|
|
//go:generate stringer -type=SecuritySubType
|
|
|
|
|
2017-06-13 01:52:07 +03:00
|
|
|
const (
|
2017-06-26 17:30:47 +03:00
|
|
|
SecSubTypeUnknown SecuritySubType = SecuritySubType(0)
|
2017-06-13 01:52:07 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2017-06-26 17:30:47 +03:00
|
|
|
SecSubTypeVeNCrypt01Unknown SecuritySubType = SecuritySubType(0)
|
|
|
|
SecSubTypeVeNCrypt01Plain SecuritySubType = SecuritySubType(19)
|
|
|
|
SecSubTypeVeNCrypt01TLSNone SecuritySubType = SecuritySubType(20)
|
|
|
|
SecSubTypeVeNCrypt01TLSVNC SecuritySubType = SecuritySubType(21)
|
|
|
|
SecSubTypeVeNCrypt01TLSPlain SecuritySubType = SecuritySubType(22)
|
|
|
|
SecSubTypeVeNCrypt01X509None SecuritySubType = SecuritySubType(23)
|
|
|
|
SecSubTypeVeNCrypt01X509VNC SecuritySubType = SecuritySubType(24)
|
|
|
|
SecSubTypeVeNCrypt01X509Plain SecuritySubType = SecuritySubType(25)
|
2017-06-13 01:52:07 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2017-06-26 17:30:47 +03:00
|
|
|
SecSubTypeVeNCrypt02Unknown SecuritySubType = SecuritySubType(0)
|
|
|
|
SecSubTypeVeNCrypt02Plain SecuritySubType = SecuritySubType(256)
|
|
|
|
SecSubTypeVeNCrypt02TLSNone SecuritySubType = SecuritySubType(257)
|
|
|
|
SecSubTypeVeNCrypt02TLSVNC SecuritySubType = SecuritySubType(258)
|
|
|
|
SecSubTypeVeNCrypt02TLSPlain SecuritySubType = SecuritySubType(259)
|
|
|
|
SecSubTypeVeNCrypt02X509None SecuritySubType = SecuritySubType(260)
|
|
|
|
SecSubTypeVeNCrypt02X509VNC SecuritySubType = SecuritySubType(261)
|
|
|
|
SecSubTypeVeNCrypt02X509Plain SecuritySubType = SecuritySubType(262)
|
2017-06-13 01:52:07 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type SecurityHandler interface {
|
|
|
|
Type() SecurityType
|
|
|
|
SubType() SecuritySubType
|
|
|
|
Auth(Conn) error
|
|
|
|
}
|