Commit 0feef3d6 authored by Bastien Durel's avatar Bastien Durel
Browse files

bug reproducted

parent b6835ce4
......@@ -4,26 +4,34 @@
using namespace std;
const GTlsCertificateFlags FLAGS = (GTlsCertificateFlags)
(G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_BAD_IDENTITY);
const GTlsCertificateFlags FLAGS = (GTlsCertificateFlags)G_TLS_CERTIFICATE_VALIDATE_ALL;
// (G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_BAD_IDENTITY);
GMainLoop *loop;
void callback (GObject *source_object, GAsyncResult *res, gpointer user_data) {
cout << "GAsyncReadyCallback called: " << res << endl;
g_main_loop_quit (loop);
}
int main() {
cout << "start" << endl;
loop = g_main_loop_new ( NULL , FALSE );
GError *err = 0;
GSocketClient *client = g_socket_client_new ();
cout << "client: " << client << endl;
g_socket_client_set_tls (client, true);
g_socket_client_set_tls_validation_flags (client, FLAGS);
GSocketConnection * cnx = g_socket_client_connect_to_host
(client, "arrakeen.geekwu.org", 443, NULL, &err);
if (err != NULL) {
cerr << "Unable to connect: " << err->message << endl;
}
cout << "cnx: " << cnx << endl;
g_socket_client_connect_to_host_async
(client, "openid.geekwu.org", 443, NULL,
callback, NULL);
g_main_loop_run (loop);
cout << "OK" << endl;
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment