from openssl.types import * # ============================================================ # openssl/objects.vp — ASN.1 objects (OID) and NID # Corresponding headers: objects.h / obj_mac.h # ============================================================ # ---- Common NIDs (obj_mac.h constants) ---- define NidCommonName = 13 define NidCountryName = 14 define NidLocalityName = 15 define NidStateOrProvinceName = 16 define NidOrganizationName = 17 define NidOrganizationalUnitName = 18 define NidEmailAddress = 48 define NidSerialNumber = 105 define NidSubjectKeyIdentifier = 82 define NidKeyUsage = 83 define NidSubjectAltName = 85 define NidIssuerAltName = 86 define NidBasicConstraints = 87 define NidAuthorityKeyIdentifier = 90 define NidCrlDistributionPoints = 103 define NidExtKeyUsage = 126 define NidRsaEncryption = 6 define NidSha1 = 64 define NidSha256 = 672 define NidMd5 = 4 define NidHmac = 855 define NidX9_62IdEcPublicKey = 408 # ---- OBJ / NID conversion ---- # int OBJ_txt2nid(const char *s) extern def OBJ_txt2nid(s: str) -> int # int OBJ_sn2nid(const char *s) / int OBJ_ln2nid(const char *s) extern def OBJ_sn2nid(s: str) -> int extern def OBJ_ln2nid(s: str) -> int # const char *OBJ_nid2sn(int n) / const char *OBJ_nid2ln(int n) extern def OBJ_nid2sn(n: int) -> str extern def OBJ_nid2ln(n: int) -> str # ASN1_OBJECT *OBJ_nid2obj(int n) extern def OBJ_nid2obj(n: int) -> Asn1ObjectPtr # ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) extern def OBJ_txt2obj(s: str, no_name: int) -> Asn1ObjectPtr # int OBJ_obj2nid(const ASN1_OBJECT *o) extern def OBJ_obj2nid(o: Asn1ObjectPtr) -> int # int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) extern def OBJ_obj2txt(buf: bytes, buf_len: int, a: Asn1ObjectPtr, no_name: int) -> int # int OBJ_create(const char *oid, const char *sn, const char *ln) extern def OBJ_create(oid: str, sn: str, ln: str) -> int