I think it may relates below note
wolfSSL takes a different approach to certificate verification than OpenSSL
does. The default policy for the client is to verify the server, this means
that if you don't load CAs to verify the server you'll get a connect error,
no signer error to confirm failure (-188). If you want to mimic OpenSSL
behavior of having SSL_connect succeed even if verifying the server fails and
reducing security you can do this by calling:wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
before calling wolfSSL_new(); Though it's not recommended.
Could anyone confirm this?
if the failure relates the note, Is it possible to provide wolfSSL_X509_STORE_CTX_set_verify also.. or something like that..
Even so, it does not make sense that the well-executed code does not execute after changing the subject's OU in certificate.