XanaDublaKublaConch / pysdtoken

A pythonic (?) ctypes wrapper for RSA SecurID Tokens

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New Master - Mac Bugs

ssmithTaylor opened this issue · comments

Nice work on the rewrite, it looks nice!

There are a few issues that are preventing this from working on Mac, unfortunately I'm fairly limited on time currently so I can't submit suggested changes, but I can document what I ran into.

import ctypes.wintypes doesn't work on mac (or at least it's not working for me), I'd suggest making this import platform specific if possible in both _sdauto.py and pysdtoken.py.

The library load on mac isn't working, that is the right path, it just doesn't work for whatever reason. I reverted this back to the find_library approach and it seems to be working fine.

svc_get_code.argtypes on line 526 is causing the call to GetCurrentCode to fail, it doesn't seem to like the type of the serial variable (error is "expected LP_c_char_p instance instead of bytes). Commenting it out bypasses this, trying to convert it to the type it expects is possible, but it doesn't seem to like it. (to convert to c_char_p it wants bytes, but if I make it a bytes before converting to c_char_p I end up not getting a token code)

In my environment it doesn't like the relative import you're doing for _sdauto, may get a different result if installed though pypy though. Removing the . worked for me.

I'm thinking maybe I'll throw a hackintosh together to test with for future updates. I knew I would overlook something when I made major changes. I'm glad you got everything worked out in your environment. I'll try to get the fixes into the code and merged in when I get a chance.

I finally got a Mac OS X VM running in VirtualBox using the Apple Developer resources. I'll go through and try to fix up the Darwin stuff this week.