diff options
-rw-r--r-- | camel/ChangeLog | 8 | ||||
-rw-r--r-- | camel/camel-smime-context.c | 16 |
2 files changed, 11 insertions, 13 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index ee85fe9f8f..be49f88dd1 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,13 @@ 2001-05-15 Jeffrey Stedfast <fejj@ximian.com> + * camel-smime-context.c (camel_smime_context_finalise): Don't + close or free (it wasn't allocated) the certdb. + (camel_smime_context_new): If we get a NULL certdb handle, then + don't bother trying to create a new certdb handle since NSS_Init* + should have done that. + +2001-05-15 Jeffrey Stedfast <fejj@ximian.com> + * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in tons of extra cruft that we don't need. diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c index 4b290ee139..8fa1a6cec3 100644 --- a/camel/camel-smime-context.c +++ b/camel/camel-smime-context.c @@ -76,9 +76,6 @@ camel_smime_context_finalise (CamelObject *o) { CamelSMimeContext *context = (CamelSMimeContext *)o; - CERT_ClosePermCertDB (context->priv->certdb); - g_free (context->priv->certdb); - g_free (context->priv); } @@ -141,16 +138,9 @@ camel_smime_context_new (CamelSession *session, const char *certdb) camel_cipher_context_construct (CAMEL_CIPHER_CONTEXT (context), session); handle = CERT_CertGetDefaultCertDBHandle (); - if (certdb) { - if (!CERT_OpenCertDBFilename (handle, (char *) certdb, FALSE)) { - g_free (handle); - return NULL; - } - } else { - if (!CERT_OpenVolatileCertDB (handle)) { - g_free (handle); - return NULL; - } + if (!certdb) { + camel_object_unref (CAMEL_OBJECT (context)); + return NULL; } context->priv->certdb = handle; |