The following code fails on Windows but works perfectly on Solaris.
The failure is PEM_read_bio_X509 return null. FYI, I am trying to avoid
buffered I/O (FILE *) and hence i am using low-level file operation.
Please help.
Vijay
BIO *data;
char buf[1024*4];
memset(buf, 0
Here
is my code snippet:
int fd;
BIO *bio;
fd = open(file, "r" );
bio = BIO_new(BIO_s_fd()
);
BIO_set_fd(bio,fd,
BIO_NOCLOSE);
X509 *x=null;
x= PEM_read_bio_X509(data,
NULL,ctx->default_password_callback,
ctx->default_password_callback_userdata);
PEM_read_bio_X