FreeRDP
ber.c File Reference
#include <stdio.h>
#include <winpr/crt.h>
#include <freerdp/log.h>
#include <freerdp/crypto/ber.h>

Macros

#define TAG   FREERDP_TAG("crypto")
 

Functions

BOOL ber_read_length (wStream *s, size_t *length)
 
size_t ber_write_length (wStream *s, size_t length)
 
size_t _ber_sizeof_length (size_t length)
 
BOOL ber_read_universal_tag (wStream *s, BYTE tag, BOOL pc)
 
size_t ber_write_universal_tag (wStream *s, BYTE tag, BOOL pc)
 
BOOL ber_read_application_tag (wStream *s, BYTE tag, size_t *length)
 
void ber_write_application_tag (wStream *s, BYTE tag, size_t length)
 
BOOL ber_read_contextual_tag (wStream *s, BYTE tag, size_t *length, BOOL pc)
 
size_t ber_write_contextual_tag (wStream *s, BYTE tag, size_t length, BOOL pc)
 
size_t ber_sizeof_contextual_tag (size_t length)
 
BOOL ber_read_sequence_tag (wStream *s, size_t *length)
 
size_t ber_write_sequence_tag (wStream *s, size_t length)
 
size_t ber_sizeof_sequence (size_t length)
 
size_t ber_sizeof_sequence_tag (size_t length)
 
BOOL ber_read_enumerated (wStream *s, BYTE *enumerated, BYTE count)
 
void ber_write_enumerated (wStream *s, BYTE enumerated, BYTE count)
 
BOOL ber_read_bit_string (wStream *s, size_t *length, BYTE *padding)
 
size_t ber_write_octet_string (wStream *s, const BYTE *oct_str, size_t length)
 
BOOL ber_read_octet_string_tag (wStream *s, size_t *length)
 
size_t ber_write_octet_string_tag (wStream *s, size_t length)
 
size_t ber_sizeof_octet_string (size_t length)
 
BOOL ber_read_BOOL (wStream *s, BOOL *value)
 
void ber_write_BOOL (wStream *s, BOOL value)
 
BOOL ber_read_integer (wStream *s, UINT32 *value)
 
size_t ber_write_integer (wStream *s, UINT32 value)
 
size_t ber_sizeof_integer (UINT32 value)
 
BOOL ber_read_integer_length (wStream *s, size_t *length)
 

Macro Definition Documentation

#define TAG   FREERDP_TAG("crypto")

FreeRDP: A Remote Desktop Protocol Implementation ASN.1 Basic Encoding Rules (BER)

Copyright 2011-2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

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.

Function Documentation

size_t _ber_sizeof_length ( size_t  length)

Here is the caller graph for this function:

BOOL ber_read_application_tag ( wStream *  s,
BYTE  tag,
size_t *  length 
)

Read BER Application tag.

Parameters
sstream
tagBER application-defined tag
lengthlength

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_bit_string ( wStream *  s,
size_t *  length,
BYTE padding 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_BOOL ( wStream *  s,
BOOL *  value 
)

Read a BER BOOLEAN

Parameters
s
value

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_contextual_tag ( wStream *  s,
BYTE  tag,
size_t *  length,
BOOL  pc 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_enumerated ( wStream *  s,
BYTE enumerated,
BYTE  count 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_integer ( wStream *  s,
UINT32 value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_integer_length ( wStream *  s,
size_t *  length 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_length ( wStream *  s,
size_t *  length 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_octet_string_tag ( wStream *  s,
size_t *  length 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_sequence_tag ( wStream *  s,
size_t *  length 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ber_read_universal_tag ( wStream *  s,
BYTE  tag,
BOOL  pc 
)

Read BER Universal tag.

Parameters
sstream
tagBER universally-defined tag
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_sizeof_contextual_tag ( size_t  length)

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_sizeof_integer ( UINT32  value)

Here is the caller graph for this function:

size_t ber_sizeof_octet_string ( size_t  length)

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_sizeof_sequence ( size_t  length)

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_sizeof_sequence_tag ( size_t  length)

Here is the call graph for this function:

Here is the caller graph for this function:

void ber_write_application_tag ( wStream *  s,
BYTE  tag,
size_t  length 
)

Write BER Application tag.

Parameters
sstream
tagBER application-defined tag
lengthlength

Here is the call graph for this function:

Here is the caller graph for this function:

void ber_write_BOOL ( wStream *  s,
BOOL  value 
)

Write a BER BOOLEAN

Parameters
s
value

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_write_contextual_tag ( wStream *  s,
BYTE  tag,
size_t  length,
BOOL  pc 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ber_write_enumerated ( wStream *  s,
BYTE  enumerated,
BYTE  count 
)

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_write_integer ( wStream *  s,
UINT32  value 
)

Write a BER INTEGER

Parameters
s
value

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_write_length ( wStream *  s,
size_t  length 
)

Write BER length.

Parameters
sstream
lengthlength

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_write_octet_string ( wStream *  s,
const BYTE oct_str,
size_t  length 
)

Write a BER OCTET_STRING

Parameters
sstream
oct_stroctet string
lengthstring length

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_write_octet_string_tag ( wStream *  s,
size_t  length 
)

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_write_sequence_tag ( wStream *  s,
size_t  length 
)

Write BER SEQUENCE tag.

Parameters
sstream
lengthlength

Here is the call graph for this function:

Here is the caller graph for this function:

size_t ber_write_universal_tag ( wStream *  s,
BYTE  tag,
BOOL  pc 
)

Write BER Universal tag.

Parameters
sstream
tagBER universally-defined tag
pcprimitive (FALSE) or constructed (TRUE)

Here is the call graph for this function:

Here is the caller graph for this function: