Lines Matching refs:p
71 volatile unsigned char *p = v; while( n-- ) *p++ = 0; in mbedtls_zeroize() local
77 static int x509_crl_get_version( unsigned char **p, in x509_crl_get_version() argument
83 if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) in x509_crl_get_version()
100 static int x509_get_crl_ext( unsigned char **p, in x509_get_crl_ext() argument
108 if( ( ret = mbedtls_x509_get_ext( p, end, ext, 0) ) != 0 ) in x509_get_crl_ext()
116 while( *p < end ) in x509_get_crl_ext()
118 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crl_ext()
122 *p += len; in x509_get_crl_ext()
125 if( *p != end ) in x509_get_crl_ext()
135 static int x509_get_crl_entry_ext( unsigned char **p, in x509_get_crl_entry_ext() argument
143 if( end <= *p ) in x509_get_crl_entry_ext()
146 ext->tag = **p; in x509_get_crl_entry_ext()
147 ext->p = *p; in x509_get_crl_entry_ext()
153 if( ( ret = mbedtls_asn1_get_tag( p, end, &ext->len, in x509_get_crl_entry_ext()
158 ext->p = NULL; in x509_get_crl_entry_ext()
164 end = *p + ext->len; in x509_get_crl_entry_ext()
166 if( end != *p + ext->len ) in x509_get_crl_entry_ext()
170 while( *p < end ) in x509_get_crl_entry_ext()
172 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crl_entry_ext()
176 *p += len; in x509_get_crl_entry_ext()
179 if( *p != end ) in x509_get_crl_entry_ext()
189 static int x509_get_entries( unsigned char **p, in x509_get_entries() argument
197 if( *p == end ) in x509_get_entries()
200 if( ( ret = mbedtls_asn1_get_tag( p, end, &entry_len, in x509_get_entries()
209 end = *p + entry_len; in x509_get_entries()
211 while( *p < end ) in x509_get_entries()
216 if( ( ret = mbedtls_asn1_get_tag( p, end, &len2, in x509_get_entries()
222 cur_entry->raw.tag = **p; in x509_get_entries()
223 cur_entry->raw.p = *p; in x509_get_entries()
225 end2 = *p + len2; in x509_get_entries()
227 if( ( ret = mbedtls_x509_get_serial( p, end2, &cur_entry->serial ) ) != 0 ) in x509_get_entries()
230 if( ( ret = mbedtls_x509_get_time( p, end2, in x509_get_entries()
234 if( ( ret = x509_get_crl_entry_ext( p, end2, in x509_get_entries()
238 if( *p < end ) in x509_get_entries()
260 unsigned char *p, *end; in mbedtls_x509_crl_parse_der() local
297 if( ( p = mbedtls_calloc( 1, buflen ) ) == NULL ) in mbedtls_x509_crl_parse_der()
300 memcpy( p, buf, buflen ); in mbedtls_x509_crl_parse_der()
302 crl->raw.p = p; in mbedtls_x509_crl_parse_der()
305 end = p + buflen; in mbedtls_x509_crl_parse_der()
313 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
320 if( len != (size_t) ( end - p ) ) in mbedtls_x509_crl_parse_der()
330 crl->tbs.p = p; in mbedtls_x509_crl_parse_der()
332 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
339 end = p + len; in mbedtls_x509_crl_parse_der()
340 crl->tbs.len = end - crl->tbs.p; in mbedtls_x509_crl_parse_der()
348 if( ( ret = x509_crl_get_version( &p, end, &crl->version ) ) != 0 || in mbedtls_x509_crl_parse_der()
349 ( ret = mbedtls_x509_get_alg( &p, end, &crl->sig_oid, &sig_params1 ) ) != 0 ) in mbedtls_x509_crl_parse_der()
374 crl->issuer_raw.p = p; in mbedtls_x509_crl_parse_der()
376 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
383 if( ( ret = mbedtls_x509_get_name( &p, p + len, &crl->issuer ) ) != 0 ) in mbedtls_x509_crl_parse_der()
389 crl->issuer_raw.len = p - crl->issuer_raw.p; in mbedtls_x509_crl_parse_der()
395 if( ( ret = mbedtls_x509_get_time( &p, end, &crl->this_update ) ) != 0 ) in mbedtls_x509_crl_parse_der()
401 if( ( ret = mbedtls_x509_get_time( &p, end, &crl->next_update ) ) != 0 ) in mbedtls_x509_crl_parse_der()
421 if( ( ret = x509_get_entries( &p, end, &crl->entry ) ) != 0 ) in mbedtls_x509_crl_parse_der()
433 ret = x509_get_crl_ext( &p, end, &crl->crl_ext ); in mbedtls_x509_crl_parse_der()
442 if( p != end ) in mbedtls_x509_crl_parse_der()
449 end = crl->raw.p + crl->raw.len; in mbedtls_x509_crl_parse_der()
455 if( ( ret = mbedtls_x509_get_alg( &p, end, &sig_oid2, &sig_params2 ) ) != 0 ) in mbedtls_x509_crl_parse_der()
462 memcmp( crl->sig_oid.p, sig_oid2.p, crl->sig_oid.len ) != 0 || in mbedtls_x509_crl_parse_der()
465 memcmp( sig_params1.p, sig_params2.p, sig_params1.len ) != 0 ) ) in mbedtls_x509_crl_parse_der()
471 if( ( ret = mbedtls_x509_get_sig( &p, end, &crl->sig ) ) != 0 ) in mbedtls_x509_crl_parse_der()
477 if( p != end ) in mbedtls_x509_crl_parse_der()
585 char *p; in mbedtls_x509_crl_info() local
588 p = buf; in mbedtls_x509_crl_info()
591 ret = mbedtls_snprintf( p, n, "%sCRL version : %d", in mbedtls_x509_crl_info()
595 ret = mbedtls_snprintf( p, n, "\n%sissuer name : ", prefix ); in mbedtls_x509_crl_info()
597 ret = mbedtls_x509_dn_gets( p, n, &crl->issuer ); in mbedtls_x509_crl_info()
600 ret = mbedtls_snprintf( p, n, "\n%sthis update : " \ in mbedtls_x509_crl_info()
607 ret = mbedtls_snprintf( p, n, "\n%snext update : " \ in mbedtls_x509_crl_info()
616 ret = mbedtls_snprintf( p, n, "\n%sRevoked certificates:", in mbedtls_x509_crl_info()
622 ret = mbedtls_snprintf( p, n, "\n%sserial number: ", in mbedtls_x509_crl_info()
626 ret = mbedtls_x509_serial_gets( p, n, &entry->serial ); in mbedtls_x509_crl_info()
629 ret = mbedtls_snprintf( p, n, " revocation date: " \ in mbedtls_x509_crl_info()
639 ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); in mbedtls_x509_crl_info()
642 ret = mbedtls_x509_sig_alg_gets( p, n, &crl->sig_oid, crl->sig_pk, crl->sig_md, in mbedtls_x509_crl_info()
646 ret = mbedtls_snprintf( p, n, "\n" ); in mbedtls_x509_crl_info()
699 if( crl_cur->raw.p != NULL ) in mbedtls_x509_crl_free()
701 mbedtls_zeroize( crl_cur->raw.p, crl_cur->raw.len ); in mbedtls_x509_crl_free()
702 mbedtls_free( crl_cur->raw.p ); in mbedtls_x509_crl_free()