summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
Diffstat (limited to 'gio')
-rw-r--r--gio/src/gio_vfuncs.defs11
-rw-r--r--gio/src/tlscertificate.hg6
2 files changed, 16 insertions, 1 deletions
diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs
index f9a011ec..1917d6c2 100644
--- a/gio/src/gio_vfuncs.defs
+++ b/gio/src/gio_vfuncs.defs
@@ -725,6 +725,17 @@
)
)
+; GTlsCertificate
+
+(define-vfunc verify
+ (of-object "GTlsCertificate")
+ (return-type "GTlsCertificateFlags")
+ (parameters
+ '("GSocketConnectable*" "identity")
+ '("GTlsCertificate*" "trusted_ca")
+ )
+)
+
; GTlsConnection
(define-vfunc handshake
diff --git a/gio/src/tlscertificate.hg b/gio/src/tlscertificate.hg
index a1ff3684..ec3b292a 100644
--- a/gio/src/tlscertificate.hg
+++ b/gio/src/tlscertificate.hg
@@ -46,7 +46,7 @@ class TlsCertificate : public Glib::Object
_CLASS_GOBJECT(TlsCertificate, GTlsCertificate, G_TLS_CERTIFICATE, Glib::Object, GObject)
protected:
- _WRAP_CTOR(TlsCertificate(const char* data, gssize length), g_tls_certificate_new_from_pem, errthrow)
+ _WRAP_CTOR(TlsCertificate(const char* data, gssize length = -1), g_tls_certificate_new_from_pem, errthrow)
_WRAP_CTOR(TlsCertificate(const std::string& file), g_tls_certificate_new_from_file, errthrow)
_WRAP_CTOR(TlsCertificate(const std::string& cert_file, const std::string& key_file), g_tls_certificate_new_from_files, errthrow)
@@ -78,6 +78,10 @@ public:
// Write-only and construct-only
//_WRAP_PROPERTY("private-key-pem", char*)
+
+#m4 _CONVERSION(`GSocketConnectable*',`const Glib::RefPtr<const SocketConnectable>&',`Glib::wrap($3, true)')
+#m4 _CONVERSION(`GTlsCertificate*',`const Glib::RefPtr<const TlsCertificate>&',`Glib::wrap($3, true)')
+ _WRAP_VFUNC(TlsCertificateFlags verify(const Glib::RefPtr<const SocketConnectable>& identity, const Glib::RefPtr<const TlsCertificate>& trusted_ca) const, "verify")
};
} // namespace Gio