docs: def serialize_cert_to_der(cert_obj):
      """Serialize certificate to DER.
  
      Args:
        cert_obj: cryptography.Certificate
  
      Returns:
        bytes: DER encoded certificate
  
      """
      return cert_obj.public_bytes(
          cryptography.hazmat.primitives.serialization.Encoding.DER
      )