pidgin/ljfisher-ssl-client-auth

Removed extraneous commented out code.
cpw.ljfisher.ssl_client_auth
2011-08-23, Lucas Fisher
e189e6a2f0a6
Parents 72326cbd2ad4
Children cd677785660a
Removed extraneous commented out code.
Fix keydata ref counting bug.
--- a/libpurple/plugins/ssl/ssl-gnutls.c Sun Aug 14 18:20:04 2011 +0000
+++ b/libpurple/plugins/ssl/ssl-gnutls.c Tue Aug 23 03:31:36 2011 +0000
@@ -1302,14 +1302,8 @@
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 @@
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 @@
}
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) {