Generate the standard BER encoding of an Object Identifier (OID).
The valud in pOID should use a dotted notation. LImitation: any one number in an OID can not be larger than 2,097,151. The length of any OID is limited by the limits defined by the encodeLength function above.
- Parameters
-
pBuffer | [ in out ] array of bytes to build an ASN.1 encoded message |
bufSize | [ in ] size in octets (i.e., bytes) of pBuffer |
index | [ in ] current offset into pBuffer, that is, the next free byte to write into [ out ] As the OID is encoded in pBuffer this index value increases in value |
pOID | [ in ] a narrow string representing the Object Identifier (e.g., 2.6.6.247.1 ) |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R::eInvalidArg | Either pBuffer of pOID is NULL. |
P6R::eFormatError | String pointed to by pOID is not in the dotted notation. |
errors from encodeLength() | This function calls encodeLength. |
P6R::eTooBig | Cannot properly encode the OID string since one number is larger than 2,097,151. |
P6R::eInternalError | Failed to properly encode the pOID string in BER. |