FreeRDP
er.h File Reference
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <winpr/stream.h>
This graph shows which files directly or indirectly include this file:

Macros

#define ER_CLASS_MASK   0xC0
 
#define ER_CLASS_UNIV   0x00 /* 0 0 */
 
#define ER_CLASS_APPL   0x40 /* 0 1 */
 
#define ER_CLASS_CTXT   0x80 /* 1 0 */
 
#define ER_CLASS_PRIV   0xC0 /* 1 1 */
 
#define ER_PC_MASK   0x20
 
#define ER_PRIMITIVE   0x00 /* 0 */
 
#define ER_CONSTRUCT   0x20 /* 1 */
 
#define ER_TAG_MASK   0x1F
 
#define ER_TAG_BOOLEAN   0x01
 
#define ER_TAG_INTEGER   0x02
 
#define ER_TAG_BIT_STRING   0x03
 
#define ER_TAG_OCTET_STRING   0x04
 
#define ER_TAG_OBJECT_IDENTIFIER   0x06
 
#define ER_TAG_ENUMERATED   0x0A
 
#define ER_TAG_SEQUENCE   0x10
 
#define ER_TAG_SEQUENCE_OF   0x10
 
#define ER_TAG_GENERAL_STRING   0x1B
 
#define ER_TAG_GENERALIZED_TIME   0x18
 
#define ER_PC(_pc)   (_pc ? ER_CONSTRUCT : ER_PRIMITIVE)
 

Functions

FREERDP_API void er_read_length (wStream *s, int *length)
 
FREERDP_API int er_write_length (wStream *s, int length, BOOL flag)
 
FREERDP_API int _er_skip_length (int length)
 
FREERDP_API int er_get_content_length (int length)
 
FREERDP_API BOOL er_read_universal_tag (wStream *s, BYTE tag, BOOL pc)
 
FREERDP_API void er_write_universal_tag (wStream *s, BYTE tag, BOOL pc)
 
FREERDP_API BOOL er_read_application_tag (wStream *s, BYTE tag, int *length)
 
FREERDP_API void er_write_application_tag (wStream *s, BYTE tag, int length, BOOL flag)
 
FREERDP_API BOOL er_read_enumerated (wStream *s, BYTE *enumerated, BYTE count)
 
FREERDP_API void er_write_enumerated (wStream *s, BYTE enumerated, BYTE count, BOOL flag)
 
FREERDP_API BOOL er_read_contextual_tag (wStream *s, BYTE tag, int *length, BOOL pc)
 
FREERDP_API int er_write_contextual_tag (wStream *s, BYTE tag, int length, BOOL pc, BOOL flag)
 
FREERDP_API int er_skip_contextual_tag (int length)
 
FREERDP_API BOOL er_read_sequence_tag (wStream *s, int *length)
 
FREERDP_API int er_write_sequence_tag (wStream *s, int length, BOOL flag)
 
FREERDP_API int er_skip_sequence (int length)
 
FREERDP_API int er_skip_sequence_tag (int length)
 
FREERDP_API BOOL er_read_bit_string (wStream *s, int *length, BYTE *padding)
 
FREERDP_API BOOL er_write_bit_string_tag (wStream *s, UINT32 length, BYTE padding, BOOL flag)
 
FREERDP_API BOOL er_read_octet_string (wStream *s, int *length)
 
FREERDP_API void er_write_octet_string (wStream *s, BYTE *oct_str, int length, BOOL flag)
 
FREERDP_API int er_write_octet_string_tag (wStream *s, int length, BOOL flag)
 
FREERDP_API int er_skip_octet_string (int length)
 
FREERDP_API BOOL er_read_BOOL (wStream *s, BOOL *value)
 
FREERDP_API void er_write_BOOL (wStream *s, BOOL value)
 
FREERDP_API BOOL er_read_integer (wStream *s, UINT32 *value)
 
FREERDP_API int er_write_integer (wStream *s, INT32 value)
 
FREERDP_API BOOL er_read_integer_length (wStream *s, int *length)
 
FREERDP_API int er_skip_integer (INT32 value)
 

Macro Definition Documentation

◆ ER_CLASS_APPL

#define ER_CLASS_APPL   0x40 /* 0 1 */

◆ ER_CLASS_CTXT

#define ER_CLASS_CTXT   0x80 /* 1 0 */

◆ ER_CLASS_MASK

#define ER_CLASS_MASK   0xC0

FreeRDP: A Remote Desktop Protocol Implementation ASN.1 Encoding Rules (BER/DER common functions)

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Modified by Jiten Pathy

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

◆ ER_CLASS_PRIV

#define ER_CLASS_PRIV   0xC0 /* 1 1 */

◆ ER_CLASS_UNIV

#define ER_CLASS_UNIV   0x00 /* 0 0 */

◆ ER_CONSTRUCT

#define ER_CONSTRUCT   0x20 /* 1 */

◆ ER_PC

#define ER_PC (   _pc)    (_pc ? ER_CONSTRUCT : ER_PRIMITIVE)

◆ ER_PC_MASK

#define ER_PC_MASK   0x20

◆ ER_PRIMITIVE

#define ER_PRIMITIVE   0x00 /* 0 */

◆ ER_TAG_BIT_STRING

#define ER_TAG_BIT_STRING   0x03

◆ ER_TAG_BOOLEAN

#define ER_TAG_BOOLEAN   0x01

◆ ER_TAG_ENUMERATED

#define ER_TAG_ENUMERATED   0x0A

◆ ER_TAG_GENERAL_STRING

#define ER_TAG_GENERAL_STRING   0x1B

◆ ER_TAG_GENERALIZED_TIME

#define ER_TAG_GENERALIZED_TIME   0x18

◆ ER_TAG_INTEGER

#define ER_TAG_INTEGER   0x02

◆ ER_TAG_MASK

#define ER_TAG_MASK   0x1F

◆ ER_TAG_OBJECT_IDENTIFIER

#define ER_TAG_OBJECT_IDENTIFIER   0x06

◆ ER_TAG_OCTET_STRING

#define ER_TAG_OCTET_STRING   0x04

◆ ER_TAG_SEQUENCE

#define ER_TAG_SEQUENCE   0x10

◆ ER_TAG_SEQUENCE_OF

#define ER_TAG_SEQUENCE_OF   0x10

Function Documentation

◆ _er_skip_length()

FREERDP_API int _er_skip_length ( int  length)
Here is the caller graph for this function:

◆ er_get_content_length()

FREERDP_API int er_get_content_length ( int  length)

◆ er_read_application_tag()

FREERDP_API BOOL er_read_application_tag ( wStream s,
BYTE  tag,
int *  length 
)

Read er Application tag.

Parameters
sstream
tager application-defined tag
lengthlength
Here is the call graph for this function:

◆ er_read_bit_string()

FREERDP_API BOOL er_read_bit_string ( wStream s,
int *  length,
BYTE padding 
)
Here is the call graph for this function:

◆ er_read_BOOL()

FREERDP_API BOOL er_read_BOOL ( wStream s,
BOOL *  value 
)

Read a er BOOLEAN

Parameters
sA pointer to the stream to read from
valueA pointer to read the data to
Here is the call graph for this function:

◆ er_read_contextual_tag()

FREERDP_API BOOL er_read_contextual_tag ( wStream s,
BYTE  tag,
int *  length,
BOOL  pc 
)
Here is the call graph for this function:

◆ er_read_enumerated()

FREERDP_API BOOL er_read_enumerated ( wStream s,
BYTE enumerated,
BYTE  count 
)
Here is the call graph for this function:

◆ er_read_integer()

FREERDP_API BOOL er_read_integer ( wStream s,
UINT32 *  value 
)
Here is the call graph for this function:

◆ er_read_integer_length()

FREERDP_API BOOL er_read_integer_length ( wStream s,
int *  length 
)
Here is the call graph for this function:

◆ er_read_length()

FREERDP_API void er_read_length ( wStream s,
int *  length 
)

FreeRDP: A Remote Desktop Protocol Implementation ASN.1 Encoding Rules (BER/DER common functions)

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Modified by Jiten Pathy

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the caller graph for this function:

◆ er_read_octet_string()

FREERDP_API BOOL er_read_octet_string ( wStream s,
int *  length 
)
Here is the call graph for this function:

◆ er_read_sequence_tag()

FREERDP_API BOOL er_read_sequence_tag ( wStream s,
int *  length 
)
Here is the call graph for this function:

◆ er_read_universal_tag()

FREERDP_API BOOL er_read_universal_tag ( wStream s,
BYTE  tag,
BOOL  pc 
)

Read er Universal tag.

Parameters
sA pointer to the stream to write to
tager universally-defined tag
Returns
TRUE for success
Here is the caller graph for this function:

◆ er_skip_contextual_tag()

FREERDP_API int er_skip_contextual_tag ( int  length)
Here is the call graph for this function:

◆ er_skip_integer()

FREERDP_API int er_skip_integer ( INT32  value)
Here is the call graph for this function:

◆ er_skip_octet_string()

FREERDP_API int er_skip_octet_string ( int  length)
Here is the call graph for this function:

◆ er_skip_sequence()

FREERDP_API int er_skip_sequence ( int  length)
Here is the call graph for this function:

◆ er_skip_sequence_tag()

FREERDP_API int er_skip_sequence_tag ( int  length)
Here is the call graph for this function:

◆ er_write_application_tag()

FREERDP_API void er_write_application_tag ( wStream s,
BYTE  tag,
int  length,
BOOL  flag 
)

Write er Application tag.

Parameters
sstream
tager application-defined tag
lengthlength
Here is the call graph for this function:

◆ er_write_bit_string_tag()

FREERDP_API BOOL er_write_bit_string_tag ( wStream s,
UINT32  length,
BYTE  padding,
BOOL  flag 
)
Here is the call graph for this function:

◆ er_write_BOOL()

FREERDP_API void er_write_BOOL ( wStream s,
BOOL  value 
)

Write a er BOOLEAN

Parameters
sA pointer to the stream to write to
valueThe value to write
Here is the call graph for this function:

◆ er_write_contextual_tag()

FREERDP_API int er_write_contextual_tag ( wStream s,
BYTE  tag,
int  length,
BOOL  pc,
BOOL  flag 
)
Here is the call graph for this function:

◆ er_write_enumerated()

FREERDP_API void er_write_enumerated ( wStream s,
BYTE  enumerated,
BYTE  count,
BOOL  flag 
)
Here is the call graph for this function:

◆ er_write_integer()

FREERDP_API int er_write_integer ( wStream s,
INT32  value 
)

Write a er INTEGER

Parameters
sA pointer to the stream to write to
valuethe value to write
Here is the call graph for this function:

◆ er_write_length()

FREERDP_API int er_write_length ( wStream s,
int  length,
BOOL  flag 
)

Write er length.

Parameters
sstream
lengthlength
Here is the call graph for this function:
Here is the caller graph for this function:

◆ er_write_octet_string()

FREERDP_API void er_write_octet_string ( wStream s,
BYTE oct_str,
int  length,
BOOL  flag 
)

Write a er OCTET_STRING

Parameters
sstream
oct_stroctet string
lengthstring length
Here is the call graph for this function:

◆ er_write_octet_string_tag()

FREERDP_API int er_write_octet_string_tag ( wStream s,
int  length,
BOOL  flag 
)
Here is the call graph for this function:

◆ er_write_sequence_tag()

FREERDP_API int er_write_sequence_tag ( wStream s,
int  length,
BOOL  flag 
)

Write er SEQUENCE tag.

Parameters
sstream
lengthlength
Here is the call graph for this function:

◆ er_write_universal_tag()

FREERDP_API void er_write_universal_tag ( wStream s,
BYTE  tag,
BOOL  pc 
)

Write er Universal tag.

Parameters
sstream
tager universally-defined tag
pcprimitive (FALSE) or constructed (TRUE)
Here is the call graph for this function:
Here is the caller graph for this function: