Lines Matching refs:key

131                      const mbedtls_pk_context *key )  in mbedtls_pk_write_pubkey()  argument
137 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) in mbedtls_pk_write_pubkey()
138 MBEDTLS_ASN1_CHK_ADD( len, pk_write_rsa_pubkey( p, start, mbedtls_pk_rsa( *key ) ) ); in mbedtls_pk_write_pubkey()
142 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) in mbedtls_pk_write_pubkey()
143 MBEDTLS_ASN1_CHK_ADD( len, pk_write_ec_pubkey( p, start, mbedtls_pk_ec( *key ) ) ); in mbedtls_pk_write_pubkey()
151 int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *key, unsigned char *buf, size_t size ) in mbedtls_pk_write_pubkey_der() argument
160 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_pk_write_pubkey( &c, buf, key ) ); in mbedtls_pk_write_pubkey_der()
176 if( ( ret = mbedtls_oid_get_oid_by_pk_alg( mbedtls_pk_get_type( key ), in mbedtls_pk_write_pubkey_der()
183 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) 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()
199 int mbedtls_pk_write_key_der( mbedtls_pk_context *key, unsigned char *buf, size_t size ) in mbedtls_pk_write_key_der() argument
206 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) in mbedtls_pk_write_key_der()
208 mbedtls_rsa_context *rsa = mbedtls_pk_rsa( *key ); in mbedtls_pk_write_key_der()
227 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) in mbedtls_pk_write_key_der()
229 mbedtls_ecp_keypair *ec = mbedtls_pk_ec( *key ); in mbedtls_pk_write_key_der()
378 int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *key, unsigned char *buf, size_t size ) in mbedtls_pk_write_pubkey_pem() argument
384 if( ( ret = mbedtls_pk_write_pubkey_der( key, output_buf, in mbedtls_pk_write_pubkey_pem()
400 int mbedtls_pk_write_key_pem( mbedtls_pk_context *key, unsigned char *buf, size_t size ) in mbedtls_pk_write_key_pem() argument
407 if( ( ret = mbedtls_pk_write_key_der( key, output_buf, sizeof(output_buf) ) ) < 0 ) in mbedtls_pk_write_key_pem()
411 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) in mbedtls_pk_write_key_pem()
419 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) in mbedtls_pk_write_key_pem()