Lines Matching refs:start
72 static int pk_write_rsa_pubkey( unsigned char **p, unsigned char *start, in pk_write_rsa_pubkey() argument
83 ( ret = mbedtls_asn1_write_mpi( p, start, &T ) ) < 0 ) in pk_write_rsa_pubkey()
89 ( ret = mbedtls_asn1_write_mpi( p, start, &T ) ) < 0 ) in pk_write_rsa_pubkey()
99 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in pk_write_rsa_pubkey()
100 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | in pk_write_rsa_pubkey()
111 static int pk_write_ec_pubkey( unsigned char **p, unsigned char *start, in pk_write_ec_pubkey() argument
125 if( *p < start || (size_t)( *p - start ) < len ) in pk_write_ec_pubkey()
139 static int pk_write_ec_param( unsigned char **p, unsigned char *start, in pk_write_ec_param() argument
150 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( p, start, oid, oid_len ) ); in pk_write_ec_param()
158 static int pk_write_ec_private( unsigned char **p, unsigned char *start, in pk_write_ec_private() argument
168 ret = mbedtls_asn1_write_octet_string( p, start, tmp, byte_length ); in pk_write_ec_private()
176 int mbedtls_pk_write_pubkey( unsigned char **p, unsigned char *start, in mbedtls_pk_write_pubkey() argument
184 PK_VALIDATE_RET( start != NULL ); in mbedtls_pk_write_pubkey()
189 MBEDTLS_ASN1_CHK_ADD( len, pk_write_rsa_pubkey( p, start, mbedtls_pk_rsa( *key ) ) ); in mbedtls_pk_write_pubkey()
194 MBEDTLS_ASN1_CHK_ADD( len, pk_write_ec_pubkey( p, start, mbedtls_pk_ec( *key ) ) ); in mbedtls_pk_write_pubkey()
203 if ( *p < start ) in mbedtls_pk_write_pubkey()
206 buffer_size = (size_t)( *p - start ); in mbedtls_pk_write_pubkey()
207 if ( psa_export_public_key( *key_id, start, buffer_size, &len ) in mbedtls_pk_write_pubkey()
215 memmove( *p, start, len ); in mbedtls_pk_write_pubkey()