SXNET *ret=NULL;
ASN1_CTX c;
M_ASN1_New_Malloc(ret, SXNET);
- M_ASN1_New(ret->version,ASN1_INTEGER_new);
+ M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
M_ASN1_New(ret->ids,sk_SXNETID_new_null);
return (ret);
M_ASN1_New_Error(ASN1_F_SXNET_NEW);
void SXNET_free(SXNET *a)
{
if (a == NULL) return;
- ASN1_INTEGER_free(a->version);
+ M_ASN1_INTEGER_free(a->version);
sk_SXNETID_pop_free(a->ids, SXNETID_free);
Free (a);
}
ASN1_CTX c;
M_ASN1_New_Malloc(ret, SXNETID);
ret->zone = NULL;
- M_ASN1_New(ret->user,ASN1_OCTET_STRING_new);
+ M_ASN1_New(ret->user,M_ASN1_OCTET_STRING_new);
return (ret);
M_ASN1_New_Error(ASN1_F_SXNETID_NEW);
}
void SXNETID_free(SXNETID *a)
{
if (a == NULL) return;
- ASN1_INTEGER_free(a->zone);
- ASN1_OCTET_STRING_free(a->user);
+ M_ASN1_INTEGER_free(a->zone);
+ M_ASN1_OCTET_STRING_free(a->user);
Free (a);
}
tmp = i2s_ASN1_INTEGER(NULL, id->zone);
BIO_printf(out, "\n%*sZone: %s, User: ", indent, "", tmp);
Free(tmp);
- ASN1_OCTET_STRING_print(out, id->user);
+ M_ASN1_OCTET_STRING_print(out, id->user);
}
return 1;
}
int userlen)
{
ASN1_INTEGER *izone = NULL;
- if(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
+ if(!(izone = M_ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
X509V3err(X509V3_F_SXNET_ADD_ID_ULONG,ERR_R_MALLOC_FAILURE);
- ASN1_INTEGER_free(izone);
+ M_ASN1_INTEGER_free(izone);
return 0;
}
return SXNET_add_id_INTEGER(psx, izone, user, userlen);
if(!(id = SXNETID_new())) goto err;
if(userlen == -1) userlen = strlen(user);
- if(!ASN1_OCTET_STRING_set(id->user, user, userlen)) goto err;
+ if(!M_ASN1_OCTET_STRING_set(id->user, user, userlen)) goto err;
if(!sk_SXNETID_push(sx->ids, id)) goto err;
id->zone = zone;
return 1;
return NULL;
}
oct = SXNET_get_id_INTEGER(sx, izone);
- ASN1_INTEGER_free(izone);
+ M_ASN1_INTEGER_free(izone);
return oct;
}
{
ASN1_INTEGER *izone = NULL;
ASN1_OCTET_STRING *oct;
- if(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
+ if(!(izone = M_ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
X509V3err(X509V3_F_SXNET_GET_ID_ULONG,ERR_R_MALLOC_FAILURE);
- ASN1_INTEGER_free(izone);
+ M_ASN1_INTEGER_free(izone);
return NULL;
}
oct = SXNET_get_id_INTEGER(sx, izone);
- ASN1_INTEGER_free(izone);
+ M_ASN1_INTEGER_free(izone);
return oct;
}
int i;
for(i = 0; i < sk_SXNETID_num(sx->ids); i++) {
id = sk_SXNETID_value(sx->ids, i);
- if(!ASN1_INTEGER_cmp(id->zone, zone)) return id->user;
+ if(!M_ASN1_INTEGER_cmp(id->zone, zone)) return id->user;
}
return NULL;
}