1 // SPDX-License-Identifier: BSD-2-Clause
2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3  *
4  * LibTomCrypt is a library that provides various cryptographic
5  * algorithms in a highly modular and flexible manner.
6  *
7  * The library is free for all purposes without any express
8  * guarantee it works.
9  */
10 
11 #include "tomcrypt_private.h"
12 
13 #ifdef LTC_MECC
14 
15 /** Extract OID as a string from ECC key
16   @param out    [out] destination buffer
17   @param outlen [in/out] Length of destination buffer and final output size (without terminating NUL byte)
18   @param key    The ECC key
19   Return        CRYPT_OK on success
20 */
21 
ecc_get_oid_str(char * out,unsigned long * outlen,const ecc_key * key)22 int ecc_get_oid_str(char *out, unsigned long *outlen, const ecc_key *key)
23 {
24    LTC_ARGCHK(key != NULL);
25 
26    return pk_oid_num_to_str(key->dp.oid, key->dp.oidlen, out, outlen);
27 }
28 
29 #endif
30 
31 /* ref:         $Format:%D$ */
32 /* git commit:  $Format:%H$ */
33 /* commit time: $Format:%ai$ */
34