subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1603771 - /subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c
Date Thu, 19 Jun 2014 09:10:27 GMT
Author: stsp
Date: Thu Jun 19 09:10:26 2014
New Revision: 1603771

URL: http://svn.apache.org/r1603771
Log:
On the 'svn-auth-x509' branch, remove unneeded code.

* subversion/libsvn_subr/x509parse.c
  (x509parse_crt, x509_free): Remove. These won't be needed
   once we've converted memory handling to apr pools.

Modified:
    subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c?rev=1603771&r1=1603770&r2=1603771&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c Thu Jun 19 09:10:26
2014
@@ -627,55 +627,3 @@ static int _x509parse_crt_1(x509_cert * 
 
 	return (0);
 }
-
-/*
- * Parse one or more certificates and add them to the chained list
- */
-int x509parse_crt(x509_cert * chain, const unsigned char *buf, int buflen)
-{
-	int ret;
-	unsigned char *buf1 = malloc(buflen);
-	if (buf1 == NULL) {
-		  return (1);
-	}
-	memcpy(buf1, buf, buflen);
-	ret = _x509parse_crt_1(chain, buf1, buflen);
-	free(buf1);
-	return ret;
-}
-
-/*
- * Unallocate all certificate data
- */
-void x509_free(x509_cert * crt)
-{
-	x509_name *name_cur;
-	x509_name *name_prv;
-
-	if (crt == NULL)
-		return;
-
-	name_cur = crt->issuer.next;
-	while (name_cur != NULL) {
-		name_prv = name_cur;
-		name_cur = name_cur->next;
-		memset(name_prv, 0, sizeof(x509_name));
-		free(name_prv);
-	}
-
-	name_cur = crt->subject.next;
-	while (name_cur != NULL) {
-		name_prv = name_cur;
-		name_cur = name_cur->next;
-		memset(name_prv, 0, sizeof(x509_name));
-		free(name_prv);
-	}
-
-	if (crt->raw.p != NULL) {
-		memset(crt->raw.p, 0, crt->raw.len);
-		free(crt->raw.p);
-	}
-
-	memset(crt, 0, sizeof(x509_cert));
-	free(crt);
-}



Mime
View raw message