This file is indexed.

/usr/share/doc/libghc-asn1-encoding-doc/html/asn1-encoding.txt is in libghc-asn1-encoding-doc 0.9.4-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | ASN1 data reader and writer in RAW, BER and DER forms
--   
--   ASN1 data reader and writer in raw form with supports for high level
--   forms of ASN1 (BER, and DER).
@package asn1-encoding
@version 0.9.4



-- | <i>Deprecated: Use Data.ASN1.Types instead</i>
module Data.ASN1.Object

-- | Define an object that can be converted to and from ASN.1
class ASN1Object a

-- | transform an object into a chunk of ASN1 stream.
toASN1 :: a -> ASN1S

-- | returns either an object along the remaining ASN1 stream, or an error.
fromASN1 :: [ASN1] -> Either String (a, [ASN1])


module Data.ASN1.Stream
type ASN1Repr = (ASN1, [ASN1Event])
getConstructedEnd :: Int -> [ASN1] -> ([ASN1], [ASN1])
getConstructedEndRepr :: [ASN1Repr] -> ([ASN1Repr], [ASN1Repr])


module Data.ASN1.Error

-- | Possible errors during parsing operations
data ASN1Error

-- | Unexpected EOC in the stream.
StreamUnexpectedEOC :: ASN1Error

-- | Invalid primitive with infinite length in a stream.
StreamInfinitePrimitive :: ASN1Error

-- | A construction goes over the size specified in the header.
StreamConstructionWrongSize :: ASN1Error

-- | An unexpected situation has come up parsing an ASN1 event stream.
StreamUnexpectedSituation :: String -> ASN1Error

-- | Parsing an invalid header.
ParsingHeaderFail :: String -> ASN1Error

-- | Parsing is not finished, there is construction unended.
ParsingPartial :: ASN1Error

-- | Decoding of a type that is not implemented. Contribution welcome.
TypeNotImplemented :: String -> ASN1Error

-- | Decoding of a knowed type failed.
TypeDecodingFailed :: String -> ASN1Error

-- | Policy failed including the name of the policy and the reason.
PolicyFailed :: String -> String -> ASN1Error
instance GHC.Classes.Eq Data.ASN1.Error.ASN1Error
instance GHC.Show.Show Data.ASN1.Error.ASN1Error
instance GHC.Exception.Exception Data.ASN1.Error.ASN1Error


module Data.ASN1.Encoding

-- | Describe an ASN1 decoding, that transform a bytestream into an
--   asn1stream
class ASN1Decoding a

-- | decode a lazy bytestring into an ASN1 stream
decodeASN1 :: ASN1Decoding a => a -> ByteString -> Either ASN1Error [ASN1]

-- | transition class.
class ASN1DecodingRepr a

-- | decode a lazy bytestring into an ASN1 stream
decodeASN1Repr :: ASN1DecodingRepr a => a -> ByteString -> Either ASN1Error [ASN1Repr]

-- | Describe an ASN1 encoding, that transform an asn1stream into a
--   bytestream
class ASN1Encoding a

-- | encode a stream into a lazy bytestring
encodeASN1 :: ASN1Encoding a => a -> [ASN1] -> ByteString

-- | decode a strict bytestring into an ASN1 stream
decodeASN1' :: ASN1Decoding a => a -> ByteString -> Either ASN1Error [ASN1]

-- | decode a strict bytestring into an ASN1Repr stream
decodeASN1Repr' :: ASN1DecodingRepr a => a -> ByteString -> Either ASN1Error [ASN1Repr]

-- | encode a stream into a strict bytestring
encodeASN1' :: ASN1Encoding a => a -> [ASN1] -> ByteString


-- | Raw encoding of binary format (BER<i>DER</i>CER)
module Data.ASN1.BinaryEncoding.Raw

-- | ASN1 Header with the class, tag, constructed flag and length.
data ASN1Header :: *
ASN1Header :: ~ASN1Class -> ~ASN1Tag -> ~Bool -> ~ASN1Length -> ASN1Header

-- | Element class
data ASN1Class :: *
Universal :: ASN1Class
Application :: ASN1Class
Context :: ASN1Class
Private :: ASN1Class

-- | ASN1 Tag
type ASN1Tag = Int

-- | ASN1 Length with all different formats
data ASN1Length :: *

-- | Short form with only one byte. length has to be &lt; 127.
LenShort :: Int -> ASN1Length

-- | Long form of N bytes
LenLong :: Int -> Int -> ASN1Length

-- | Length is indefinite expect an EOC in the stream to finish the type
LenIndefinite :: ASN1Length

-- | represent one event from an asn1 data stream
data ASN1Event :: *

-- | ASN1 Header
Header :: ASN1Header -> ASN1Event

-- | Primitive
Primitive :: ~ByteString -> ASN1Event

-- | Constructed value start
ConstructionBegin :: ASN1Event

-- | Constructed value end
ConstructionEnd :: ASN1Event

-- | Parse one lazy bytestring and returns on success all ASN1 events
--   associated.
parseLBS :: ByteString -> Either ASN1Error [ASN1Event]

-- | Parse one strict bytestring and returns on success all ASN1 events
--   associated.
parseBS :: ByteString -> Either ASN1Error [ASN1Event]

-- | transform a list of ASN1 Events into a lazy bytestring
toLazyByteString :: [ASN1Event] -> ByteString

-- | transform a list of ASN1 Events into a strict bytestring
toByteString :: [ASN1Event] -> ByteString


-- | A module containing ASN1 BER and DER specification encoding/decoding.
module Data.ASN1.BinaryEncoding

-- | Basic Encoding Rules (BER)
data BER
BER :: BER

-- | Distinguished Encoding Rules (DER)
data DER
DER :: DER
instance Data.ASN1.Encoding.ASN1DecodingRepr Data.ASN1.BinaryEncoding.BER
instance Data.ASN1.Encoding.ASN1Decoding Data.ASN1.BinaryEncoding.BER
instance Data.ASN1.Encoding.ASN1DecodingRepr Data.ASN1.BinaryEncoding.DER
instance Data.ASN1.Encoding.ASN1Decoding Data.ASN1.BinaryEncoding.DER
instance Data.ASN1.Encoding.ASN1Encoding Data.ASN1.BinaryEncoding.DER