# Path: sslscan.py

# 
# Path: sslscan/exception.py
# class Timeout(Exception):
#     pass
# 
# Path: sslscan/kb.py
# class ECResult(object):
#     """
#     This class is used to store all information for a elliptic curve.
#     """
# 
#     def __init__(self, protocol_version, elliptic_curve):
#         self.protocol_version = protocol_version
#         self.elliptic_curve = elliptic_curve
# 
#     @property
#     def protocol_version_name(self):
#         return flextls.helper.get_version_name(self.protocol_version)


import flextls
from flextls.field import ServerECDHParamsField, ECParametersNamedCurveField
from flextls.protocol.handshake import Handshake, ServerKeyExchange, ServerKeyExchangeECDSA, DTLSv10Handshake
from flextls.protocol.handshake.extension import EllipticCurves, Extension
from sslscan import modules
from sslscan.exception import Timeout
from sslscan.kb import ECResult
from sslscan.module.scan import BaseScan
            # stop if we get an unexpected ec id
            if tmp_ec_id not in elliptic_curves:
                return detected_elliptic_curves

            detected_elliptic_curves.append(tmp_ec_id)
            elliptic_curves.remove(tmp_ec_id)

            count += 1
            if limit is not False and limit <= count:
                return detected_elliptic_curves

        return detected_elliptic_curves

    def run(self):
        kb = self._scanner.get_knowledge_base()
        for protocol_version in self._scanner.get_enabled_versions():
            if protocol_version == flextls.registry.version.SSLv2:
                continue

            cipher_suites = []
            for cipher_suite in flextls.registry.tls.cipher_suites[:]:
                if cipher_suite.key_exchange.startswith("ECD"):
                    cipher_suites.append(cipher_suite)

            elliptic_curves = flextls.registry.ec.named_curves[:]
            try:
                detected_elliptic_curves = self._scan_elliptic_curves(
                    protocol_version,
                    elliptic_curves=elliptic_curves
                )

# Path: sslscan.py

# 
# Path: sslscan/exception.py
# class Timeout(Exception):
#     pass
# 
# Path: sslscan/kb.py
# class ECResult(object):
#     """
#     This class is used to store all information for a elliptic curve.
#     """
# 
#     def __init__(self, protocol_version, elliptic_curve):
#         self.protocol_version = protocol_version
#         self.elliptic_curve = elliptic_curve
# 
#     @property
#     def protocol_version_name(self):
#         return flextls.helper.get_version_name(self.protocol_version)


# Path: sslscan/module/scan/server_elliptic_curves.py
import flextls
from flextls.field import ServerECDHParamsField, ECParametersNamedCurveField
from flextls.protocol.handshake import Handshake, ServerKeyExchange, ServerKeyExchangeECDSA, DTLSv10Handshake
from flextls.protocol.handshake.extension import EllipticCurves, Extension
from sslscan import modules
from sslscan.exception import Timeout
from sslscan.kb import ECResult
from sslscan.module.scan import BaseScan

            # stop if we get an unexpected ec id
            if tmp_ec_id not in elliptic_curves:
                return detected_elliptic_curves

            detected_elliptic_curves.append(tmp_ec_id)
            elliptic_curves.remove(tmp_ec_id)

            count += 1
            if limit is not False and limit <= count:
                return detected_elliptic_curves

        return detected_elliptic_curves

    def run(self):
        kb = self._scanner.get_knowledge_base()
        for protocol_version in self._scanner.get_enabled_versions():
            if protocol_version == flextls.registry.version.SSLv2:
                continue

            cipher_suites = []
            for cipher_suite in flextls.registry.tls.cipher_suites[:]:
                if cipher_suite.key_exchange.startswith("ECD"):
                    cipher_suites.append(cipher_suite)

            elliptic_curves = flextls.registry.ec.named_curves[:]
            try:
                detected_elliptic_curves = self._scan_elliptic_curves(
                    protocol_version,
                    elliptic_curves=elliptic_curves
                )

            except Timeout: