After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684446 - vapi for OpenSSL
vapi for OpenSSL
Status: RESOLVED WONTFIX
Product: vala
Classification: Core
Component: Bindings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-20 09:30 UTC by Stefano Debenedetti
Modified: 2017-04-23 20:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vapi for OpenSSL library (5.05 KB, text/x-vala)
2012-09-20 09:30 UTC, Stefano Debenedetti
Details
Test program for OpenSSL vapi: TCP/SSL client not using OpenSSL BIO API. (1.86 KB, text/x-vala)
2012-09-20 09:32 UTC, Stefano Debenedetti
Details
Test program for OpenSSL vapi: TCP/SSL client using OpenSSL BIO API. (4.06 KB, text/x-vala)
2012-09-20 09:32 UTC, Stefano Debenedetti
Details
openssl.vapi starting the EVP api (2.60 KB, application/octet-stream)
2012-09-20 22:43 UTC, shawnmferris
Details
test vala code for the EVP/openssl.vapi (2.04 KB, application/octet-stream)
2012-09-20 22:44 UTC, shawnmferris
Details

Description Stefano Debenedetti 2012-09-20 09:30:35 UTC
Created attachment 224821 [details]
vapi for OpenSSL library

Please find attached a vapi for OpenSSL, I'll post it here in case you or anybody else is willing to help finishing/polishing/committing it.

The SSLException stuff is commented because it was segfaulting IIRC so I got away with error return values. Still, this vapi is enough to get working SSL TCP connections both with and without using the BIO API (see attached test programs).
Comment 1 Stefano Debenedetti 2012-09-20 09:32:15 UTC
Created attachment 224822 [details]
Test program for OpenSSL vapi: TCP/SSL client not using OpenSSL BIO API.
Comment 2 Stefano Debenedetti 2012-09-20 09:32:53 UTC
Created attachment 224823 [details]
Test program for OpenSSL vapi: TCP/SSL client using OpenSSL BIO API.
Comment 3 shawnmferris 2012-09-20 22:40:33 UTC
I'm adding a portion that I started. It's admittedly very rough and is not very vala-ish. It's really just exposing the direct c api as I lack the vision/knowhow to make it more vala-ish directly in the vapi. I'm  attaching an example that does make it a bit more friendly, but pretty static. (not able to exchange ciphers seemlessly, etc)

If someone has some guidance on how they thought it should be structured, I'd be happy to update it.
Comment 4 shawnmferris 2012-09-20 22:43:15 UTC
Created attachment 224877 [details]
openssl.vapi starting the EVP api
Comment 5 shawnmferris 2012-09-20 22:44:08 UTC
Created attachment 224878 [details]
test vala code for the EVP/openssl.vapi
Comment 6 Jürg Billeter 2012-11-11 18:39:51 UTC
(In reply to comment #3)
> I'm adding a portion that I started. It's admittedly very rough and is not very
> vala-ish. It's really just exposing the direct c api as I lack the
> vision/knowhow to make it more vala-ish directly in the vapi. I'm  attaching an
> example that does make it a bit more friendly, but pretty static. (not able to
> exchange ciphers seemlessly, etc)
> 
> If someone has some guidance on how they thought it should be structured, I'd
> be happy to update it.

GLib/GIO already has an object-oriented TLS/SSL API that uses GnuTLS underneath. Is there a reason why you can't use that instead of OpenSSL?
Comment 7 shawnmferris 2012-11-13 03:07:46 UTC
(In reply to comment #6)
> GLib/GIO already has an object-oriented TLS/SSL API that uses GnuTLS
> underneath. Is there a reason why you can't use that instead of OpenSSL?

I'm using it in a project that is also using sqlcipher (http://sqlcipher.net) and openssl(libcrypt) is already a requirement. (it does not support GnuTLS) I actually had used GnuTLS, but didn't care to have both implementations, so spent a bit working on getting libcrypt to work instead.

It's working.. but it feels ugly. I just can't seem to see the right solution though.
Comment 8 Luca Bruno 2014-12-19 14:01:34 UTC
I think a better place for this vapi is https://github.com/nemequ/vala-extra-vapis until it's complete. It will be easier to have updates for that repository than waiting for stricter reviews for inclusion in the vala tree.
Comment 9 Guillaume Poirier-Morency 2017-04-23 20:01:44 UTC
It is included in vala-extra-vapis: https://github.com/nemequ/vala-extra-vapis/pull/49

I'm currently including all the AES-releated work.

If you have more bindings, I'll be happy to include them as well.