DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

1 1

Why I am unable to verify the downloaded google's certificate in my C programm?

I attempt to verify an openssl certificate in a windows app that uses winsock2:

I downloaded the google's certificate in linux (I am using mingw for cross compilation and wine for execution):

mkdir -p ./release/certificates
echo | openssl s_client -servername google.com -connect google.com:443| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > google.crt

And I attempt to verify it in my programm:

#define _WINSOCK_DEPRECATED_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#include

But I fail to do so. What I try to do is to ship certificates alongside my app, but it seems it will make me strugle a bit.

Would you mind me to aid me in my problem?

Top comments (1)

Collapse
 
pcmagas profile image
Dimitrios Desyllas

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay