STM32F7 Ethernet interface for nucleo STM32F767

Embed: (wiki syntax)

« Back to documentation index

oid.h File Reference

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:
oidOID to use
short_nameplace 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:
oidOID to use
cipher_algplace 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:
oidOID to use
grp_idplace 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:
oidOID to use
descplace 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:
oidOID to use
md_algplace 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:
bufbuffer to put representation in
sizesize of the buffer
oidOID 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_idEC group identifier
oidplace to store ASN.1 OID string pointer
olenlength 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_algmessage digest algorithm
oidplace to store ASN.1 OID string pointer
olenlength 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_algPublic key type to look for
oidplace to store ASN.1 OID string pointer
olenlength 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_algmessage digest algorithm
pk_algpublic key algorithm
oidplace to store ASN.1 OID string pointer
olenlength 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:
oidOID to use
pk_algplace 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:
oidOID to use
md_algplace to store message digest algorithm
cipher_algplace 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:
oidOID to use
md_algplace to store message digest algorithm
pk_algplace 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:
oidOID to use
descplace 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:
oidOID to use
ext_typeplace to store the extension type
Returns:
0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND