Lines Matching refs:len
160 encode_bytestring_with_tag(asn1buf *buf, unsigned int len,
167 if (len > 0 && val == 0) return ASN1_MISSING_FIELD;
168 retval = asn1buf_insert_octetstring(buf, len, val);
171 len, &length);
174 *retlen = len + length;
178 asn1_error_code asn1_encode_oid(asn1buf *buf, unsigned int len,
182 return encode_bytestring_with_tag(buf, len, val, ASN1_OBJECTIDENTIFIER,
186 asn1_error_code asn1_encode_octetstring(asn1buf *buf, unsigned int len,
190 return encode_bytestring_with_tag(buf, len, val, ASN1_OCTETSTRING,
208 asn1_error_code asn1_encode_printablestring(asn1buf *buf, unsigned int len,
211 return encode_bytestring_with_tag(buf, len, val, ASN1_PRINTABLESTRING,
215 asn1_error_code asn1_encode_ia5string(asn1buf *buf, unsigned int len,
218 return encode_bytestring_with_tag(buf, len, val, ASN1_IA5STRING,
236 int len;
262 len = snprintf(s, sizeof(s), "%04d%02d%02d%02d%02d%02dZ",
266 if (SNPRINTF_OVERFLOW(len, sizeof(s)))
276 asn1_error_code asn1_encode_generalstring(asn1buf *buf, unsigned int len,
280 return encode_bytestring_with_tag(buf, len, val, ASN1_GENERALSTRING,
284 asn1_error_code asn1_encode_bitstring(asn1buf *buf, unsigned int len,
291 retval = asn1buf_insert_octetstring(buf, len, val);
296 len+1, &length);
298 *retlen = len + 1 + length;
302 asn1_error_code asn1_encode_opaque(asn1buf *buf, unsigned int len,
307 retval = asn1buf_insert_octetstring(buf, len, val);
309 *retlen = len;