{
  "$id": "https://schemas.sand.binaryedge.io/minion/modules/sslv2",
  "title": "SSL v2 Module Output Body",
  "type": "object",
  "properties": {
    "cert_info": {
      "type": "object",
      "properties": {
        "certificate_chain": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/cert"
          }
        },
        "error_message": {
          "type": "string"
        },
        "leaf_certificate_has_must_staple_extension": {
          "type": "boolean"
        },
        "leaf_certificate_is_ev": {
          "type": "boolean"
        },
        "leaf_certificate_signed_certificate_timestamps_count": {
          "type": "integer"
        },
        "leaf_certificate_subject_matches_hostname": {
          "type": "boolean"
        },
        "ocsp_response": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "producedAt": {
                  "type": [
                    "null",
                    "string"
                  ]
                },
                "responderID": {
                  "type": [
                    "null",
                    "string"
                  ]
                },
                "responses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "certID": {
                        "type": "object",
                        "properties": {
                          "hashAlgorithm": {
                            "type": "string",
                            "enum": [
                              "sha1",
                              "sha256"
                            ]
                          },
                          "issuerKeyHash": {
                            "type": "string"
                          },
                          "issuerNameHash": {
                            "type": "string"
                          },
                          "serialNumber": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "hashAlgorithm",
                          "issuerKeyHash",
                          "issuerNameHash",
                          "serialNumber"
                        ],
                        "additionalProperties": true
                      },
                      "certStatus": {
                        "type": "string",
                        "enum": [
                          "good",
                          "revoked",
                          "unknown"
                        ]
                      },
                      "nextUpdate": {
                        "type": [
                          "null",
                          "string"
                        ]
                      },
                      "singleExtensions": {
                        "$comment": "Extensions are left undefined.",
                        "type": "object"
                      },
                      "thisUpdate": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "certID",
                      "certStatus",
                      "nextUpdate",
                      "thisUpdate"
                    ],
                    "additionalProperties": false
                  }
                },
                "responseStatus": {
                  "type": "string",
                  "enum": [
                    "successful",
                    "trylater",
                    "unauthorized"
                  ]
                },
                "responseType": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "Basic OCSP Response"
                      ]
                    }
                  ]
                },
                "version": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "1"
                      ]
                    }
                  ]
                }
              },
              "required": [
                "producedAt",
                "responderID",
                "responseStatus",
                "responseType",
                "version"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "ocsp_response_status": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "type": "string",
              "enum": [
                "SUCCESSFUL",
                "TRY_LATER",
                "UNAUTHORIZED"
              ]
            }
          ]
        },
        "ocsp_response_is_trusted": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "path_validation_result_list": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "trust_store": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "version"
                ],
                "additionalProperties": false
              },
              "verified_certificate_chain": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/cert"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verify_string": {
                "type": "string"
              }
            },
            "required": [
              "trust_store",
              "verified_certificate_chain",
              "verify_string"
            ],
            "additionalProperties": false
          }
        },
        "received_chain_contains_anchor_certificate": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "received_chain_has_valid_order": {
          "type": "boolean"
        },
        "verified_certificate_chain": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/cert"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "verified_chain_has_legacy_symantec_anchor": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "verified_chain_has_sha1_signature": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "ciphers": {
      "type": "object",
      "properties": {
        "sslv2": {
          "$ref": "#/$defs/cipher_enumeration"
        },
        "sslv3": {
          "$ref": "#/$defs/cipher_enumeration"
        },
        "tlsv1": {
          "$ref": "#/$defs/cipher_enumeration"
        },
        "tlsv1_1": {
          "$ref": "#/$defs/cipher_enumeration"
        },
        "tlsv1_2": {
          "$ref": "#/$defs/cipher_enumeration"
        },
        "tlsv1_3": {
          "$ref": "#/$defs/cipher_enumeration"
        }
      },
      "required": [
        "sslv2",
        "sslv3",
        "tlsv1",
        "tlsv1_1",
        "tlsv1_2",
        "tlsv1_3"
      ],
      "additionalProperties": false
    },
    "server_info": {
      "type": "object",
      "properties": {
        "client_auth_credentials": {
          "type": [
            "null",
            "string"
          ]
        },
        "client_auth_requirement": {
          "type": "string",
          "enum": [
            "DISABLED",
            "OPTIONAL",
            "REQUIRED"
          ]
        },
        "highest_ssl_version_supported": {
          "type": "string",
          "enum": [
            "SSLV2",
            "SSLV23",
            "SSLV3",
            "TLSV1",
            "TLSV1_1",
            "TLSV1_2",
            "TLSV1_3"
          ]
        },
        "hostname": {
          "$ref": "/minion/shared-types#/target"
        },
        "http_tunneling_settings": {
          "type": [
            "null"
          ]
        },
        "ip_address": {
          "$ref": "/minion/shared-types#/ip-address"
        },
        "ja3": {
          "type": "string"
        },
        "ja3_description": {
          "type": "string"
        },
        "ja3_digest": {
          "type": "string"
        },
        "openssl_cipher_string_supported": {
          "type": "string"
        },
        "port": {
          "$ref": "/minion/shared-types#/port-integer"
        },
        "tls_server_name_indication": {
          "type": "string"
        },
        "tls_wrapped_protocol": {
          "type": "string",
          "enum": [
            "PLAIN_TLS"
          ]
        },
        "xmpp_to_hostname": {
          "type": [
            "null"
          ]
        }
      },
      "required": [
        "client_auth_credentials",
        "client_auth_requirement",
        "highest_ssl_version_supported",
        "hostname",
        "http_tunneling_settings",
        "ip_address",
        "openssl_cipher_string_supported",
        "port",
        "tls_server_name_indication",
        "tls_wrapped_protocol",
        "xmpp_to_hostname"
      ],
      "additionalProperties": false
    },
    "vulnerabilities": {
      "type": "object",
      "properties": {
        "compression": {
          "properties": {
            "compression_name": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "",
                    "zlib compression"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "supports_compression": {
              "type": "boolean"
            }
          },
          "required": [
            "compression_name",
            "supports_compression"
          ],
          "additionalProperties": false
        },
        "fallback": {
          "properties": {
            "supports_fallback_scsv": {
              "type": "boolean"
            }
          },
          "required": [
            "supports_fallback_scsv"
          ],
          "additionalProperties": false
        },
        "heartbleed": {
          "properties": {
            "is_vulnerable_to_heartbleed": {
              "type": "boolean"
            }
          },
          "required": [
            "is_vulnerable_to_heartbleed"
          ],
          "additionalProperties": false
        },
        "openssl_ccs": {
          "properties": {
            "is_vulnerable_to_ccs_injection": {
              "type": "boolean"
            }
          },
          "required": [
            "is_vulnerable_to_ccs_injection"
          ],
          "additionalProperties": false
        },
        "robot": {
          "properties": {
            "robot_result_enum": {
              "type": "string",
              "enum": [
                "NOT_VULNERABLE_NO_ORACLE",
                "NOT_VULNERABLE_RSA_NOT_SUPPORTED",
                "UNKNOWN_INCONSISTENT_RESULTS",
                "VULNERABLE_STRONG_ORACLE",
                "VULNERABLE_WEAK_ORACLE"
              ]
            }
          },
          "required": [
            "robot_result_enum"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "cert_info",
    "ciphers",
    "server_info"
  ],
  "additionalProperties": false,
  "$defs": {
    "cert": {
      "type": "object",
      "properties": {
        "as_dict": {
          "type": "object",
          "properties": {
            "extensions": {
              "$comment": "Extensions are left undefined.",
              "type": "object"
            },
            "issuer": {
              "$ref": "#/$defs/identifier"
            },
            "public_key_info": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "algorithm": {
                      "type": "string",
                      "enum": [
                        "dsa"
                      ]
                    },
                    "g": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    },
                    "key_size": {
                      "type": "integer"
                    },
                    "p": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    },
                    "public_key": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    },
                    "q": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    },
                    "sha256_fingerprint": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    }
                  },
                  "required": [
                    "algorithm",
                    "g",
                    "p",
                    "public_key",
                    "q",
                    "sha256_fingerprint"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "algorithm": {
                      "type": "string",
                      "enum": [
                        "ec"
                      ]
                    },
                    "curve": {
                      "type": "string"
                    },
                    "key_size": {
                      "type": "integer"
                    },
                    "public_key": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    },
                    "sha256_fingerprint": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    }
                  },
                  "required": [
                    "algorithm",
                    "curve",
                    "key_size",
                    "public_key",
                    "sha256_fingerprint"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "algorithm": {
                      "type": "string",
                      "enum": [
                        "rsa"
                      ]
                    },
                    "exponent": {
                      "type": "integer"
                    },
                    "key_size": {
                      "type": "integer"
                    },
                    "modulus": {
                      "$comment": "Parsing errors in the module caused strings such as `-0:x5:34:...` to appear in the data, preventing the use of hex_bytes",
                      "type": "string"
                    },
                    "sha256_fingerprint": {
                      "$ref": "/minion/shared-types#/hex-bytes"
                    }
                  },
                  "required": [
                    "algorithm",
                    "exponent",
                    "modulus",
                    "sha256_fingerprint"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "self_issued": {
              "type": "boolean"
            },
            "self_signed": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "serial_number": {
              "type": "string"
            },
            "signature_algorithm": {
              "type": "string"
            },
            "signature_value": {
              "$ref": "/minion/shared-types#/hex-bytes"
            },
            "subject": {
              "$ref": "#/$defs/identifier"
            },
            "validity": {
              "type": "object",
              "properties": {
                "not_after": {
                  "type": "string"
                },
                "not_before": {
                  "type": "string"
                }
              },
              "required": [
                "not_after",
                "not_before"
              ],
              "additionalProperties": false
            },
            "version": {
              "oneOf": [
                {
                  "type": "integer",
                  "enum": [
                    1,
                    2,
                    3
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "v1",
                    "v2",
                    "v3"
                  ]
                }
              ]
            }
          },
          "required": [
            "issuer",
            "public_key_info",
            "self_issued",
            "serial_number",
            "signature_algorithm",
            "signature_value",
            "subject",
            "validity",
            "version"
          ],
          "additionalProperties": false
        },
        "as_pem": {
          "type": "string"
        },
        "hpkp_pin": {
          "$ref": "/minion/shared-types#/base64"
        },
        "sha1_fingerprint": {
          "$ref": "/minion/shared-types#/hex-bytes"
        },
        "sha256_fingerprint": {
          "$ref": "/minion/shared-types#/hex-bytes"
        },
        "spki_subject_fingerprint": {
          "$ref": "/minion/shared-types#/hex-bytes"
        }
      },
      "required": [
        "as_dict",
        "as_pem",
        "hpkp_pin",
        "sha1_fingerprint",
        "sha256_fingerprint",
        "spki_subject_fingerprint"
      ],
      "additionalProperties": false
    },
    "cipher": {
      "type": "object",
      "properties": {
        "cipher_suite": {
          "type": "string"
        },
        "is_anonymous": {
          "type": "boolean"
        },
        "key_size": {
          "type": [
            "integer",
            "null"
          ]
        },
        "openssl_name": {
          "type": "string"
        },
        "post_handshake_response": {
          "type": [
            "null",
            "string"
          ]
        },
        "ssl_version": {
          "type": "string",
          "enum": [
            "SSLV2",
            "SSLV3",
            "TLSV1",
            "TLSV1_1",
            "TLSV1_2",
            "TLSV1_3"
          ]
        }
      },
      "required": [
        "is_anonymous",
        "key_size",
        "openssl_name",
        "post_handshake_response",
        "ssl_version"
      ],
      "additionalProperties": false
    },
    "cipher_enumeration": {
      "type": "object",
      "properties": {
        "accepted_cipher_list": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/cipher"
          }
        },
        "error_message": {
          "type": "string"
        },
        "preferred_cipher": {
          "oneOf": [
            {
              "$ref": "#/$defs/cipher"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "identifier": {
      "type": "object",
      "properties": {
        "distinguished_name": {
          "type": "string"
        }
      },
      "patternProperties": {
        "^.*$": {
          "type": "string"
        }
      },
      "required": [
        "distinguished_name"
      ],
      "additionalProperties": false
    }
  }
}
