ui: Use GcrSecretExchange for passing passwords to/from prompt
authorStef Walter <stefw@collabora.co.uk>
Sat, 1 Oct 2011 11:07:38 +0000 (13:07 +0200)
committerStef Walter <stefw@collabora.co.uk>
Sat, 1 Oct 2011 11:07:38 +0000 (13:07 +0200)
 * And integrate this with our credential stuff inside of the
   dbus secret service prompts
 * Fix a bug in GcrSecretService if key already derived, and data
   is received.

egg/Makefile.am
gcr/gcr-secret-exchange.c

index d01028a..0b635d0 100644 (file)
@@ -15,7 +15,7 @@ BUILT_SOURCES = \
        asn1-def-pk.c asn1-def-pkix.c
 
 INCLUDES = \
-       -I$(top_srcdir)
+       -I$(top_srcdir) \
        -I$(top_builddir)
 
 libegg_la_CFLAGS = \
index 6f6d5c6..5f99def 100644 (file)
@@ -296,8 +296,8 @@ gcr_secret_exchange_begin (GcrSecretExchange *self)
 }
 
 static gboolean
-calculate_key (GcrSecretExchange *self,
-               GKeyFile *input)
+derive_key (GcrSecretExchange *self,
+            GKeyFile *input)
 {
        GcrSecretExchangeClass *klass;
        gboolean ret;
@@ -408,8 +408,10 @@ gcr_secret_exchange_receive (GcrSecretExchange *self,
                self->pv->generated = TRUE;
        }
 
-       if (!calculate_key (self, input))
-               return FALSE;
+       if (!self->pv->derived) {
+               if (!derive_key (self, input))
+                       return FALSE;
+       }
 
        ret = TRUE;