FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* Get Which Name Encoding from index */
Get Which Name Encoding from index
Get Which Name Encoding from index
static char GetNameType(CertName* name, int idx)
{
    switch (idx) {
    case 0:
       return name->countryEnc;
    case 1:
       return name->stateEnc;
    case 2:
       return name->localityEnc;
    case 3:
       return name->surEnc;
    case 4:
       return name->orgEnc;
    case 5:
       return name->unitEnc;
    case 6:
       return name->commonNameEnc;
    case 7:
       return name->serialDevEnc;
#ifdef WOLFSSL_CERT_EXT
    case 8:
       return name->busCatEnc;
    case 9:
#else
    case 8:
#endif
    default:
       return 0;
    }
}
static char GetNameType ( CertName * name , int idx ) { switch ( idx ) { case 0 : return name -> countryEnc ; case 1 : return name -> stateEnc ; case 2 : return name -> localityEnc ; case 3 : return name -> surEnc ; case 4 : return name -> orgEnc ; case 5 : return name -> unitEnc ; case 6 : return name -> commonNameEnc ; case 7 : return name -> serialDevEnc ; #ifdef WOLFSSL_CERT_EXT case 8 : return name -> busCatEnc ; case 9 : #else case 8 : #endif default : return 0 ; } }
Get Which Name Encoding from index
Get Which Name Encoding from index
/* FALL THROUGH */ /* The last index, email name, does not have encoding type.
           The empty case here is to keep track of it for future reference. */