~noskcaj/ubuntu/vivid/gnome-keyring/3.15.90

« back to all changes in this revision

Viewing changes to pkcs11/gnome2-store/gkm-gnome2-private-key.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-14 22:13:02 UTC
  • mfrom: (1.3.1)
  • mto: (80.2.8 experimental) (1.1.77)
  • mto: This revision was merged to the branch mainline in revision 148.
  • Revision ID: package-import@ubuntu.com-20120514221302-0l3gjmqpe6xopond
ImportĀ upstreamĀ versionĀ 3.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
293
293
gkm_gnome2_private_key_real_save (GkmSerializable *base, GkmSecret *login, gpointer *data, gsize *n_data)
294
294
{
295
295
        GkmGnome2PrivateKey *self = GKM_GNOME2_PRIVATE_KEY (base);
296
 
        const gchar *password;
 
296
        const gchar *password = NULL;
297
297
        gsize n_password;
298
298
        GkmSexp *sexp;
299
299
        guchar *key;
305
305
        sexp = gkm_gnome2_private_key_real_acquire_crypto_sexp (GKM_SEXP_KEY (self), NULL);
306
306
        g_return_val_if_fail (sexp, FALSE);
307
307
 
308
 
        password = gkm_secret_get_password (login, &n_password);
 
308
        if (login != NULL)
 
309
                password = gkm_secret_get_password (login, &n_password);
309
310
        if (password == NULL) {
310
311
                key = gkm_data_der_write_private_pkcs8_plain (gkm_sexp_get (sexp), n_data);
311
312