FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* Make an x509 Certificate v3 RSA or ECC from cert input, write to buffer */
Make an x509 Certificate v3 RSA or ECC from cert input, write to buffer
Make an x509 Certificate v3 RSA or ECC from cert input write to buffer
int wc_MakeCert_ex(Cert* cert, byte* derBuffer, word32 derSz, int keyType,
                   void* key, WC_RNG* rng)
{
    RsaKey*      rsaKey = NULL;
    ecc_key*     eccKey = NULL;
    ed25519_key* ed25519Key = NULL;
    ed448_key*   ed448Key = NULL;
    if (keyType == RSA_TYPE)
        rsaKey = (RsaKey*)key;
    else if (keyType == ECC_TYPE)
        eccKey = (ecc_key*)key;
    else if (keyType == ED25519_TYPE)
        ed25519Key = (ed25519_key*)key;
    else if (keyType == ED448_TYPE)
        ed448Key = (ed448_key*)key;
    return MakeAnyCert(cert, derBuffer, derSz, rsaKey, eccKey, rng, NULL, 0,
                       ed25519Key, ed448Key);
}
int wc_MakeCert_ex ( Cert * cert , byte * derBuffer , word32 derSz , int keyType , void * key , WC_RNG * rng ) { RsaKey * rsaKey = NULL ; ecc_key * eccKey = NULL ; ed25519_key * ed25519Key = NULL ; ed448_key * ed448Key = NULL ; if ( keyType == RSA_TYPE ) rsaKey = ( RsaKey * ) key ; else if ( keyType == ECC_TYPE ) eccKey = ( ecc_key * ) key ; else if ( keyType == ED25519_TYPE ) ed25519Key = ( ed25519_key * ) key ; else if ( keyType == ED448_TYPE ) ed448Key = ( ed448_key * ) key ; return MakeAnyCert ( cert , derBuffer , derSz , rsaKey , eccKey , rng , NULL , 0 , ed25519Key , ed448Key ) ; }
Make an x509 Certificate v3 RSA or ECC from cert input, write to buffer
Make an x509 Certificate v3 RSA or ECC from cert input write to buffer