Ferada / cl-cffi-gtk

#cl-cffi-gtk on Freenode. A Lisp binding to GTK+3. SBCL/CCL/ABCL (ECL/CLISP unstable)
http://www.crategus.com/books/cl-cffi-gtk
41 stars 8 forks source link

GIO TLS missing #37

Closed Ambrevar closed 4 years ago

Ambrevar commented 4 years ago

Working with cl-webkit, I need to register GTlsCertificateFlags to receive the load-failed-with-tls-errors signal. Sadly cl-cffi-gtk does not have it.

I've registered it this way:

(define-g-flags "GTlsCertificateFlags" g-tls-certificate-flags
  (:export t
   :type-initializer "g_tls_client_connection_get_validation_flags")
  (:g-tls-certificate-unknown-ca 1)
  (:g-tls-certificate-bad-identity 2)
  (:g-tls-certificate-not-activated 4)
  (:g-tls-certificate-expired 8)
  (:g-tls-certificate-revoked 16)
  (:g-tls-certificate-insecure 32)
  (:g-tls-certificate-generic-error 64)
  (:g-tls-certificate-validate-all 128))

Can we add it to cl-cffi-gtk?

Ferada commented 4 years ago

PR? Otherwise yes, I'll make the change.

Ambrevar commented 4 years ago

While it works, it gives me this on compilation:

--8<---------------cut here---------------start------------->8--- (sbcl:22555): GLib-GIO-CRITICAL **: 11:32:44.278: g_tls_client_connection_get_validation_flags: assertion 'G_IS_TLS_CLIENT_CONNECTION (conn)' failed --8<---------------cut here---------------end--------------->8---

I guess I'm not doing it right with g_tls_client_connection_get_validation_flags. Maybe me sheer ignorance. Any clue what could be wrong?

Ferada commented 4 years ago

Try https://github.com/Ferada/cl-cffi-gtk/pull/38 please, I think that's the right naming there. Do you already require more of the flags or other definitions from that area?

Ambrevar commented 4 years ago

It works, thanks! Feel free to merge!