I just fixed an interesting problem I was having with OpenSSL-0.9.8a running with the wcecompat-1.2 library on WinCE5.0.
I have multiple CA certs in a cert directory hashed by the c_rehash
function. The CA certs are in a hierarchy 2 levels deep. My
app (wpa_supplicant) is running as a client. When wpa_supplicant
receives a server certificate from the authentication server,
SSL_connect would return an error (curiously, this problem does not
occur if the CA hierarchy is only 1 level deep) . Using
ERR_get_error_line_data, I see the following error data:
0:19.000 file=c:\sslbuild-latest\openssl-0.9.8a\crypto\bio\bss_file.c
line=349 data="" flags=0x3
But I don't have any CA files that end with ".1", only ".0". Then
I looked at crypto/x509/by_dir.c:line337 and saw that the last index
was being incremented and then "stat" was called to check if the file
existed before trying to open the file.
But in wcecompat/src/stat.cpp, the body of the stat function has a
giant "ifdef 0" around it, and this function would return success
everytime. I took out the "ifdef 0" and the function still
compiles and now my app works as expected.
Haven't checked over the entire OpenSSL source tree to see where else this stat issue would pop up.
Hi Steven, if you are monitoring this, what do you think about taking that ifdef 0 out of the stat function?
Thanks,
Michael
- Unimplemented stat function in wcecompat-1.2 causes ... Michael Wang
- RE: Unimplemented stat function in wcecompat-1.... Daniel Díaz Sánchez
- Re: Unimplemented stat function in wcecompa... Michael Wang
- Enabling SSL Authentication With Apache... Thomas George