1# ------------------------------------
2# Copyright (c) Microsoft Corporation.
3# Licensed under the MIT License.
4# ------------------------------------
5from enum import Enum
6
7
8class CertificatePolicyAction(str, Enum):
9    """The supported action types for the lifetime of a certificate"""
10
11    email_contacts = "EmailContacts"
12    auto_renew = "AutoRenew"
13
14
15class CertificateContentType(str, Enum):
16    """Content type of the secrets as specified in Certificate Policy"""
17
18    pkcs12 = "application/x-pkcs12"
19    pem = "application/x-pem-file"
20
21
22class KeyUsageType(str, Enum):
23    """The supported types of key usages"""
24
25    digital_signature = "digitalSignature"
26    non_repudiation = "nonRepudiation"
27    key_encipherment = "keyEncipherment"
28    data_encipherment = "dataEncipherment"
29    key_agreement = "keyAgreement"
30    key_cert_sign = "keyCertSign"
31    crl_sign = "cRLSign"
32    encipher_only = "encipherOnly"
33    decipher_only = "decipherOnly"
34
35
36class KeyType(str, Enum):
37    """Supported key types"""
38
39    ec = "EC"  #: Elliptic Curve
40    ec_hsm = "EC-HSM"  #: Elliptic Curve with a private key which is not exportable from the HSM
41    rsa = "RSA"  #: RSA (https://tools.ietf.org/html/rfc3447)
42    rsa_hsm = "RSA-HSM"  #: RSA with a private key which is not exportable from the HSM
43
44
45class KeyCurveName(str, Enum):
46    """Supported elliptic curves"""
47
48    p_256 = "P-256"  #: The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.
49    p_384 = "P-384"  #: The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.
50    p_521 = "P-521"  #: The NIST P-521 elliptic curve, AKA SECG curve SECP521R1.
51    p_256_k = "P-256K"  #: The SECG SECP256K1 elliptic curve.
52
53
54class WellKnownIssuerNames(str, Enum):
55    """Collection of well-known issuer names"""
56
57    self = "Self"  #: Use this issuer for a self-signed certificate
58    unknown = "Unknown"
59    """
60    If you use this issuer, you must manually get an x509 certificate from the issuer of your choice.
61    You must then call :func:`~azure.keyvault.certificates.CertificateClient.merge_certificate` to
62    merge the public x509 certificate with your key vault certificate pending object to complete creation.
63    """
64