Hi, Does anyone know why X509_NAME_add_entry_by_txt can not add Email entry? It works fine with openssl 0.9.6x, but when I link it with 0.9.7d, it failed.
I understand official PKI does not recommend Email in subject, but I thought Openssl can handle that. I'd appreciate it if you can shed light on this issue. Thanks, Dr. Lincoln -- test code --- /* * output is * Subject contains invalid field/value: * Email/[EMAIL PROTECTED] */ #include <string.h> #include <openssl/ssl.h> #include <stdio.h> #include <stdlib.h> int main(){ X509_NAME *name = X509_NAME_new(); char *field = "Email"; char *value = "[EMAIL PROTECTED]"; if (!X509_NAME_add_entry_by_txt(name, field, V_ASN1_PRINTABLESTRING, (unsigned char *)value, -1, -1, 0)){ printf("Subject contains invalid field/value: %s/%s\n", field, value); return 0; } return 0; } __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]