aboutsummaryrefslogtreecommitdiff
path: root/openssl/trunk/crypto/x509v3/v3_asid.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2006-07-27 06:12:50 +0000
committerRob Austein <sra@hactrn.net>2006-07-27 06:12:50 +0000
commit904531675b309df48efb44038185278f553cc173 (patch)
tree6cd8c2fee6f8818fd77a3169dd6042a087574203 /openssl/trunk/crypto/x509v3/v3_asid.c
parent64ab3ba9345dba3e1669425fae9667e13ef3af5d (diff)
Remove debugging hacks.
svn path=/openssl/trunk/crypto/x509v3/v3_asid.c; revision=99
Diffstat (limited to 'openssl/trunk/crypto/x509v3/v3_asid.c')
-rw-r--r--openssl/trunk/crypto/x509v3/v3_asid.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/openssl/trunk/crypto/x509v3/v3_asid.c b/openssl/trunk/crypto/x509v3/v3_asid.c
index 2d0a815a..935eaf7a 100644
--- a/openssl/trunk/crypto/x509v3/v3_asid.c
+++ b/openssl/trunk/crypto/x509v3/v3_asid.c
@@ -163,7 +163,6 @@ static int asid_add_inherit(ASIdentifierChoice **choice)
if (*choice == NULL) {
if ((*choice = ASIdentifierChoice_new()) == NULL)
return 0;
- assert((*choice)->u.inherit == NULL); /* XXX */
if (((*choice)->u.inherit = ASN1_NULL_new()) == NULL)
return 0;
(*choice)->type = ASIdentifierChoice_inherit;
@@ -184,7 +183,6 @@ static int asid_add_id_or_range(ASIdentifierChoice **choice,
if (*choice == NULL) {
if ((*choice = ASIdentifierChoice_new()) == NULL)
return 0;
- assert((*choice)->u.asIdsOrRanges == NULL); /* XXX */
(*choice)->u.asIdsOrRanges = sk_ASIdOrRange_new(ASIdOrRange_cmp);
if ((*choice)->u.asIdsOrRanges == NULL)
return 0;
@@ -194,11 +192,9 @@ static int asid_add_id_or_range(ASIdentifierChoice **choice,
return 0;
if (max == NULL) {
aor->type = ASIdOrRange_id;
- assert(aor->u.id == NULL); /* XXX */
aor->u.id = min;
} else {
aor->type = ASIdOrRange_range;
- assert(aor->u.range == NULL); /* XXX */
if ((aor->u.range = ASRange_new()) == NULL)
goto err;
assert(aor->u.range->min == NULL);
@@ -307,7 +303,6 @@ static int asid_canonize(ASIdentifierChoice *choice)
if (aor == NULL)
goto err;
aor->type = ASIdOrRange_range;
- assert(aor->u.range == NULL); /* XXX */
if ((aor->u.range = ASRange_new()) == NULL) {
ASIdOrRange_free(aor);
goto err;
@@ -348,72 +343,6 @@ static int asid_canonize(ASIdentifierChoice *choice)
}
/*
- * Temporary hack tracking down memory leak.
- */
-
-#if 0
-
-#define DUMP_POINTER(x) fprintf(stderr, "=== %p %s\n", x, #x)
-
-static void dump_pointers(ASIdentifiers *asid)
-{
- int i;
- fputs("=====\n", stderr);
- DUMP_POINTER(asid);
- DUMP_POINTER(asid->asnum);
- if (asid->asnum) {
- switch (asid->asnum->type) {
- case ASIdentifierChoice_inherit:
- DUMP_POINTER(asid->asnum->u.inherit);
- break;
- case ASIdentifierChoice_asIdsOrRanges:
- DUMP_POINTER(asid->asnum->u.asIdsOrRanges);
- for (i = 0; i < sk_ASIdOrRange_num(asid->asnum->u.asIdsOrRanges); i++) {
- ASIdOrRange *aor = sk_ASIdOrRange_value(asid->asnum->u.asIdsOrRanges, i);
- DUMP_POINTER(aor);
- switch (aor->type) {
- case ASIdOrRange_id:
- DUMP_POINTER(aor->u.id);
- continue;
- case ASIdOrRange_range:
- DUMP_POINTER(aor->u.range);
- DUMP_POINTER(aor->u.range->min);
- DUMP_POINTER(aor->u.range->max);
- continue;
- }
- }
- }
- }
- DUMP_POINTER(asid->rdi);
- if (asid->rdi) {
- switch (asid->rdi->type) {
- case ASIdentifierChoice_inherit:
- DUMP_POINTER(asid->rdi->u.inherit);
- break;
- case ASIdentifierChoice_asIdsOrRanges:
- DUMP_POINTER(asid->rdi->u.asIdsOrRanges);
- for (i = 0; i < sk_ASIdOrRange_num(asid->rdi->u.asIdsOrRanges); i++) {
- ASIdOrRange *aor = sk_ASIdOrRange_value(asid->rdi->u.asIdsOrRanges, i);
- DUMP_POINTER(aor);
- switch (aor->type) {
- case ASIdOrRange_id:
- DUMP_POINTER(aor->u.id);
- continue;
- case ASIdOrRange_range:
- DUMP_POINTER(aor->u.range);
- DUMP_POINTER(aor->u.range->min);
- DUMP_POINTER(aor->u.range->max);
- continue;
- }
- }
- }
- }
- fputs("=====\n", stderr);
-}
-
-#endif
-
-/*
* v2i method for an ASIdentifier extension.
*/
static void *v2i_ASIdentifiers(struct v3_ext_method *method,
@@ -432,8 +361,6 @@ static void *v2i_ASIdentifiers(struct v3_ext_method *method,
return NULL;
}
- assert(asid->asnum == NULL && asid->rdi == NULL); /* XXX */
-
for (i = 0; i < sk_CONF_VALUE_num(values); i++) {
val = sk_CONF_VALUE_value(values, i);
@@ -487,9 +414,6 @@ static void *v2i_ASIdentifiers(struct v3_ext_method *method,
*/
asid_canonize(asid->asnum);
asid_canonize(asid->rdi);
-#ifdef DUMP_POINTER
- dump_pointers(asid);
-#endif
return asid;
err: