Hello, Have query about certificates on-disk size on encoded szie of x509 certificate mismatch.
code snippet:- Status = ReadCertKeyFile ( ); //populates X509Data & X509DataSize by reading ca-int.crt of 0x3C9 bytes on-disk size FYI-ca-int.crt is chained from ca.crt BIOX509 = BIO_new_mem_buf((UINT8*)X509Data, (int)X509DataSize); if (BIOX509 == NULL) return EFI_INVALID_PARAMETER; x509 = PEM_read_bio_X509(BIOX509, NULL, NULL, NULL);// cert is in PEM form if (x509 == NULL) {// If x509 is not NULL then it is assumed that it contains a valid X509 return EFI_INVALID_PARAMETER; } PkCertLen = i2d_X509(x509, NULL); Print(L" 3 X509DataSize 0x%x \n", X509DataSize);//----->0x3C9 Print(L" 3 PkCertLen 0x%x \n", PkCertLen);//--------> 0x2A2 Query- why on-disk size of certificate is 0x3C9 bytes and 'PkCertLen ' is 0x2A2?? Is this size difference is due to encoding? ~Baban