Skip to content

Commit 1be3d69

Browse files
author
Ben Weaver
committed
Add setup.py
1 parent 95a901e commit 1be3d69

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
*.py?
2+
build
3+
README.html
4+
dist
5+
*.egg-info

sasl/digest_md5.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
class DigestMD5(mech.Mechanism):
1616

17+
SECURE = True
18+
1719
def __init__(self, auth):
1820
self.auth = auth
1921

@@ -74,7 +76,7 @@ def verify_challenge(self, data):
7476
def receive_ack(self, data):
7577
## The client has acknowledges the rspauth sent;
7678
## authentication was successful.
77-
return (True, None)
79+
return (True, '')
7880

7981
## Client
8082
## 1. Respond to server challenge.
@@ -122,7 +124,11 @@ def acknowledge(self, expect, data):
122124
## If the rspauth matches the expected value, authentication
123125
## was successful. The server expects an empty reply that
124126
## confirms acknowledgement.
125-
return (verify.get('rspauth') == expect, '')
127+
return (verify.get('rspauth') == expect and self.ack_accepted, '')
128+
129+
def ack_accepted(self, data):
130+
assert data == ''
131+
return (True, None)
126132

127133
## Grammars
128134

setup.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from __future__ import absolute_import
2+
from setuptools import setup, find_packages
3+
4+
setup(
5+
name = 'python-sasl',
6+
version = '0.1',
7+
description = 'A SASL implementation.',
8+
author = 'Medium',
9+
author_email = 'labs@thisismedium.com',
10+
license = 'BSD',
11+
keywords = 'security protocol rfc sasl',
12+
13+
packages = list(find_packages(exclude=('examples', ))),
14+
install_requires = ['md.py']
15+
)

0 commit comments

Comments
 (0)