CrowdTLS-server/crowdtls/db.py

22 lines
613 B
Python

from sqlalchemy import Integer
from sqlalchemy import LargeBinary
from sqlalchemy.dialects.postgresql import JSONB
from sqlmodel import Field
from sqlmodel import SQLModel
class CertificateChain(SQLModel, table=True):
id: int = Field(default=None, primary_key=True)
fingerprint: str = Field(index=True)
domain_name: str
raw_der_certificate: LargeBinary
version: int
serial_number: str
signature: LargeBinary
issuer: JSONB
validity: JSONB
subject: JSONB
subject_public_key_info: JSONB
issuer_unique_id: Integer
subject_unique_id: Integer
extensions: JSONB