FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* Set AKID from certificate file in PEM */
Set AKID from certificate file in PEM
Set AKID from certificate file in PEM
int wc_SetAuthKeyId(Cert *cert, const char* file)
{
    int         ret;
    int         derSz;
    byte*       der;
    if (cert == NULL || file == NULL)
        return BAD_FUNC_ARG;
    der = (byte*)XMALLOC(EIGHTK_BUF, cert->heap, DYNAMIC_TYPE_CERT);
    if (der == NULL) {
        WOLFSSL_MSG("wc_SetAuthKeyId OOF Problem");
        return MEMORY_E;
    }
    derSz = wc_PemCertToDer(file, der, EIGHTK_BUF);
    if (derSz <= 0)
    {
        XFREE(der, cert->heap, DYNAMIC_TYPE_CERT);
        return derSz;
    }
    ret = wc_SetAuthKeyIdFromCert(cert, der, derSz);
    XFREE(der, cert->heap, DYNAMIC_TYPE_CERT);
    return ret;
}
int wc_SetAuthKeyId ( Cert * cert , const char * file ) { int ret ; int derSz ; byte * der ; if ( cert == NULL || file == 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 ) ; if ( derSz <= 0 ) { XFREE ( der , cert -> heap , DYNAMIC_TYPE_CERT ) ; return derSz ; } ret = wc_SetAuthKeyIdFromCert ( cert , der , derSz ) ; XFREE ( der , cert -> heap , DYNAMIC_TYPE_CERT ) ; return ret ; }
Set AKID from certificate file in PEM
Set AKID from certificate file in PEM