Webserver+3d print
oid.c File Reference
OID (Object Identifier) More...
Go to the source code of this file.
Functions | |
error_t | oidCheck (const uint8_t *oid, size_t oidLen) |
Check whether the specified object identifier is valid. | |
int_t | oidComp (const uint8_t *oid1, size_t oidLen1, const uint8_t *oid2, size_t oidLen2) |
Compare object identifiers. | |
error_t | oidEncodeSubIdentifier (uint8_t *oid, size_t maxOidLen, size_t *pos, uint32_t value) |
Encode OID sub-identifier. | |
error_t | oidDecodeSubIdentifier (const uint8_t *oid, size_t oidLen, size_t *pos, uint32_t *value) |
Decode OID sub-identifier. | |
error_t | oidFromString (const char_t *str, uint8_t *oid, size_t maxOidLen, size_t *oidLen) |
Convert a string representation of an OID to a binary OID. | |
char_t * | oidToString (const uint8_t *oid, size_t oidLen, char_t *str, size_t maxStrLen) |
Convert a binary OID to a string representation. |
Detailed Description
OID (Object Identifier)
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCrypto Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version:
- 1.7.6
Definition in file oid.c.
Function Documentation
error_t oidCheck | ( | const uint8_t * | oid, |
size_t | oidLen | ||
) |
int_t oidComp | ( | const uint8_t * | oid1, |
size_t | oidLen1, | ||
const uint8_t * | oid2, | ||
size_t | oidLen2 | ||
) |
Compare object identifiers.
- Parameters:
-
[in] oid1 Pointer the first OID [in] oidLen1 Length of the first OID, in bytes [in] oid2 Pointer the second OID [in] oidLen2 Length of the second OID, in bytes
- Returns:
- Comparison result
- Return values:
-
0 Objects identifiers are equal -1 The first OID lexicographically precedes the second OID 1 The second OID lexicographically precedes the first OID
error_t oidDecodeSubIdentifier | ( | const uint8_t * | oid, |
size_t | oidLen, | ||
size_t * | pos, | ||
uint32_t * | value | ||
) |
error_t oidEncodeSubIdentifier | ( | uint8_t * | oid, |
size_t | maxOidLen, | ||
size_t * | pos, | ||
uint32_t | value | ||
) |
error_t oidFromString | ( | const char_t * | str, |
uint8_t * | oid, | ||
size_t | maxOidLen, | ||
size_t * | oidLen | ||
) |
Convert a string representation of an OID to a binary OID.
- Parameters:
-
[in] str NULL-terminated string representing the OID [out] oid Object identifier [in] maxOidLen Maximum number of bytes the OID can hold [out] oidLen Length of the object identifier
- Returns:
- Error code
char_t* oidToString | ( | const uint8_t * | oid, |
size_t | oidLen, | ||
char_t * | str, | ||
size_t | maxStrLen | ||
) |
Convert a binary OID to a string representation.
- Parameters:
-
[in] oid Object identifier [in] oidLen Length of the object identifier, in bytes [out] str NULL-terminated string representing the OID [in] maxStrLen Maximum length of the resulting string
- Returns:
- Pointer to the formatted string
Generated on Tue Jul 12 2022 17:10:21 by
