FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* Set alt names from file in PEM */
Set alt names from file in PEM
Set alt names from file in PEM
int wc_SetAltNames(Cert* cert, const char* file)
{
    int         ret;
    int         derSz;
    byte*       der;
    if (cert == NULL) {
        return BAD_FUNC_ARG;
    }
    der = (byte*)XMALLOC(EIGHTK_BUF, cert->heap, DYNAMIC_TYPE_CERT);
    if (der == NULL) {
        WOLFSSL_MSG("wc_SetAltNames OOF Problem");
        return MEMORY_E;
    }
    derSz = wc_PemCertToDer(file, der, EIGHTK_BUF);
    ret = SetAltNamesFromCert(cert, der, derSz);
    XFREE(der, cert->heap, DYNAMIC_TYPE_CERT);
    return ret;
}
int wc_SetAltNames ( Cert * cert , const char * file ) { int ret ; int derSz ; byte * der ; if ( cert == NULL ) { return BAD_FUNC_ARG ; } der = ( byte * ) XMALLOC ( EIGHTK_BUF , cert -> heap , DYNAMIC_TYPE_CERT ) ; if ( der == NULL ) { WOLFSSL_MSG ( " " ) ; return MEMORY_E ; } derSz = wc_PemCertToDer ( file , der , EIGHTK_BUF ) ; ret = SetAltNamesFromCert ( cert , der , derSz ) ; XFREE ( der , cert -> heap , DYNAMIC_TYPE_CERT ) ; return ret ; }
Set alt names from file in PEM
Set alt names from file in PEM