Move to new OpenSSL 1.0.2 API.

@pphaneuf 
Maybe add the "int" to the "unsigned"?