while(len)
{
- sprintf(CS cp2, "%.2x ", *cp1++);
- cp2 += 3;
+ cp2 += sprintf(CS cp2, "%.2x ", *cp1++);
len--;
}
cp2[-1] = '\0';
tls_cert_subject_altname(void * cert, uschar * mod)
{
uschar * list = NULL;
+int lsize = 0, llen = 0;
STACK_OF(GENERAL_NAME) * san = (STACK_OF(GENERAL_NAME) *)
X509_get_ext_d2i((X509 *)cert, NID_subject_alt_name, NULL, NULL);
uschar osep = '\n';
ele = string_copyn(ele, len);
if (Ustrlen(ele) == len) /* ignore any with embedded nul */
- list = string_append_listele(list, osep,
+ list = string_append_listele(list, &lsize, &llen, osep,
match == -1 ? string_sprintf("%s=%s", tag, ele) : ele);
}
int i;
uschar sep = '\n';
uschar * list = NULL;
+int size = 0, len = 0;
if (mod)
if (*mod == '>' && *++mod) sep = *mod++;
ACCESS_DESCRIPTION * ad = sk_ACCESS_DESCRIPTION_value(ads, i);
if (ad && OBJ_obj2nid(ad->method) == NID_ad_OCSP)
- {
- uschar * ele = ASN1_STRING_data(ad->location->d.ia5);
- int len = ASN1_STRING_length(ad->location->d.ia5);
- list = string_append_listele_n(list, sep, ele, len);
- }
+ list = string_append_listele_n(list, &size, &len, sep,
+ ASN1_STRING_data(ad->location->d.ia5),
+ ASN1_STRING_length(ad->location->d.ia5));
}
sk_ACCESS_DESCRIPTION_free(ads);
return list;
int i;
uschar sep = '\n';
uschar * list = NULL;
+int size = 0, len = 0;
if (mod)
if (*mod == '>' && *++mod) sep = *mod++;
if ( (np = sk_GENERAL_NAME_value(names, j))
&& np->type == GEN_URI
)
- {
- uschar * ele = ASN1_STRING_data(np->d.uniformResourceIdentifier);
- int len = ASN1_STRING_length(np->d.uniformResourceIdentifier);
- list = string_append_listele_n(list, sep, ele, len);
- }
+ list = string_append_listele_n(list, &size, &len, sep,
+ ASN1_STRING_data(np->d.uniformResourceIdentifier),
+ ASN1_STRING_length(np->d.uniformResourceIdentifier));
}
sk_DIST_POINT_free(dps);
return list;