/* LibTomCrypt, modular cryptographic library -- Tom St Denis1*2* LibTomCrypt is a library that provides various cryptographic3* algorithms in a highly modular and flexible manner.4*5* The library is free for all purposes without any express6* guarantee it works.7*/8#include "tomcrypt.h"910#ifdef LTC_DER11static const oid_st rsa_oid = {12{ 1, 2, 840, 113549, 1, 1, 1 },137,14};1516static const oid_st dsa_oid = {17{ 1, 2, 840, 10040, 4, 1 },186,19};2021/*22Returns the OID of the public key algorithm.23@return CRYPT_OK if valid24*/25int pk_get_oid(int pk, oid_st *st)26{27switch (pk) {28case PKA_RSA:29XMEMCPY(st, &rsa_oid, sizeof(*st));30break;31case PKA_DSA:32XMEMCPY(st, &dsa_oid, sizeof(*st));33break;34default:35return CRYPT_INVALID_ARG;36}37return CRYPT_OK;38}39#endif404142