{
ASN1_STRING *os;
- if ((os = M_ASN1_OCTET_STRING_new()) == NULL)
+ if ((os = ASN1_OCTET_STRING_new()) == NULL)
return (0);
- if (!M_ASN1_OCTET_STRING_set(os, data, len)) {
- M_ASN1_OCTET_STRING_free(os);
+ if (!ASN1_OCTET_STRING_set(os, data, len)) {
+ ASN1_OCTET_STRING_free(os);
return 0;
}
ASN1_TYPE_set(a, V_ASN1_OCTET_STRING, os);
ASN1err(ASN1_F_ASN1_TYPE_GET_OCTETSTRING, ASN1_R_DATA_IS_WRONG);
return (-1);
}
- p = M_ASN1_STRING_data(a->value.octet_string);
- ret = M_ASN1_STRING_length(a->value.octet_string);
+ p = ASN1_STRING_data(a->value.octet_string);
+ ret = ASN1_STRING_length(a->value.octet_string);
if (ret < max_len)
num = ret;
else
os.length = len;
ASN1_INTEGER_set(&in, num);
n = i2d_ASN1_INTEGER(&in, NULL);
- n += M_i2d_ASN1_OCTET_STRING(&os, NULL);
+ n += i2d_ASN1_OCTET_STRING(&os, NULL);
size = ASN1_object_size(1, n, V_ASN1_SEQUENCE);
return (0);
}
- M_ASN1_STRING_length_set(osp, size);
- p = M_ASN1_STRING_data(osp);
+ ASN1_STRING_length_set(osp, size);
+ p = ASN1_STRING_data(osp);
ASN1_put_object(&p, 1, n, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL);
i2d_ASN1_INTEGER(&in, &p);
- M_i2d_ASN1_OCTET_STRING(&os, &p);
+ i2d_ASN1_OCTET_STRING(&os, &p);
ASN1_TYPE_set(a, V_ASN1_SEQUENCE, osp);
return (1);
if ((a->type != V_ASN1_SEQUENCE) || (a->value.sequence == NULL)) {
goto err;
}
- p = M_ASN1_STRING_data(a->value.sequence);
- length = M_ASN1_STRING_length(a->value.sequence);
+ p = ASN1_STRING_data(a->value.sequence);
+ length = ASN1_STRING_length(a->value.sequence);
c.pp = &p;
c.p = p;
if (num != NULL)
*num = ASN1_INTEGER_get(ai);
- ret = M_ASN1_STRING_length(os);
+ ret = ASN1_STRING_length(os);
if (max_len > ret)
n = ret;
else
n = max_len;
if (data != NULL)
- memcpy(data, M_ASN1_STRING_data(os), n);
+ memcpy(data, ASN1_STRING_data(os), n);
if (0) {
err:
ASN1err(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING, ASN1_R_DATA_IS_WRONG);
}
- if (os != NULL)
- M_ASN1_OCTET_STRING_free(os);
+ ASN1_OCTET_STRING_free(os);
if (ai != NULL)
- M_ASN1_INTEGER_free(ai);
+ ASN1_INTEGER_free(ai);
return (ret);
}