Lines Matching defs:opt
120 } opt;
131 if (opt.format == FORMAT_PEM) {
280 opt.type = DFL_TYPE;
281 opt.rsa_keysize = DFL_RSA_KEYSIZE;
282 opt.ec_curve = DFL_EC_CURVE;
283 opt.filename = DFL_FILENAME;
284 opt.format = DFL_FORMAT;
285 opt.use_dev_random = DFL_USE_DEV_RANDOM;
296 opt.type = MBEDTLS_PK_RSA;
298 opt.type = MBEDTLS_PK_ECKEY;
304 opt.format = FORMAT_PEM;
306 opt.format = FORMAT_DER;
311 opt.rsa_keysize = atoi(q);
312 if (opt.rsa_keysize < 1024 ||
313 opt.rsa_keysize > MBEDTLS_MPI_MAX_BITS) {
322 opt.ec_curve = curve_info->grp_id;
326 opt.filename = q;
328 opt.use_dev_random = atoi(q);
329 if (opt.use_dev_random < 0 || opt.use_dev_random > 1) {
341 if (opt.use_dev_random) {
370 mbedtls_pk_info_from_type((mbedtls_pk_type_t) opt.type))) != 0) {
376 if (opt.type == MBEDTLS_PK_RSA) {
378 opt.rsa_keysize, 65537);
387 if (opt.type == MBEDTLS_PK_ECKEY) {
388 ret = mbedtls_ecp_gen_key((mbedtls_ecp_group_id) opt.ec_curve,
443 if ((ret = write_private_key(&key, opt.filename)) != 0) {