mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 18:34:41 +02:00
Remove legacy code from project
This commit is contained in:
@@ -1,14 +1,6 @@
|
||||
from letsencrypt.client.challenge import Challenge
|
||||
import textwrap
|
||||
|
||||
############################################################
|
||||
# Possible addition to challenge structure: priority parameter
|
||||
# If only DVSNI and Payment are required, the user might want
|
||||
# to be validated before submitting payment, allowing the user
|
||||
# to gain confidence in the system. If things do go poorly the
|
||||
# user has less invested in that particular session/transaction.
|
||||
#############################################################
|
||||
|
||||
###########################################################
|
||||
# Interactive challenge displays the string sent by the CA
|
||||
# formatted to fit on the screen of the client
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
from letsencrypt.client.challenge import Challenge
|
||||
import dialog
|
||||
|
||||
############################################################
|
||||
# Possible addition to challenge structure: priority parameter
|
||||
# If only DVSNI and Payment are required, the user might want
|
||||
# to be validated before submitting payment, allowing the user
|
||||
# to gain confidence in the system. If things do go poorly the
|
||||
# user has less invested in that particular session/transaction.
|
||||
#############################################################
|
||||
|
||||
class Payment_Challenge(Challenge):
|
||||
# Possible reasons: Wildcard Certificates, EV certificates
|
||||
# Malware scanning services, Organization or Identity validated certs
|
||||
def __init__(self, url, reason="Specialty Certificate"):
|
||||
self.url = url
|
||||
self.reason = reason
|
||||
self.times_performed = 0
|
||||
|
||||
def cleanup(self):
|
||||
# Currently, payment challenges do not appear to require any cleanup.
|
||||
pass
|
||||
|
||||
def perform(self, quiet=True):
|
||||
if quiet:
|
||||
dialog.Dialog().msgbox(self.get_display_string(), width=70)
|
||||
else:
|
||||
print self.get_display_string()
|
||||
raw_input('')
|
||||
|
||||
self.times_performed += 1
|
||||
return True
|
||||
|
||||
|
||||
def get_display_string(self):
|
||||
if self.times_performed == 0:
|
||||
return "You are buying " + self.formatted_reasons() + "You will need to visit\n " + self.url + "\nto submit your payment.\nPlease press Enter once your payment has been submitted."
|
||||
|
||||
# The user has tried at least once... display a different message
|
||||
else:
|
||||
return "The CA did not record your payment, please visit " + self.url + " for more information or to finish processing your transaction.\nPress Enter to continue"
|
||||
|
||||
|
||||
def formatted_reasons(self):
|
||||
return "\n\t* %s\n" % self.reason
|
||||
Reference in New Issue
Block a user