def __init__(self, file_bag, options, protocol=DEFAULT_PROTO): BaseProfileFactory.__init__(self, file_bag, options) self.protocol = protocol self.cert_factory = CertFactory(self.file_bag) self.init_options() self.init_cert_requests() self.add_profiles()
def __init__(self, file_bag, options): BaseProfileFactory.__init__(self, file_bag, options) # produce a self-signed server certificate cert_factory = CertFactory(self.file_bag) certreq_n_keys = cert_factory.mk_certreq_n_keys(SSLPROTO_CN) certnkey = cert_factory.sign_cert_req(certreq_n_keys, None) self.init_protocols(options.protocols) for proto in self.protocols: ciphers = self.get_ciphers(proto, options.ciphers) for cipher in ciphers: profile = SSLServerProtoProfile(SSLServerProtoSpec(proto, cipher), certnkey) self.add_profile(profile)
def __init__(self, file_bag, options): BaseProfileFactory.__init__(self, file_bag, options) # produce a self-signed server certificate cert_factory = CertFactory(self.file_bag) certreq_n_keys = cert_factory.mk_certreq_n_keys(SSLPROTO_CN) certnkey = cert_factory.sign_cert_req(certreq_n_keys, None) self.init_protocols(options.protocols) for proto in self.protocols: ciphers = self.get_ciphers(proto, options.ciphers) for cipher in ciphers: profile = SSLServerProtoProfile( SSLServerProtoSpec(proto, cipher), certnkey) self.add_profile(profile)
def __init__(self, file_bag, options): BaseProfileFactory.__init__(self, file_bag, options) self.add_profile(DummyServerProfile(False)) self.add_profile(DummyServerProfile(True))