--- GLIB-CLEAN/glib2.0-2.30.0/debian/libglib2.0-0.symbols	2011-10-06 17:07:31.000000000 +0200
+++ GLIB-PATCHED/glib2.0-2.30.0/debian/libglib2.0-0.symbols	2012-02-28 14:49:56.381927653 +0100
@@ -1372,6 +1372,7 @@
  g_tls_rehandshake_mode_get_type@Base 2.28.0
  g_tls_server_connection_get_type@Base 2.28.0
  g_tls_server_connection_new@Base 2.28.0
+ g_tls_server_connection_emit_received_server_identity@Base 2.30.0
  g_unix_connection_get_type@Base 2.22.0
  g_unix_connection_receive_credentials@Base 2.26.0
  g_unix_connection_receive_fd@Base 2.22.0
--- GLIB-CLEAN/glib2.0-2.30.0/gio/gtlsserverconnection.c	2011-09-09 21:58:10.000000000 +0200
+++ GLIB-PATCHED/glib2.0-2.30.0/gio/gtlsserverconnection.c	2012-02-28 14:51:30.450394115 +0100
@@ -42,6 +42,14 @@
 
 G_DEFINE_INTERFACE (GTlsServerConnection, g_tls_server_connection, G_TYPE_TLS_CONNECTION)
 
+enum {
+  RECEIVED_SERVER_IDENTITY,
+
+  LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
 static void
 g_tls_server_connection_default_init (GTlsServerConnectionInterface *iface)
 {
@@ -62,6 +70,40 @@
 							  G_TLS_AUTHENTICATION_NONE,
 							  G_PARAM_READWRITE |
 							  G_PARAM_STATIC_STRINGS));
+
+
+ /**
+   * GTlsServerConnection::received-server-identity:
+   * @conn: a #GTlsServerConnection
+   * @identity: server name requested by client or %NULL if there was no identity
+   *
+   * Emitted during the TLS handshake if client uses Server Name Indication 
+   * extension to the TLS protocol.
+   *
+   * It allows to read what servers's hostname is expected by the client and
+   * to send an appropriate certificate in reply.
+   *
+   * To change the certificate to match the requested server name just call 
+   * g_tls_connection_set_certificate() in the signal handler.
+   *
+   * Do not free @identity.
+   *
+   * Return value: %TRUE to accept @identity requested by client (which 
+   * will also immediately end the signal emission). %FALSE to allow the
+   * signal emission to continue, which will cause the handshake to fail 
+   * if no one else overrides it.
+   *
+   * Since: [???]
+   */
+  signals[RECEIVED_SERVER_IDENTITY] =
+    g_signal_new (I_("received-server-identity"),
+		  G_TYPE_TLS_SERVER_CONNECTION,
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (GTlsServerConnectionInterface, received_server_identity),
+		  g_signal_accumulator_true_handled, NULL,
+		  NULL,
+		  G_TYPE_BOOLEAN, 1,
+		  G_TYPE_STRING);
 }
 
 /**
@@ -93,3 +135,27 @@
 			 NULL);
   return G_IO_STREAM (conn);
 }
+
+/**
+ * g_tls_server_connection_emit_received_server_identity:
+ * @conn: a #GTlsServerConnection
+ * @identity: server name requested by client or %NULL if there was no identity
+ *
+ * Used by #GTlsServerConnection implementations to emit the
+ * #GTlsServerConnection::received-server-identity signal.
+ *
+ * Return value: %TRUE if one of the signal handlers has returned
+ *     %TRUE to accept @identity
+ *
+ * Since: [???]
+ */
+gboolean
+g_tls_server_connection_emit_received_server_identity (GTlsConnection       *conn,
+					  gchar      *identity)
+{
+  gboolean accept = FALSE;
+
+  g_signal_emit (conn, signals[RECEIVED_SERVER_IDENTITY], 0,
+		 identity, &accept);
+  return accept;
+}
--- GLIB-CLEAN/glib2.0-2.30.0/gio/gtlsserverconnection.h	2011-09-09 21:58:10.000000000 +0200
+++ GLIB-PATCHED/glib2.0-2.30.0/gio/gtlsserverconnection.h	2012-02-28 14:51:47.194477148 +0100
@@ -48,6 +48,10 @@
 {
   GTypeInterface g_iface;
 
+  /* signals */
+  gboolean          ( *received_server_identity) (GTlsConnection       *connection,
+					        gchar      *identity);
+
 };
 
 GType                 g_tls_server_connection_get_type                 (void) G_GNUC_CONST;
@@ -56,6 +60,10 @@
 									GTlsCertificate  *certificate,
 									GError          **error);
 
+/*< protected >*/
+gboolean              g_tls_server_connection_emit_received_server_identity (GTlsConnection       *conn,
+					        gchar      *identity);
+
 G_END_DECLS
 
 #endif /* __G_TLS_SERVER_CONNECTION_H__ */
--- GLIB-CLEAN/glib2.0-2.30.0/debian/changelog	2011-10-06 17:07:31.000000000 +0200
+++ GLIB-PATCHED/glib2.0-2.30.90/debian/changelog	2012-02-29 10:51:33.963440264 +0100
@@ -1,3 +1,9 @@
+glib2.0 (2.30.90-0ubuntu5) oneiric; urgency=low
+
+  * Patched GTlsServerConnection - added received-server-identity signal
+
+ -- Marcin Lewandowski <marcin.lewandowski@svada.pl>  Wed, 29 Feb 2012 10:50:57 +0100
+
 glib2.0 (2.30.0-0ubuntu4) oneiric; urgency=low
 
   [ Rodney Dawes ]
--- GLIB-CLEAN/glib2.0-2.30.0/configure.ac	2011-09-26 23:15:32.000000000 +0200
+++ GLIB-PATCHED/glib2.0-2.30.90/configure.ac	2012-02-29 10:54:14.604236912 +0100
@@ -27,7 +27,7 @@
 
 m4_define([glib_major_version], [2])
 m4_define([glib_minor_version], [30])
-m4_define([glib_micro_version], [0])
+m4_define([glib_micro_version], [90])
 m4_define([glib_interface_age], [0])
 m4_define([glib_binary_age],
           [m4_eval(100 * glib_minor_version + glib_micro_version)])
