def setup_default_storage(self): if self.default_storage is None: self.default_storage = 'none' from acmems.storages import setup self.storages[self.default_storage] = setup('none', ()) if self.default_storage is not False: self.default_storage = self.storages[self.default_storage]
def setup_default_validator(self): if self.default_validator is None: self.default_validator = 'http' from acmems.challenges import setup self.validators['http'] = setup('http01', ()) if self.default_validator is not False: self.default_validator = self.validators[self.default_validator]
def http_server(request): validator = challenges.setup('http01', (('listener', '127.0.0.1:5002'),)) services = validator.start() def fin(): for service, thread in services: service.shutdown() thread.join() request.addfinalizer(fin) return validator
def parse_storage_group(self, name, options): option, value = options.pop(0) if option != 'type': raise ConfigurationError('A storage must start with the type value!') from acmems.storages import setup self.storages[name] = setup(value, options)
def parse_verification_group(self, name, options): option, value = options.pop(0) if option != 'type': raise ConfigurationError('A verification must start with the type value!') from acmems.challenges import setup self.validators[name] = setup(value, options)