mbed TLS library
Dependents: HTTPClient-SSL WS_SERVER
oid.h File Reference
Object Identifier (OID) database. More...
Go to the source code of this file.
Data Structures | |
struct | oid_descriptor_t |
Base OID descriptor structure. More... | |
Functions | |
int | oid_get_numeric_string (char *buf, size_t size, const asn1_buf *oid) |
Translate an ASN.1 OID into its numeric representation (e.g. | |
int | oid_get_x509_ext_type (const asn1_buf *oid, int *ext_type) |
Translate an X.509 extension OID into local values. | |
int | oid_get_attr_short_name (const asn1_buf *oid, const char **short_name) |
Translate an X.509 attribute type OID into the short name (e.g. | |
int | oid_get_pk_alg (const asn1_buf *oid, pk_type_t *pk_alg) |
Translate PublicKeyAlgorithm OID into pk_type. | |
int | oid_get_oid_by_pk_alg (pk_type_t pk_alg, const char **oid, size_t *olen) |
Translate pk_type into PublicKeyAlgorithm OID. | |
int | oid_get_ec_grp (const asn1_buf *oid, ecp_group_id *grp_id) |
Translate NamedCurve OID into an EC group identifier. | |
int | oid_get_oid_by_ec_grp (ecp_group_id grp_id, const char **oid, size_t *olen) |
Translate EC group identifier into NamedCurve OID. | |
int | oid_get_sig_alg (const asn1_buf *oid, md_type_t *md_alg, pk_type_t *pk_alg) |
Translate SignatureAlgorithm OID into md_type and pk_type. | |
int | oid_get_sig_alg_desc (const asn1_buf *oid, const char **desc) |
Translate SignatureAlgorithm OID into description. | |
int | oid_get_oid_by_sig_alg (pk_type_t pk_alg, md_type_t md_alg, const char **oid, size_t *olen) |
Translate md_type and pk_type into SignatureAlgorithm OID. | |
int | oid_get_md_alg (const asn1_buf *oid, md_type_t *md_alg) |
Translate hash algorithm OID into md_type. | |
int | oid_get_extended_key_usage (const asn1_buf *oid, const char **desc) |
Translate Extended Key Usage OID into description. | |
int | oid_get_oid_by_md (md_type_t md_alg, const char **oid, size_t *olen) |
Translate md_type into hash algorithm OID. | |
int | oid_get_cipher_alg (const asn1_buf *oid, cipher_type_t *cipher_alg) |
Translate encryption algorithm OID into cipher_type. | |
int | oid_get_pkcs12_pbe_alg (const asn1_buf *oid, md_type_t *md_alg, 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-2014, ARM Limited, All Rights Reserved
This file is part of mbed TLS (https://tls.mbed.org)
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.
Definition in file oid.h.
Function Documentation
int oid_get_attr_short_name | ( | const 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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_cipher_alg | ( | const asn1_buf * | oid, |
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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_ec_grp | ( | const asn1_buf * | oid, |
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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_extended_key_usage | ( | const 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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_md_alg | ( | const asn1_buf * | oid, |
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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_numeric_string | ( | char * | buf, |
size_t | size, | ||
const 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 POLARSSL_ERR_OID_BUF_TOO_SMALL in case of error
int oid_get_oid_by_ec_grp | ( | 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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_oid_by_md | ( | 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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_oid_by_pk_alg | ( | 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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_oid_by_sig_alg | ( | pk_type_t | pk_alg, |
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 POLARSSL_ERR_OID_NOT_FOUND
Translate PublicKeyAlgorithm OID into pk_type.
- Parameters:
-
oid OID to use pk_alg place to store public key algorithm
- Returns:
- 0 if successful, or POLARSSL_ERR_OID_NOT_FOUND
int oid_get_pkcs12_pbe_alg | ( | const asn1_buf * | oid, |
md_type_t * | md_alg, | ||
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 POLARSSL_ERR_OID_NOT_FOUND
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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_sig_alg_desc | ( | const 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 POLARSSL_ERR_OID_NOT_FOUND
int oid_get_x509_ext_type | ( | const 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 POLARSSL_ERR_OID_NOT_FOUND
Generated on Tue Jul 12 2022 13:50:40 by 1.7.2