Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use openssl crypto lib headers in C++?

I am trying to test the crypto library that comes with openssl, I downloaded openssl from http://www.openssl.org/source/ and it contains a /crypto folder with subfolders for each encryption type.

I wanted to try BIO_f_base64 so I created an empty console app, and added the includes needed, also added the paths to the /bio and /evp folders to c++ incl directories, and also added the main /openssl folder.

When I try to compile I get Cannot open include file: 'openssl/e_os2.h': No such file or directory

But the file is there, should I use the crypto lib in a different way? How can I use it adding only the /openssl path and not all the crypto subfolders I use?

Also I don't have any .lib files, where can I get them?

like image 507
peterg Avatar asked May 24 '10 15:05

peterg


People also ask

Where are Openssl header files?

If you run make install, then the headers will be installed in /usr/local/openssl-ios/include and libraries will be installed in /usr/local/openssl-ios/lib.

What is Openssl Crypto?

The OpenSSL crypto library ( libcrypto ) implements a wide range of cryptographic algorithms used in various Internet standards. The services provided by this library are used by the OpenSSL implementations of TLS and CMS, and they have also been used to implement many other third party products and protocols.

Where is Openssl include Linux?

The standard location of the development libs is /usr/include/openssl . The only shared objects for openssl are in /usr/lib/i386-linux-gnu/openssl-1.0.


1 Answers

You need a version of the OpenSSL that is built for Windows, not the source release. I recommend installing a version from here, which has some nice installers for .lib files and headers. Once you have it installed you will have to update your VS project with the proper include paths to pick up the headers from where ever the installer put them.

like image 187
Joseph Lisee Avatar answered Sep 21 '22 01:09

Joseph Lisee