YACA_KEY_TYPE_DSA_PUB, /**< Digital Signature Algorithm public key */
YACA_KEY_TYPE_DSA_PRIV, /**< Digital Signature Algorithm private key */
-
- YACA_KEY_TYPE_DH_PUB, /**< Diffie-Hellman public key */
- YACA_KEY_TYPE_DH_PRIV, /**< Diffie-Hellman private key */
-
- YACA_KEY_TYPE_EC_PUB, /**< Elliptic Curve public key (for DSA and DH) */
- YACA_KEY_TYPE_EC_PRIV, /**< Elliptic Curve private key (for DSA and DH) */
} yaca_key_type_e;
/**
YACA_KEY_IV_64BIT = 64, /**< 64-bit IV */
YACA_KEY_IV_128BIT = 128, /**< 128-bit IV */
YACA_KEY_IV_256BIT = 256, /**< 256-bit IV */
- YACA_KEY_CURVE_P192 = 192, /**< ECC: P192 curve */
- YACA_KEY_CURVE_P256 = 256, /**< ECC: P-256 curve */
- YACA_KEY_CURVE_P384 = 384, /**< ECC: SECP-384 curve */
YACA_KEY_UNSAFE_8BIT = 8,
YACA_KEY_UNSAFE_40BIT = 40,
YACA_KEY_UNSAFE_64BIT = 64,
type = private ? YACA_KEY_TYPE_DSA_PRIV : YACA_KEY_TYPE_DSA_PUB;
break;
- case EVP_PKEY_EC:
- type = private ? YACA_KEY_TYPE_EC_PRIV : YACA_KEY_TYPE_EC_PUB;
- break;
+// case EVP_PKEY_EC:
+// type = private ? YACA_KEY_TYPE_EC_PRIV : YACA_KEY_TYPE_EC_PUB;
+// break;
default:
ret = YACA_ERROR_INVALID_ARGUMENT;
ret = PEM_write_bio_PUBKEY(mem, evp_key->evp);
break;
- case YACA_KEY_TYPE_DH_PRIV:
- case YACA_KEY_TYPE_DH_PUB:
- case YACA_KEY_TYPE_EC_PRIV:
- case YACA_KEY_TYPE_EC_PUB:
- //TODO NOT_IMPLEMENTED
+// case YACA_KEY_TYPE_DH_PRIV:
+// case YACA_KEY_TYPE_DH_PUB:
+// case YACA_KEY_TYPE_EC_PRIV:
+// case YACA_KEY_TYPE_EC_PUB:
+// TODO NOT_IMPLEMENTED
default:
return YACA_ERROR_INVALID_ARGUMENT;
}
ret = i2d_PUBKEY_bio(mem, evp_key->evp);
break;
- case YACA_KEY_TYPE_DH_PRIV:
- case YACA_KEY_TYPE_DH_PUB:
- case YACA_KEY_TYPE_EC_PRIV:
- case YACA_KEY_TYPE_EC_PUB:
- //TODO NOT_IMPLEMENTED
+// case YACA_KEY_TYPE_DH_PRIV:
+// case YACA_KEY_TYPE_DH_PUB:
+// case YACA_KEY_TYPE_EC_PRIV:
+// case YACA_KEY_TYPE_EC_PUB:
+// TODO NOT_IMPLEMENTED
default:
return YACA_ERROR_INVALID_ARGUMENT;
}
ret = PEM_write_bio_PKCS8PrivateKey_nid(mem, evp_key->evp, nid,
NULL, 0, NULL, (void*)password);
break;
- case YACA_KEY_TYPE_DH_PRIV:
- case YACA_KEY_TYPE_EC_PRIV:
- //TODO NOT_IMPLEMENTED ?
+// case YACA_KEY_TYPE_DH_PRIV:
+// case YACA_KEY_TYPE_EC_PRIV:
+// TODO NOT_IMPLEMENTED
default:
/* Public keys are not supported by PKCS8 */
return YACA_ERROR_INVALID_ARGUMENT;
NULL, 0, NULL, (void*)password);
break;
- case YACA_KEY_TYPE_DH_PRIV:
- case YACA_KEY_TYPE_EC_PRIV:
- //TODO NOT_IMPLEMENTED ?
+// case YACA_KEY_TYPE_DH_PRIV:
+// case YACA_KEY_TYPE_EC_PRIV:
+// TODO NOT_IMPLEMENTED
default:
/* Public keys are not supported by PKCS8 */
return YACA_ERROR_INVALID_ARGUMENT;
case YACA_KEY_TYPE_DSA_PUB:
case YACA_KEY_TYPE_DSA_PRIV:
return import_evp(key, key_type, password, data, data_len);
- case YACA_KEY_TYPE_DH_PUB:
- case YACA_KEY_TYPE_DH_PRIV:
- case YACA_KEY_TYPE_EC_PUB:
- case YACA_KEY_TYPE_EC_PRIV:
- //TODO NOT_IMPLEMENTED
- return YACA_ERROR_INVALID_ARGUMENT;
+// case YACA_KEY_TYPE_DH_PUB:
+// case YACA_KEY_TYPE_DH_PRIV:
+// case YACA_KEY_TYPE_EC_PUB:
+// case YACA_KEY_TYPE_EC_PRIV:
+// TODO NOT_IMPLEMENTED
default:
return YACA_ERROR_INVALID_ARGUMENT;
}
*key = (yaca_key_h)nk_evp;
return YACA_ERROR_NONE;
- case YACA_KEY_TYPE_DH_PRIV:
- case YACA_KEY_TYPE_EC_PRIV:
- //TODO NOT_IMPLEMENTED
- return YACA_ERROR_INVALID_ARGUMENT;
+// case YACA_KEY_TYPE_DH_PRIV:
+// case YACA_KEY_TYPE_EC_PRIV:
+// TODO NOT_IMPLEMENTED
default:
return YACA_ERROR_INVALID_ARGUMENT;
}
case YACA_KEY_TYPE_DSA_PRIV:
(*pub_key)->type = YACA_KEY_TYPE_DSA_PUB;
break;
- case YACA_KEY_TYPE_EC_PRIV:
- (*pub_key)->type = YACA_KEY_TYPE_EC_PUB;
- break;
+// case YACA_KEY_TYPE_EC_PRIV:
+// (*pub_key)->type = YACA_KEY_TYPE_EC_PUB;
+// break;
default:
ret = YACA_ERROR_INVALID_ARGUMENT;
goto free_pkey;