Skip to content

Commit

Permalink
drop phone registration support
Browse files Browse the repository at this point in the history
Boulder does not support phone registration anymore - as it is not really needed
remove it completely
  • Loading branch information
mswart committed Mar 13, 2016
1 parent 1309bb9 commit df4c305
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
5 changes: 2 additions & 3 deletions acmems/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,11 @@ def init_client(self):
'''
self.client = acme.client.Client(self.config.acme_server, self.key)

def register(self, emails=[], phones=[]):
def register(self, emails=[]):
resource = acme.messages.NewRegistration(
key=self.key.public_key(),
contact=tuple(
['mailto:{}'.format(mail) for mail in emails]
+ ['tel:{}'.format(phone) for phone in phones]))
['mailto:{}'.format(mail) for mail in emails]))
self.registration = self.client.register(resource)
self.dump_registration()

Expand Down
6 changes: 1 addition & 5 deletions bin/acme-register
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ group.add_argument('--register', action='store_true', default=False,
help='register key at ACME server')
group.add_argument('--email', action='append', dest='emails', default=[],
help='email contract info (e.g. for expire mail; multiple possible)')
group.add_argument('--phone', action='append', dest='phones', default=[],
help='phone contract info (multiple possible')
group.add_argument('--accept-terms-of-service', metavar='URL',
help='accept the terms of server (ToS) of the ACME server')
args = parser.parse_args()
Expand Down Expand Up @@ -78,9 +76,7 @@ print(' done')
if args.register:
print('Register ...', end='')
sys.stdout.flush()
manager.register(
emails=args.emails,
phones=args.phones)
manager.register(emails=args.emails)
print(' done')
if manager.tos_agreement_required():
print('You need to accept the terms of service at {}'.format(manager.tos_agreement_required()))
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def registered_account_dir(tmpdir_factory):
[listeners]'''.format(account_dir))
m.create_private_key()
m.init_client()
m.register(emails=['acme-{}-permanent@example.org'.format(os.getpid())], phones=['+12025551212'])
m.register(emails=['acme-{}-permanent@example.org'.format(os.getpid())])
if m.tos_agreement_required():
m.accept_terms_of_service(m.tos_agreement_required())
return account_dir
Expand Down
2 changes: 1 addition & 1 deletion tests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_register(tmpdir):
[listeners]'''.format(tmpdir))
m.create_private_key()
m.init_client()
m.register(emails=['acme-{}@example.org'.format(os.getpid())], phones=['+12025551212'])
m.register(emails=['acme-{}@example.org'.format(os.getpid())])
tos = m.tos_agreement_required()
with pytest.raises(exceptions.NeedToAgreeToTOS) as e:
m.refresh_registration()
Expand Down

0 comments on commit df4c305

Please sign in to comment.