{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeOperators #-}
module LDAPv3
(
LDAPMessage(..)
, MessageID(..)
, MaxInt
, ProtocolOp(..)
, LDAPString
, LDAPOID
, LDAPDN
, RelativeLDAPDN
, AttributeDescription
, AttributeValue
, AttributeValueAssertion(..)
, AssertionValue
, PartialAttribute(..)
, Attribute(..)
, MatchingRuleId
, LDAPResult(..)
, ResultCode(..)
, Referral
, URI
, Controls
, Control(..)
, BindRequest(..)
, AuthenticationChoice(..)
, SaslCredentials(..)
, BindResponse(..)
, UnbindRequest
, SearchRequest(..)
, Scope(..)
, DerefAliases(..)
, AttributeSelection
, Filter(..)
, SubstringFilter(..)
, Substring(..)
, MatchingRuleAssertion(..)
, SearchResultEntry(..)
, PartialAttributeList
, SearchResultReference(..)
, SearchResultDone
, ModifyRequest(..)
, Change(..)
, Operation(..)
, ModifyResponse
, AddRequest(..)
, AttributeList
, AddResponse
, DelRequest
, DelResponse
, ModifyDNRequest(..)
, ModifyDNResponse
, CompareRequest(..)
, CompareResponse
, AbandonRequest
, ExtendedRequest(..)
, ExtendedResponse(..)
, IntermediateResponse(..)
, NULL
, OCTET_STRING
, BOOLEAN_DEFAULT_FALSE(..)
, SET(..)
, SET1(..)
, EXPLICIT(..)
, IMPLICIT(..)
, TagK(..)
, UIntBounds
, UInt
, fromUInt
, toUInt
) where
import Common
import Data.ASN1
import Data.ASN1.Prim
import Data.Int.Subtypes
import LDAPv3.ResultCode
import qualified Data.Binary as Bin
data LDAPMessage = LDAPMessage
{ _LDAPMessage'messageID :: MessageID
, _LDAPMessage'protocolOp :: ProtocolOp
, _LDAPMessage'controls :: Maybe ('CONTEXTUAL 0 `IMPLICIT` Controls)
} deriving (Generic,Show,Eq)
instance Bin.Binary LDAPMessage where
put = void . toBinaryPut . asn1encode
get = toBinaryGet asn1decode
instance ASN1 LDAPMessage where
asn1decodeCompOf = LDAPMessage <$> asn1decode <*> asn1decode <*> asn1decode
asn1encodeCompOf (LDAPMessage v1 v2 v3) = asn1encodeCompOf (v1,v2,v3)
newtype MessageID = MessageID (UInt 0 MaxInt Int32)
deriving (Generic,NFData,Ord,Bounded,ASN1,Show,Eq)
type MaxInt = 2147483647
data ProtocolOp
= ProtocolOp'bindRequest BindRequest
| ProtocolOp'bindResponse BindResponse
| ProtocolOp'unbindRequest UnbindRequest
| ProtocolOp'searchRequest SearchRequest
| ProtocolOp'searchResEntry SearchResultEntry
| ProtocolOp'searchResDone SearchResultDone
| ProtocolOp'searchResRef SearchResultReference
| ProtocolOp'modifyRequest ModifyRequest
| ProtocolOp'modifyResponse ModifyResponse
| ProtocolOp'addRequest AddRequest
| ProtocolOp'addResponse AddResponse
| ProtocolOp'delRequest DelRequest
| ProtocolOp'delResponse DelResponse
| ProtocolOp'modDNRequest ModifyDNRequest
| ProtocolOp'modDNResponse ModifyDNResponse
| ProtocolOp'compareRequest CompareRequest
| ProtocolOp'compareResponse CompareResponse
| ProtocolOp'abandonRequest AbandonRequest
| ProtocolOp'extendedReq ExtendedRequest
| ProtocolOp'extendedResp ExtendedResponse
| ProtocolOp'intermediateResponse IntermediateResponse
deriving (Generic,Show,Eq)
instance NFData ProtocolOp
instance ASN1 ProtocolOp where
asn1decode = with'CHOICE
[ ProtocolOp'bindRequest <$> asn1decode
, ProtocolOp'bindResponse <$> asn1decode
, ProtocolOp'unbindRequest <$> asn1decode
, ProtocolOp'searchRequest <$> asn1decode
, ProtocolOp'searchResEntry <$> asn1decode
, ProtocolOp'searchResDone <$> asn1decode
, ProtocolOp'searchResRef <$> asn1decode
, ProtocolOp'modifyRequest <$> asn1decode
, ProtocolOp'modifyResponse <$> asn1decode
, ProtocolOp'addRequest <$> asn1decode
, ProtocolOp'addResponse <$> asn1decode
, ProtocolOp'delRequest <$> asn1decode
, ProtocolOp'delResponse <$> asn1decode
, ProtocolOp'modDNRequest <$> asn1decode
, ProtocolOp'modDNResponse <$> asn1decode
, ProtocolOp'compareRequest <$> asn1decode
, ProtocolOp'compareResponse <$> asn1decode
, ProtocolOp'abandonRequest <$> asn1decode
, ProtocolOp'extendedReq <$> asn1decode
, ProtocolOp'extendedResp <$> asn1decode
, ProtocolOp'intermediateResponse <$> asn1decode
]
asn1encode = \case
ProtocolOp'bindRequest v -> asn1encode v
ProtocolOp'bindResponse v -> asn1encode v
ProtocolOp'unbindRequest v -> asn1encode v
ProtocolOp'searchRequest v -> asn1encode v
ProtocolOp'searchResEntry v -> asn1encode v
ProtocolOp'searchResDone v -> asn1encode v
ProtocolOp'searchResRef v -> asn1encode v
ProtocolOp'modifyRequest v -> asn1encode v
ProtocolOp'modifyResponse v -> asn1encode v
ProtocolOp'addRequest v -> asn1encode v
ProtocolOp'addResponse v -> asn1encode v
ProtocolOp'delRequest v -> asn1encode v
ProtocolOp'delResponse v -> asn1encode v
ProtocolOp'modDNRequest v -> asn1encode v
ProtocolOp'modDNResponse v -> asn1encode v
ProtocolOp'compareRequest v -> asn1encode v
ProtocolOp'compareResponse v -> asn1encode v
ProtocolOp'abandonRequest v -> asn1encode v
ProtocolOp'extendedReq v -> asn1encode v
ProtocolOp'extendedResp v -> asn1encode v
ProtocolOp'intermediateResponse v -> asn1encode v
type Controls = [Control]
data Control = Control
{ _Control'controlType :: LDAPOID
, _Control'criticality :: Maybe BOOLEAN_DEFAULT_FALSE
, _Control'controlValue :: Maybe OCTET_STRING
} deriving (Generic,Show,Eq)
instance NFData Control
instance ASN1 Control where
asn1decodeCompOf = Control <$> asn1decode <*> asn1decode <*> asn1decode
asn1encodeCompOf (Control v1 v2 v3) = asn1encodeCompOf (v1,v2,v3)
type LDAPOID = OCTET_STRING
data BindRequest = BindRequest
{ bindRequest'version :: UInt 1 127 Int8
, bindRequest'name :: LDAPDN
, bindRequest'authentication :: AuthenticationChoice
} deriving (Generic,Show,Eq)
instance NFData BindRequest
instance ASN1 BindRequest where
asn1defTag _ = Application 0
asn1decodeCompOf = BindRequest <$> asn1decode <*> asn1decode <*> asn1decode
asn1encodeCompOf (BindRequest v1 v2 v3) = asn1encodeCompOf (v1,v2,v3)
data AuthenticationChoice
= AuthenticationChoice'simple ('CONTEXTUAL 0 `IMPLICIT` OCTET_STRING)
| AuthenticationChoice'sasl ('CONTEXTUAL 3 `IMPLICIT` SaslCredentials)
deriving (Generic,Show,Eq)
instance NFData AuthenticationChoice
instance ASN1 AuthenticationChoice where
asn1decode = with'CHOICE
[ AuthenticationChoice'simple <$> asn1decode
, AuthenticationChoice'sasl <$> asn1decode
]
asn1encode = \case
AuthenticationChoice'simple v -> asn1encode v
AuthenticationChoice'sasl v -> asn1encode v
data SaslCredentials = SaslCredentials
{ _SaslCredentials'mechanism :: LDAPString
, _SaslCredentials'credentials :: Maybe OCTET_STRING
} deriving (Generic,Show,Eq)
instance NFData SaslCredentials
instance ASN1 SaslCredentials where
asn1decodeCompOf = SaslCredentials <$> asn1decode <*> asn1decode
asn1encodeCompOf (SaslCredentials v1 v2) = asn1encodeCompOf (v1,v2)
data BindResponse = BindResponse
{ _BindResponse'LDAPResult :: LDAPResult
, _BindResponse'serverSaslCreds :: Maybe ('CONTEXTUAL 7 `IMPLICIT` OCTET_STRING)
} deriving (Generic,Show,Eq)
instance NFData BindResponse
instance ASN1 BindResponse where
asn1defTag _ = Application 1
asn1decodeCompOf = do
_BindResponse'LDAPResult <- asn1decodeCompOf
_BindResponse'serverSaslCreds <- asn1decode
pure BindResponse{..}
asn1encodeCompOf (BindResponse{..})
= enc'SEQUENCE_COMPS [ asn1encodeCompOf _BindResponse'LDAPResult
, asn1encode _BindResponse'serverSaslCreds
]
type UnbindRequest = ('APPLICATION 2 `IMPLICIT` NULL)
data SearchRequest = SearchRequest
{ _SearchRequest'baseObject :: LDAPDN
, _SearchRequest'scope :: Scope
, _SearchRequest'derefAliases :: DerefAliases
, _SearchRequest'sizeLimit :: (UInt 0 MaxInt Int32)
, _SearchRequest'timeLimit :: (UInt 0 MaxInt Int32)
, _SearchRequest'typesOnly :: Bool
, _SearchRequest'filter :: Filter
, _SearchRequest'attributes :: AttributeSelection
} deriving (Generic,Show,Eq)
instance NFData SearchRequest
type AttributeSelection = [LDAPString]
instance ASN1 SearchRequest where
asn1decode = implicit (Application 3) $ with'SEQUENCE $ do
_SearchRequest'baseObject <- asn1decode
_SearchRequest'scope <- asn1decode
_SearchRequest'derefAliases <- asn1decode
_SearchRequest'sizeLimit <- asn1decode
_SearchRequest'timeLimit <- asn1decode
_SearchRequest'typesOnly <- asn1decode
_SearchRequest'filter <- asn1decode
_SearchRequest'attributes <- asn1decode
pure SearchRequest{..}
asn1encode (SearchRequest v1 v2 v3 v4 v5 v6 v7 v8)
= retag (Application 3) $
enc'SEQUENCE [ asn1encode v1
, asn1encode v2
, asn1encode v3
, asn1encode v4
, asn1encode v5
, asn1encode v6
, asn1encode v7
, asn1encode v8
]
data Scope
= Scope'baseObject
| Scope'singleLevel
| Scope'wholeSubtree
deriving (Generic,Bounded,Enum,Show,Eq)
instance NFData Scope where
rnf = rwhnf
instance ASN1 Scope where
asn1decode = dec'BoundedEnum
asn1encode = enc'BoundedEnum
data DerefAliases
= DerefAliases'neverDerefAliases
| DerefAliases'derefInSearching
| DerefAliases'derefFindingBaseObj
| DerefAliases'derefAlways
deriving (Generic,Bounded,Enum,Show,Eq)
instance NFData DerefAliases where
rnf = rwhnf
instance ASN1 DerefAliases where
asn1decode = dec'BoundedEnum
asn1encode = enc'BoundedEnum
data Filter
= Filter'and ('CONTEXTUAL 0 `IMPLICIT` SET1 Filter)
| Filter'or ('CONTEXTUAL 1 `IMPLICIT` SET1 Filter)
| Filter'not ('CONTEXTUAL 2 `EXPLICIT` Filter)
| Filter'equalityMatch ('CONTEXTUAL 3 `IMPLICIT` AttributeValueAssertion)
| Filter'substrings ('CONTEXTUAL 4 `IMPLICIT` SubstringFilter)
| Filter'greaterOrEqual ('CONTEXTUAL 5 `IMPLICIT` AttributeValueAssertion)
| Filter'lessOrEqual ('CONTEXTUAL 6 `IMPLICIT` AttributeValueAssertion)
| Filter'present ('CONTEXTUAL 7 `IMPLICIT` AttributeDescription)
| Filter'approxMatch ('CONTEXTUAL 8 `IMPLICIT` AttributeValueAssertion)
| Filter'extensibleMatch ('CONTEXTUAL 9 `IMPLICIT` MatchingRuleAssertion)
deriving (Generic,Show,Eq)
instance NFData Filter
instance ASN1 Filter where
asn1decode = with'CHOICE
[ Filter'and <$> asn1decode
, Filter'or <$> asn1decode
, Filter'not <$> asn1decode
, Filter'equalityMatch <$> asn1decode
, Filter'substrings <$> asn1decode
, Filter'greaterOrEqual <$> asn1decode
, Filter'lessOrEqual <$> asn1decode
, Filter'present <$> asn1decode
, Filter'approxMatch <$> asn1decode
, Filter'extensibleMatch <$> asn1decode
]
asn1encode = \case
Filter'and v -> asn1encode v
Filter'or v -> asn1encode v
Filter'not v -> asn1encode v
Filter'equalityMatch v -> asn1encode v
Filter'substrings v -> asn1encode v
Filter'greaterOrEqual v -> asn1encode v
Filter'lessOrEqual v -> asn1encode v
Filter'present v -> asn1encode v
Filter'approxMatch v -> asn1encode v
Filter'extensibleMatch v -> asn1encode v
type AttributeDescription = LDAPString
type AttributeValue = OCTET_STRING
data AttributeValueAssertion = AttributeValueAssertion
{ _AttributeValueAssertion'attributeDesc :: AttributeDescription
, _AttributeValueAssertion'assertionValue :: AssertionValue
} deriving (Generic,Show,Eq)
instance NFData AttributeValueAssertion
type AssertionValue = OCTET_STRING
instance ASN1 AttributeValueAssertion where
asn1decodeCompOf = AttributeValueAssertion <$> asn1decode <*> asn1decode
asn1encodeCompOf (AttributeValueAssertion v1 v2) = asn1encodeCompOf (v1,v2)
data SubstringFilter = SubstringFilter
{ _SubstringFilter'type :: AttributeDescription
, _SubstringFilter'substrings :: NonEmpty Substring
} deriving (Generic,Show,Eq)
instance NFData SubstringFilter
instance ASN1 SubstringFilter where
asn1decodeCompOf = SubstringFilter <$> asn1decode <*> asn1decode
asn1encodeCompOf (SubstringFilter v1 v2) = asn1encodeCompOf (v1,v2)
data Substring
= Substring'initial ('CONTEXTUAL 0 `IMPLICIT` AssertionValue)
| Substring'any ('CONTEXTUAL 1 `IMPLICIT` AssertionValue)
| Substring'final ('CONTEXTUAL 2 `IMPLICIT` AssertionValue)
deriving (Generic,Show,Eq)
instance NFData Substring
instance ASN1 Substring where
asn1decode = with'CHOICE
[ Substring'initial <$> asn1decode
, Substring'any <$> asn1decode
, Substring'final <$> asn1decode
]
asn1encode = \case
Substring'initial v -> asn1encode v
Substring'any v -> asn1encode v
Substring'final v -> asn1encode v
type MatchingRuleId = LDAPString
data MatchingRuleAssertion = MatchingRuleAssertion
{ _MatchingRuleAssertion'matchingRule :: Maybe ('CONTEXTUAL 1 `IMPLICIT` MatchingRuleId)
, _MatchingRuleAssertion'type :: Maybe ('CONTEXTUAL 2 `IMPLICIT` AttributeDescription)
, _MatchingRuleAssertion'matchValue :: ('CONTEXTUAL 3 `IMPLICIT` AssertionValue)
, _MatchingRuleAssertion'dnAttributes :: Maybe ('CONTEXTUAL 4 `IMPLICIT` BOOLEAN_DEFAULT_FALSE)
} deriving (Generic,Show,Eq)
instance NFData MatchingRuleAssertion
instance ASN1 MatchingRuleAssertion where
asn1decodeCompOf = MatchingRuleAssertion <$> asn1decode <*> asn1decode <*> asn1decode <*> asn1decode
asn1encodeCompOf (MatchingRuleAssertion v1 v2 v3 v4) = asn1encodeCompOf (v1,v2,v3,v4)
newtype SearchResultReference = SearchResultReference (NonEmpty URI)
deriving (Generic,NFData,Show,Eq)
instance ASN1 SearchResultReference where
asn1defTag _ = Application 19
asn1decode = SearchResultReference <$> (Application 19 `implicit` asn1decode)
asn1encode (SearchResultReference v) = retag (Application 19) $ asn1encode v
data SearchResultEntry = SearchResultEntry
{ _SearchResultEntry'objectName :: LDAPDN
, _SearchResultEntry'attributes :: PartialAttributeList
} deriving (Generic,Show,Eq)
instance NFData SearchResultEntry
instance ASN1 SearchResultEntry where
asn1defTag _ = Application 4
asn1decodeCompOf = SearchResultEntry <$> asn1decode <*> asn1decode
asn1encodeCompOf (SearchResultEntry v1 v2) = asn1encodeCompOf (v1,v2)
type PartialAttributeList = [PartialAttribute]
data PartialAttribute = PartialAttribute
{ _PartialAttribute'type :: AttributeDescription
, _PartialAttribute'vals :: SET AttributeValue
} deriving (Generic,Show,Eq)
instance NFData PartialAttribute
instance ASN1 PartialAttribute where
asn1decodeCompOf = PartialAttribute <$> asn1decode <*> asn1decode
asn1encodeCompOf (PartialAttribute v1 v2) = asn1encodeCompOf (v1,v2)
data Attribute = Attribute
{ _Attribute'type :: AttributeDescription
, _Attribute'vals :: SET1 AttributeValue
} deriving (Generic,Show,Eq)
instance NFData Attribute
instance ASN1 Attribute where
asn1decodeCompOf = Attribute <$> asn1decode <*> asn1decode
asn1encodeCompOf (Attribute v1 v2) = asn1encodeCompOf (v1,v2)
type SearchResultDone = ('APPLICATION 5 `IMPLICIT` LDAPResult)
data LDAPResult = LDAPResult
{ _LDAPResult'resultCode :: ResultCode
, _LDAPResult'matchedDN :: LDAPDN
, _LDAPResult'diagnosticMessage :: LDAPString
, _LDAPResult'referral :: Maybe ('CONTEXTUAL 3 `IMPLICIT` Referral)
} deriving (Generic,Show,Eq)
instance NFData LDAPResult
type Referral = ('CONTEXTUAL 3 `IMPLICIT` NonEmpty URI)
type URI = LDAPString
instance ASN1 LDAPResult where
asn1decodeCompOf = do
_LDAPResult'resultCode <- asn1decode
_LDAPResult'matchedDN <- asn1decode
_LDAPResult'diagnosticMessage <- asn1decode
_LDAPResult'referral <- asn1decode
pure LDAPResult{..}
asn1encodeCompOf (LDAPResult v1 v2 v3 v4) = asn1encodeCompOf (v1,v2,v3,v4)
type LDAPString = ShortText
type LDAPDN = LDAPString
type RelativeLDAPDN = LDAPString
data ModifyRequest = ModifyRequest
{ _ModifyRequest'object :: LDAPDN
, _ModifyRequest'changes :: [Change]
} deriving (Generic,Show,Eq)
instance NFData ModifyRequest
instance ASN1 ModifyRequest where
asn1defTag _ = Application 6
asn1decodeCompOf = ModifyRequest <$> asn1decode <*> asn1decode
asn1encodeCompOf (ModifyRequest v1 v2) = asn1encodeCompOf (v1,v2)
data Change = Change
{ _Change'operation :: Operation
, _Change'modification :: PartialAttribute
} deriving (Generic,Show,Eq)
instance NFData Change
instance ASN1 Change where
asn1decodeCompOf = Change <$> asn1decode <*> asn1decode
asn1encodeCompOf (Change v1 v2) = asn1encodeCompOf (v1,v2)
data Operation
= Operation'add
| Operation'delete
| Operation'replace
deriving (Generic,Bounded,Enum,Show,Eq)
instance NFData Operation where
rnf = rwhnf
instance ASN1 Operation where
asn1decode = dec'BoundedEnum
asn1encode = enc'BoundedEnum
type ModifyResponse = ('APPLICATION 7 `IMPLICIT` LDAPResult)
data AddRequest = AddRequest
{ _AddRequest'entry :: LDAPDN
, _AddRequest'attributes :: AttributeList
} deriving (Generic,Show,Eq)
instance NFData AddRequest
instance ASN1 AddRequest where
asn1defTag _ = Application 8
asn1decodeCompOf = AddRequest <$> asn1decode <*> asn1decode
asn1encodeCompOf (AddRequest v1 v2) = asn1encodeCompOf (v1,v2)
type AttributeList = [Attribute]
type AddResponse = ('APPLICATION 9 `IMPLICIT` LDAPResult)
type DelRequest = ('APPLICATION 10 `IMPLICIT` LDAPDN)
type DelResponse = ('APPLICATION 11 `IMPLICIT` LDAPResult)
data ModifyDNRequest = ModifyDNRequest
{ _ModifyDNRequest'entry :: LDAPDN
, _ModifyDNRequest'newrdn :: RelativeLDAPDN
, _ModifyDNRequest'deleteoldrdn :: Bool
, _ModifyDNRequest'newSuperior :: Maybe ('CONTEXTUAL 0 `IMPLICIT` LDAPDN)
} deriving (Generic,Show,Eq)
instance NFData ModifyDNRequest
instance ASN1 ModifyDNRequest where
asn1defTag _ = Application 12
asn1decodeCompOf = ModifyDNRequest <$> asn1decode <*> asn1decode <*> asn1decode <*> asn1decode
asn1encodeCompOf (ModifyDNRequest v1 v2 v3 v4) = asn1encodeCompOf (v1,v2,v3,v4)
type ModifyDNResponse = ('APPLICATION 13 `IMPLICIT` LDAPResult)
data CompareRequest = CompareRequest
{ _CompareRequest'entry :: LDAPDN
, _CompareRequest'ava :: AttributeValueAssertion
} deriving (Generic,Show,Eq)
instance NFData CompareRequest
instance ASN1 CompareRequest where
asn1defTag _ = Application 14
asn1decodeCompOf = CompareRequest <$> asn1decode <*> asn1decode
asn1encodeCompOf (CompareRequest v1 v2) = asn1encodeCompOf (v1,v2)
type CompareResponse = ('APPLICATION 15 `IMPLICIT` LDAPResult)
type AbandonRequest = ('APPLICATION 16 `IMPLICIT` MessageID)
data ExtendedRequest = ExtendedRequest
{ _ExtendedRequest'responseName :: ('CONTEXTUAL 0 `IMPLICIT` LDAPOID)
, _ExtendedRequest'responseValue :: Maybe ('CONTEXTUAL 1 `IMPLICIT` OCTET_STRING)
} deriving (Generic,Show,Eq)
instance NFData ExtendedRequest
instance ASN1 ExtendedRequest where
asn1defTag _ = Application 23
asn1decodeCompOf = ExtendedRequest <$> asn1decode <*> asn1decode
asn1encodeCompOf (ExtendedRequest v1 v2) = asn1encodeCompOf (v1,v2)
data ExtendedResponse = ExtendedResponse
{ _ExtendedResponse'LDAPResult :: LDAPResult
, _ExtendedResponse'responseName :: Maybe ('CONTEXTUAL 10 `IMPLICIT` LDAPOID)
, _ExtendedResponse'responseValue :: Maybe ('CONTEXTUAL 11 `IMPLICIT` OCTET_STRING)
} deriving (Generic,Show,Eq)
instance NFData ExtendedResponse
instance ASN1 ExtendedResponse where
asn1defTag _ = Application 24
asn1decodeCompOf = do
_ExtendedResponse'LDAPResult <- asn1decodeCompOf
_ExtendedResponse'responseName <- asn1decode
_ExtendedResponse'responseValue <- asn1decode
pure ExtendedResponse{..}
asn1encodeCompOf (ExtendedResponse{..})
= enc'SEQUENCE_COMPS [ asn1encodeCompOf _ExtendedResponse'LDAPResult
, asn1encode _ExtendedResponse'responseName
, asn1encode _ExtendedResponse'responseValue
]
data IntermediateResponse = IntermediateResponse
{ _IntermediateResponse'responseName :: Maybe ('CONTEXTUAL 0 `IMPLICIT` LDAPOID)
, _IntermediateResponse'responseValue :: Maybe ('CONTEXTUAL 1 `IMPLICIT` OCTET_STRING)
} deriving (Generic,Show,Eq)
instance NFData IntermediateResponse
instance ASN1 IntermediateResponse where
asn1defTag _ = Application 25
asn1decodeCompOf = IntermediateResponse <$> asn1decode <*> asn1decode
asn1encodeCompOf (IntermediateResponse v1 v2) = asn1encodeCompOf (v1,v2)