mbedtls ported to mbed-classic
Fork of mbedtls by
oid.h File Reference
Object Identifier (OID) database. More...
Go to the source code of this file.
Data Structures | |
struct | mbedtls_oid_descriptor_t |
Base OID descriptor structure. More... | |
Functions | |
int | mbedtls_oid_get_numeric_string (char *buf, size_t size, const mbedtls_asn1_buf *oid) |
Translate an ASN.1 OID into its numeric representation (e.g. | |
int | mbedtls_oid_get_x509_ext_type (const mbedtls_asn1_buf *oid, int *ext_type) |
Translate an X.509 extension OID into local values. | |
int | mbedtls_oid_get_attr_short_name (const mbedtls_asn1_buf *oid, const char **short_name) |
Translate an X.509 attribute type OID into the short name (e.g. | |
int | mbedtls_oid_get_pk_alg (const mbedtls_asn1_buf *oid, mbedtls_pk_type_t *pk_alg) |
Translate PublicKeyAlgorithm OID into pk_type. | |
int | mbedtls_oid_get_oid_by_pk_alg (mbedtls_pk_type_t pk_alg, const char **oid, size_t *olen) |
Translate pk_type into PublicKeyAlgorithm OID. | |
int | mbedtls_oid_get_ec_grp (const mbedtls_asn1_buf *oid, mbedtls_ecp_group_id *grp_id) |
Translate NamedCurve OID into an EC group identifier. | |
int | mbedtls_oid_get_oid_by_ec_grp (mbedtls_ecp_group_id grp_id, const char **oid, size_t *olen) |
Translate EC group identifier into NamedCurve OID. | |
int | mbedtls_oid_get_sig_alg (const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg, mbedtls_pk_type_t *pk_alg) |
Translate SignatureAlgorithm OID into md_type and pk_type. | |
int | mbedtls_oid_get_sig_alg_desc (const mbedtls_asn1_buf *oid, const char **desc) |
Translate SignatureAlgorithm OID into description. | |
int | mbedtls_oid_get_oid_by_sig_alg (mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, const char **oid, size_t *olen) |
Translate md_type and pk_type into SignatureAlgorithm OID. | |
int | mbedtls_oid_get_md_alg (const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg) |
Translate hash algorithm OID into md_type. | |
int | mbedtls_oid_get_extended_key_usage (const mbedtls_asn1_buf *oid, const char **desc) |
Translate Extended Key Usage OID into description. | |
int | mbedtls_oid_get_oid_by_md (mbedtls_md_type_t md_alg, const char **oid, size_t *olen) |
Translate md_type into hash algorithm OID. | |
int | mbedtls_oid_get_cipher_alg (const mbedtls_asn1_buf *oid, mbedtls_cipher_type_t *cipher_alg) |
Translate encryption algorithm OID into cipher_type. | |
int | mbedtls_oid_get_pkcs12_pbe_alg (const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg, mbedtls_cipher_type_t *cipher_alg) |
Translate PKCS#12 PBE algorithm OID into md_type and cipher_type. |
Detailed Description
Object Identifier (OID) database.
Copyright (C) 2006-2015, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0
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.
This file is part of mbed TLS (https://tls.mbed.org)
Definition in file oid.h.
Function Documentation
int mbedtls_oid_get_attr_short_name | ( | const mbedtls_asn1_buf * | oid, |
const char ** | short_name | ||
) |
Translate an X.509 attribute type OID into the short name (e.g.
the OID for an X520 Common Name into "CN")
- Parameters:
-
oid OID to use short_name place to store the string pointer
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_cipher_alg | ( | const mbedtls_asn1_buf * | oid, |
mbedtls_cipher_type_t * | cipher_alg | ||
) |
Translate encryption algorithm OID into cipher_type.
- Parameters:
-
oid OID to use cipher_alg place to store cipher algorithm
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_ec_grp | ( | const mbedtls_asn1_buf * | oid, |
mbedtls_ecp_group_id * | grp_id | ||
) |
Translate NamedCurve OID into an EC group identifier.
- Parameters:
-
oid OID to use grp_id place to store group id
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_extended_key_usage | ( | const mbedtls_asn1_buf * | oid, |
const char ** | desc | ||
) |
Translate Extended Key Usage OID into description.
- Parameters:
-
oid OID to use desc place to store string pointer
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_md_alg | ( | const mbedtls_asn1_buf * | oid, |
mbedtls_md_type_t * | md_alg | ||
) |
Translate hash algorithm OID into md_type.
- Parameters:
-
oid OID to use md_alg place to store message digest algorithm
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_numeric_string | ( | char * | buf, |
size_t | size, | ||
const mbedtls_asn1_buf * | oid | ||
) |
Translate an ASN.1 OID into its numeric representation (e.g.
"\x2A\x86\x48\x86\xF7\x0D" into "1.2.840.113549")
- Parameters:
-
buf buffer to put representation in size size of the buffer oid OID to translate
- Returns:
- Length of the string written (excluding final NULL) or MBEDTLS_ERR_OID_BUF_TOO_SMALL in case of error
int mbedtls_oid_get_oid_by_ec_grp | ( | mbedtls_ecp_group_id | grp_id, |
const char ** | oid, | ||
size_t * | olen | ||
) |
Translate EC group identifier into NamedCurve OID.
- Parameters:
-
grp_id EC group identifier oid place to store ASN.1 OID string pointer olen length of the OID
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_oid_by_md | ( | mbedtls_md_type_t | md_alg, |
const char ** | oid, | ||
size_t * | olen | ||
) |
Translate md_type into hash algorithm OID.
- Parameters:
-
md_alg message digest algorithm oid place to store ASN.1 OID string pointer olen length of the OID
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_oid_by_pk_alg | ( | mbedtls_pk_type_t | pk_alg, |
const char ** | oid, | ||
size_t * | olen | ||
) |
Translate pk_type into PublicKeyAlgorithm OID.
- Parameters:
-
pk_alg Public key type to look for oid place to store ASN.1 OID string pointer olen length of the OID
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_oid_by_sig_alg | ( | mbedtls_pk_type_t | pk_alg, |
mbedtls_md_type_t | md_alg, | ||
const char ** | oid, | ||
size_t * | olen | ||
) |
Translate md_type and pk_type into SignatureAlgorithm OID.
- Parameters:
-
md_alg message digest algorithm pk_alg public key algorithm oid place to store ASN.1 OID string pointer olen length of the OID
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_pk_alg | ( | const mbedtls_asn1_buf * | oid, |
mbedtls_pk_type_t * | pk_alg | ||
) |
Translate PublicKeyAlgorithm OID into pk_type.
- Parameters:
-
oid OID to use pk_alg place to store public key algorithm
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_pkcs12_pbe_alg | ( | const mbedtls_asn1_buf * | oid, |
mbedtls_md_type_t * | md_alg, | ||
mbedtls_cipher_type_t * | cipher_alg | ||
) |
Translate PKCS#12 PBE algorithm OID into md_type and cipher_type.
- Parameters:
-
oid OID to use md_alg place to store message digest algorithm cipher_alg place to store cipher algorithm
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_sig_alg | ( | const mbedtls_asn1_buf * | oid, |
mbedtls_md_type_t * | md_alg, | ||
mbedtls_pk_type_t * | pk_alg | ||
) |
Translate SignatureAlgorithm OID into md_type and pk_type.
- Parameters:
-
oid OID to use md_alg place to store message digest algorithm pk_alg place to store public key algorithm
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_sig_alg_desc | ( | const mbedtls_asn1_buf * | oid, |
const char ** | desc | ||
) |
Translate SignatureAlgorithm OID into description.
- Parameters:
-
oid OID to use desc place to store string pointer
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
int mbedtls_oid_get_x509_ext_type | ( | const mbedtls_asn1_buf * | oid, |
int * | ext_type | ||
) |
Translate an X.509 extension OID into local values.
- Parameters:
-
oid OID to use ext_type place to store the extension type
- Returns:
- 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
Generated on Tue Jul 12 2022 12:52:52 by 1.7.2