The OpenSSL Project is an implementation of the SSL and TLS protocols written in C. It has multiple cipher algorithms (AES, Blowfish, Camellia…), cryptographic hash functions (MD5, SHA-1, SHA-2…) and public-key cryptography support.
It was born in 1998 and today about 66% of internet servers are using OpenSSL.
UPDATE! [10-Feb-2015] OpenSSL last version 1.0.2 is ready on biicode! We created a block track lasote/openssl(v1.0.2).
Remeber, you can switch between v1.0.1 and v1.0.2 just changing the requirements line in biicode.conf file.
→ Keeping your dependencies updated is really important, specially with this kind of projects. Heartbleed bug affected half a million widely trusted websites. It’s proven, it is essential to keep OpenSSL updated. With biicode updating versions is easy. Just change the requirements version in biicode.conf file.
→ Tested on Windows with MinGW and Visual Studio, Linux with gcc and OSx with Clang.
You can use OpenSSL in your C/C++ projects following these steps:
1. Create a new biicode project and a new block
bii init myproject
bii new myuser/myblock
2. Create a main.cpp and paste this example code in it
// The data to be hashed
const unsigned char data = "Hello, world!";
size_t length = sizeof(data);
unsigned char hash[SHA_DIGEST_LENGTH];
SHA1(data, length, hash);
for(int i = 0; i < (SHA_DIGEST_LENGTH/2) - 1; i++)
sprintf(&mdString[i*2], "%02x", (unsigned int)hash[i]);
printf("sha1 digest: %s\n", mdString);
3. Download your dependencies and build your project
bii find # This will find 1.0.1 track, if you want 1.0.2 edit biicode.conf file.
If you want to keep your #includes the traditional way “openssl/sha.h” you can do it editing biicode.conf file and using “include paths” feature. If you want OpenSSL v1.0.2 version there is a v1.0.2 track available in biicode, just specify (v1.0.2):
# Biicode configuration file
lasote/openssl(v1.0.2): 0 # Version of lasote/openssl to require
# This will append **lasote/openssl/include** when find a openssl/*.h include
As you can see, the number of libraries uploaded to biicode is growing fast. Building professional software with a dependency manager involves lots of benefits, and it is now possible with C and C++ with biicode.
OpenSSL has a support section in their site to join, donate to, fund and/or hire members of this fantastic project. We encourage you to collaborate with them.
Hope you enjoy OpenSSL and, as always, we look forward to read what you think. Just click on the sidebar button to try biicode, check our docs, forum and/or Stackoverflow tag for questions and answers.