nl::Weave::ASN1

This namespace includes all interfaces within Weave for working with Abstract Syntax Notation One (ASN.1).

Summary

Enumerations

@334 enum
ASN1TagClasses enum
ASN1UniversalTags enum

Typedefs

ASN1_ERROR typedef
The basic type for all ASN1 subsystem errors.

Functions

DumpASN1(ASN1Reader & reader, const char *prefix, const char *indent)
FormatASN1Error(char *buf, uint16_t bufSize, int32_t err)
bool
Given an ASN1 error, returns a human-readable NULL-terminated C string describing the error.
GetEncodedObjectID(OID oid, const uint8_t *& encodedOID, uint16_t & encodedOIDLen)
bool
GetOIDCategory(OID oid)
OIDCategory
GetOIDName(OID oid)
const char *
HighestBit(uint32_t v)
uint8_t
ParseObjectID(const uint8_t *encodedOID, uint16_t encodedOIDLen)
OID
ReverseBits(uint8_t v)
uint8_t
ReverseBits(uint8_t v)
uint8_t
itoa2(uint32_t val, uint8_t *buf)
void

Classes

nl::Weave::ASN1::ASN1Reader
nl::Weave::ASN1::ASN1UniversalTime
nl::Weave::ASN1::ASN1Writer

Enumerations

@334

 @334

ASN1TagClasses

 ASN1TagClasses

ASN1UniversalTags

 ASN1UniversalTags

Typedefs

ASN1_ERROR

ASN1_CONFIG_ERROR_TYPE ASN1_ERROR

The basic type for all ASN1 subsystem errors.

This is defined to a platform- or system-specific type.

Functions

DumpASN1

ASN1_ERROR DumpASN1(
  ASN1Reader & reader,
  const char *prefix,
  const char *indent
)

FormatASN1Error

bool FormatASN1Error(
  char *buf,
  uint16_t bufSize,
  int32_t err
)

Given an ASN1 error, returns a human-readable NULL-terminated C string describing the error.

Details
Parameters
[in] buf
Buffer into which the error string will be placed.
[in] bufSize
Size of the supplied buffer in bytes.
[in] err
The error to be described.
Returns
true If a description string was written into the supplied buffer.
Returns
false If the supplied error was not an ASN1 error.

GetEncodedObjectID

bool GetEncodedObjectID(
  OID oid,
  const uint8_t *& encodedOID,
  uint16_t & encodedOIDLen
)

GetOIDCategory

OIDCategory GetOIDCategory(
  OID oid
)

GetOIDName

const char * GetOIDName(
  OID oid
)

HighestBit

uint8_t HighestBit(
  uint32_t v
)

ParseObjectID

OID ParseObjectID(
  const uint8_t *encodedOID,
  uint16_t encodedOIDLen
)

ReverseBits

uint8_t ReverseBits(
  uint8_t v
)

ReverseBits

uint8_t ReverseBits(
  uint8_t v
)

itoa2

void itoa2(
  uint32_t val,
  uint8_t *buf
)