Lines Matching refs:p
177 cur->val.p[0] = critical; in mbedtls_x509_set_extension()
178 memcpy( cur->val.p + 1, val, val_len ); in mbedtls_x509_set_extension()
195 static int x509_write_name( unsigned char **p, unsigned char *start, in x509_write_name() argument
207 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_ia5_string( p, start, in x509_write_name()
213 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_printable_string( p, start, in x509_write_name()
220 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( p, start, oid, oid_len ) ); in x509_write_name()
222 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in x509_write_name()
223 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | in x509_write_name()
226 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in x509_write_name()
227 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | in x509_write_name()
233 int mbedtls_x509_write_names( unsigned char **p, unsigned char *start, in mbedtls_x509_write_names() argument
242 MBEDTLS_ASN1_CHK_ADD( len, x509_write_name( p, start, (char *) cur->oid.p, in mbedtls_x509_write_names()
244 cur->val.p, cur->val.len ) ); in mbedtls_x509_write_names()
248 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in mbedtls_x509_write_names()
249 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | in mbedtls_x509_write_names()
255 int mbedtls_x509_write_sig( unsigned char **p, unsigned char *start, in mbedtls_x509_write_sig() argument
262 if( *p < start || (size_t)( *p - start ) < size ) in mbedtls_x509_write_sig()
266 (*p) -= len; in mbedtls_x509_write_sig()
267 memcpy( *p, sig, len ); in mbedtls_x509_write_sig()
269 if( *p - start < 1 ) in mbedtls_x509_write_sig()
272 *--(*p) = 0; in mbedtls_x509_write_sig()
275 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in mbedtls_x509_write_sig()
276 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_BIT_STRING ) ); in mbedtls_x509_write_sig()
280 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_algorithm_identifier( p, start, oid, in mbedtls_x509_write_sig()
286 static int x509_write_extension( unsigned char **p, unsigned char *start, in x509_write_extension() argument
292 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, ext->val.p + 1, in x509_write_extension()
294 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, ext->val.len - 1 ) ); in x509_write_extension()
295 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_OCTET_STRING ) ); in x509_write_extension()
297 if( ext->val.p[0] != 0 ) in x509_write_extension()
299 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_bool( p, start, 1 ) ); in x509_write_extension()
302 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, ext->oid.p, in x509_write_extension()
304 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, ext->oid.len ) ); in x509_write_extension()
305 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_OID ) ); in x509_write_extension()
307 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in x509_write_extension()
308 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | in x509_write_extension()
324 int mbedtls_x509_write_extensions( unsigned char **p, unsigned char *start, in mbedtls_x509_write_extensions() argument
333 MBEDTLS_ASN1_CHK_ADD( len, x509_write_extension( p, start, cur_ext ) ); in mbedtls_x509_write_extensions()