cpw.ljfisher.ssl_client_auth: a468818f: Removed extraneous commented out code.
lucas.fisher at gmail.com
lucas.fisher at gmail.com
Mon Aug 22 23:36:13 EDT 2011
----------------------------------------------------------------------
Revision: a468818f5da4a5e98fd6846a7d0f06914cacae0c
Parent: 886883c6e6adc5cbaaf94637f6e77f31b6779607
Author: lucas.fisher at gmail.com
Date: 08/22/11 23:31:36
Branch: im.pidgin.cpw.ljfisher.ssl_client_auth
URL: http://d.pidgin.im/viewmtn/revision/info/a468818f5da4a5e98fd6846a7d0f06914cacae0c
Changelog:
Removed extraneous commented out code.
Fix keydata ref counting bug.
Changes against parent 886883c6e6adc5cbaaf94637f6e77f31b6779607
patched libpurple/plugins/ssl/ssl-gnutls.c
-------------- next part --------------
============================================================
--- libpurple/plugins/ssl/ssl-gnutls.c bcc0d140dcaa871a6cfafaec029ff0930b5807be
+++ libpurple/plugins/ssl/ssl-gnutls.c 31926ae77ae1f4f7a6611d67f1be801ef7eb7679
@@ -1302,14 +1302,8 @@ x509_import_key(const gchar * filename,
keydat->refcount = 0;
key = g_new0(PurplePrivateKey, 1);
- if (NULL == key) {
- gnutls_x509_privkey_deinit(keydat->key);
- g_free(keydat);
- return NULL;
- }
-
key->scheme = &x509_key_gnutls;
- key->data = keydat;
+ key->data = x509_keydata_addref(keydat);
if (read_pkcs8_file(filename, &dt, &fmt)) {
rv = gnutls_x509_privkey_import_pkcs8(keydat->key, &dt, fmt, password, 0);
@@ -2068,9 +2062,6 @@ x509_export_pkcs12_to_filename(const gch
size += 100;
key_buf = g_new0(char, size);
- if (!key_buf) {
- goto done;
- }
result = gnutls_x509_privkey_export_pkcs8 (key, GNUTLS_X509_FMT_DER,
password, flags, key_buf, &size);
@@ -2137,10 +2128,6 @@ x509_export_pkcs12_to_filename(const gch
}
out_buf = g_new0(char, size);
- if (NULL == out_buf) {
- purple_debug_error("gnutls/pkcs12", "output buf allocation failure\n");
- goto done;
- }
result = gnutls_pkcs12_export (pkcs12, GNUTLS_X509_FMT_PEM, out_buf, &size);
if (result < 0) {
More information about the Commits
mailing list