Skip to content

Commit

Permalink
- changed README from markdown to restructured text
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Krämer committed Jan 28, 2015
1 parent 9a97663 commit ddba15f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 138 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.rst

104 changes: 0 additions & 104 deletions README.md

This file was deleted.

43 changes: 11 additions & 32 deletions README.txt → README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ How to use it

Here is an example:

::
.. code:: python
try:
Expand All @@ -42,48 +42,27 @@ Here is an example:
if cres == k.AUTH_GSS_CONTINUE:
cres = k.authGSSClientStep(client, response)
if cres == -1:
print "clientstep error"
print( "clientstep error")
break
response = k.authGSSClientResponse(client)
if sres == k.AUTH_GSS_CONTINUE:
sres = k.authGSSServerStep(server, response)
if sres == -1:
print "serverstep error"
print( "serverstep error")
break
response = k.authGSSServerResponse(server)
print "round:", round
print "server status :", sres
print "client status :", cres
print( "round:", round)
print( "server status :", sres)
print( "client status :", cres)
round += 1
if sres == k.AUTH_GSS_COMPLETE and cres == k.AUTH_GSS_COMPLETE:
print "client: my username:", k.authGSSClientUserName(client)
print "server: who authenticated to me:", k.authGSSServerUserName(server)
print "server: my spn:", k.authGSSServerTargetName(server)
print "********* encryption test ***********"
err=k.authGSSClientWrap(client, encodestring("Hello"))
if err == 1:
encstring=k.authGSSClientResponse(client)
print "encstring:", encstring, encodestring("Hello")
decerr=k.authGSSClientUnwrap(server, encstring)
if decerr == 1:
encstring=k.authGSSServerResponse(server)
print decodestring(encstring)

# user case on wrap
import struct
import logging
logging.basicConfig(level=logging.INFO)
# set max size=1000 and server flags = AUTH_P_NONE|AUTH_P_INTEGRITY|AUTH_P_PRIVACY
err=k.authGSSClientWrap(client, encodestring(struct.pack("!L", 1000 | 0x07000000)+"Hello"), user="may-day")
if err == 1:
encstring=k.authGSSClientResponse(client)
print "encstring:", encstring, encodestring("Hello")
decerr=k.authGSSClientUnwrap(server, encstring)
if decerr == 1:
encstring=k.authGSSServerResponse(server)
print decodestring(encstring)
print( "client: my username:", k.authGSSClientUserName(client))
print( "server: who authenticated to me:", k.authGSSServerUserName(server))
print( "server: my spn:", k.authGSSServerTargetName(server))
else:
print("failed!")
What's not working
==================
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

from setuptools import setup

long_description = open("README.txt").read()
long_description = open("README.rst").read()

setup (
name = "kerberos-sspi",
version = "0.2",
description = "Kerberos high-level windows interface",
long_description=long_description,
author='Norman Krämer',
author_email='kraemer.norman@googlemail.com',
author_email='kraemer.norman@gmail.com',
url="https://github.com/may-day/kerberos-sspi",
py_modules=["kerberos_sspi"],
license='Apache Software License 2.0',
Expand Down

0 comments on commit ddba15f

Please sign in to comment.