Lines Matching refs:c
154 unsigned char *c; in mbedtls_pk_write_pubkey_der() local
158 c = buf + size; in mbedtls_pk_write_pubkey_der()
160 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_pk_write_pubkey( &c, buf, key ) ); in mbedtls_pk_write_pubkey_der()
162 if( c - buf < 1 ) in mbedtls_pk_write_pubkey_der()
170 *--c = 0; in mbedtls_pk_write_pubkey_der()
173 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in mbedtls_pk_write_pubkey_der()
174 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_BIT_STRING ) ); in mbedtls_pk_write_pubkey_der()
185 MBEDTLS_ASN1_CHK_ADD( par_len, pk_write_ec_param( &c, buf, mbedtls_pk_ec( *key ) ) ); in mbedtls_pk_write_pubkey_der()
189 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_algorithm_identifier( &c, buf, oid, oid_len, in mbedtls_pk_write_pubkey_der()
192 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in mbedtls_pk_write_pubkey_der()
193 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | in mbedtls_pk_write_pubkey_der()
202 unsigned char *c = buf + size; in mbedtls_pk_write_key_der() local
210 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->QP ) ); in mbedtls_pk_write_key_der()
211 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->DQ ) ); in mbedtls_pk_write_key_der()
212 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->DP ) ); in mbedtls_pk_write_key_der()
213 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->Q ) ); in mbedtls_pk_write_key_der()
214 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->P ) ); in mbedtls_pk_write_key_der()
215 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->D ) ); in mbedtls_pk_write_key_der()
216 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->E ) ); in mbedtls_pk_write_key_der()
217 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->N ) ); in mbedtls_pk_write_key_der()
218 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_int( &c, buf, 0 ) ); in mbedtls_pk_write_key_der()
220 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in mbedtls_pk_write_key_der()
221 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | in mbedtls_pk_write_key_der()
244 MBEDTLS_ASN1_CHK_ADD( pub_len, pk_write_ec_pubkey( &c, buf, ec ) ); in mbedtls_pk_write_key_der()
246 if( c - buf < 1 ) in mbedtls_pk_write_key_der()
248 *--c = 0; in mbedtls_pk_write_key_der()
251 MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_len( &c, buf, pub_len ) ); in mbedtls_pk_write_key_der()
252 MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_BIT_STRING ) ); in mbedtls_pk_write_key_der()
254 MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_len( &c, buf, pub_len ) ); in mbedtls_pk_write_key_der()
255 MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_tag( &c, buf, in mbedtls_pk_write_key_der()
260 MBEDTLS_ASN1_CHK_ADD( par_len, pk_write_ec_param( &c, buf, ec ) ); in mbedtls_pk_write_key_der()
262 MBEDTLS_ASN1_CHK_ADD( par_len, mbedtls_asn1_write_len( &c, buf, par_len ) ); in mbedtls_pk_write_key_der()
263 MBEDTLS_ASN1_CHK_ADD( par_len, mbedtls_asn1_write_tag( &c, buf, in mbedtls_pk_write_key_der()
268 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &ec->d ) ); in mbedtls_pk_write_key_der()
269 *c = MBEDTLS_ASN1_OCTET_STRING; in mbedtls_pk_write_key_der()
272 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_int( &c, buf, 1 ) ); in mbedtls_pk_write_key_der()
274 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in mbedtls_pk_write_key_der()
275 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | in mbedtls_pk_write_key_der()