Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #15

Open
masihyeganeh opened this issue Apr 17, 2016 · 7 comments
Open

Compile error #15

masihyeganeh opened this issue Apr 17, 2016 · 7 comments

Comments

@masihyeganeh
Copy link
Contributor

I couldn't install your package. It has compile errors either in python 2 or 3.
Here is output of pip install srp==1.0.5:

srp/_srp.c:928:11: error: no member named 'ob_type' in 'PyVerifier'
    self->ob_type->tp_free( (PyObject *) self );
    ~~~~  ^
srp/_srp.c:936:11: error: no member named 'ob_type' in 'PyUser'
    self->ob_type->tp_free( (PyObject *) self );
    ~~~~  ^
srp/_srp.c:1166:12: warning: implicit declaration of function 'PyString_FromString' is invalid in C99 [-Wimplicit-function-declaration]
    return PyString_FromString( srp_verifier_get_username(self->ver) );
           ^
srp/_srp.c:1166:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
    return PyString_FromString( srp_verifier_get_username(self->ver) );
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1177:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
    return PyString_FromString( srp_user_get_username(self->usr) );
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1224:16: warning: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Wimplicit-function-declaration]
        return PyString_FromStringAndSize(u, key_len);
               ^
srp/_srp.c:1224:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
        return PyString_FromStringAndSize(u, key_len);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1241:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
        return PyString_FromStringAndSize(u, key_len);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1290:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
        return PyString_FromStringAndSize((const char *) bytes_HAMK,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1341:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
        return PyString_FromStringAndSize((const char *) bytes_M, len_M);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1600:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
        return;
        ^
srp/_srp.c:1610:29: warning: implicit declaration of function 'PyString_Check' is invalid in C99 [-Wimplicit-function-declaration]
            if ( randstr && PyString_Check(randstr))
                            ^
srp/_srp.c:1614:22: warning: implicit declaration of function 'PyString_AsStringAndSize' is invalid in C99 [-Wimplicit-function-declaration]
                if (!PyString_AsStringAndSize(randstr, &buff, &slen))
                     ^
srp/_srp.c:1631:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
        return;
        ^
srp/_srp.c:1636:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
        return;
        ^
srp/_srp.c:1638:9: warning: implicit declaration of function 'Py_InitModule3' is invalid in C99 [-Wimplicit-function-declaration]
    m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a implementation");
        ^
srp/_srp.c:1638:7: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
    m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a implementation");
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1641:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
        return;
        ^
12 warnings and 6 errors generated.
error: command 'clang' failed with exit status 1

I just looked at your code and it seems to have pure python and cython version.
Is there anyway to make the cython version optional in install time?

It seems that your package is only SRP implementation in python. I need it for my project.

Thanks

@cocagne
Copy link
Owner

cocagne commented Apr 18, 2016

Based on your error messages, it looks like you're missing the Python
header files needed to build C extension modules. As you noted, the C
version is not required though. The easiest way to get up and running is
probably to just clone the git repository and comment out the extension
module in the setup.py file. It'll then install the pure Python and
ctypes-based implementation. The ctypes version is almost as fast as the C
extension so it'll probably be good enough.

Btw, what's your project?

Tom

On Sun, Apr 17, 2016 at 12:47 PM, Masih Yeganeh notifications@github.com
wrote:

I couldn't install your package. It has compile errors either in python 2
or 3.
Here is output of pip install srp==1.0.5:

srp/_srp.c:928:11: error: no member named 'ob_type' in 'PyVerifier'
self->ob_type->tp_free( (PyObject *) self );
~~~~ ^
srp/_srp.c:936:11: error: no member named 'ob_type' in 'PyUser'
self->ob_type->tp_free( (PyObject *) self );
~~~~ ^
srp/_srp.c:1166:12: warning: implicit declaration of function 'PyString_FromString' is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString( srp_verifier_get_username(self->ver) );
^
srp/_srp.c:1166:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyString_FromString( srp_verifier_get_username(self->ver) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1177:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyString_FromString( srp_user_get_username(self->usr) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1224:16: warning: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromStringAndSize(u, key_len);
^
srp/_srp.c:1224:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyString_FromStringAndSize(u, key_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1241:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyString_FromStringAndSize(u, key_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1290:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyString_FromStringAndSize((const char *) bytes_HAMK,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1341:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyString_FromStringAndSize((const char *) bytes_M, len_M);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1600:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
return;
^
srp/_srp.c:1610:29: warning: implicit declaration of function 'PyString_Check' is invalid in C99 [-Wimplicit-function-declaration]
if ( randstr && PyString_Check(randstr))
^
srp/_srp.c:1614:22: warning: implicit declaration of function 'PyString_AsStringAndSize' is invalid in C99 [-Wimplicit-function-declaration]
if (!PyString_AsStringAndSize(randstr, &buff, &slen))
^
srp/_srp.c:1631:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
return;
^
srp/_srp.c:1636:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
return;
^
srp/_srp.c:1638:9: warning: implicit declaration of function 'Py_InitModule3' is invalid in C99 [-Wimplicit-function-declaration]
m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a implementation");
^
srp/_srp.c:1638:7: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a implementation");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1641:9: error: non-void function 'init_srp' should return a value [-Wreturn-type]
return;
^
12 warnings and 6 errors generated.
error: command 'clang' failed with exit status 1

I just looked at your code and it seems to have pure python and cython
version.
Is there anyway to make the cython version optional in install time?

It seems that your package is only SRP implementation in python. I need it
for my project.

Thanks


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#15

@masihyeganeh
Copy link
Contributor Author

I'm not sure how but it was because of Python 3.
It would be great if you could make it work with both versions.
I did it with the C code and made a pull request, but other files better be
compatible with both Python versions.
In pure Python is as easy as long to int and str to bytes
conversion. (But somehow it should remain compatible with Python 2).

I'm writing an interface to a web site that uses SRP for login :)
On Apr 18, 2016 05:54, "Tom Cocagne" notifications@github.com wrote:

Based on your error messages, it looks like you're missing the Python
header files needed to build C extension modules. As you noted, the C
version is not required though. The easiest way to get up and running is
probably to just clone the git repository and comment out the extension
module in the setup.py file. It'll then install the pure Python and
ctypes-based implementation. The ctypes version is almost as fast as the C
extension so it'll probably be good enough.

Btw, what's your project?

Tom

On Sun, Apr 17, 2016 at 12:47 PM, Masih Yeganeh notifications@github.com
wrote:

I couldn't install your package. It has compile errors either in python 2
or 3.
Here is output of pip install srp==1.0.5:

srp/_srp.c:928:11: error: no member named 'ob_type' in 'PyVerifier'
self->ob_type->tp_free( (PyObject *) self );

srp/_srp.c:936:11: error: no member named 'ob_type' in 'PyUser'
self->ob_type->tp_free( (PyObject *) self );
~~~~ ^
srp/_srp.c:1166:12: warning: implicit declaration of function
'PyString_FromString' is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString( srp_verifier_get_username(self->ver) );
^
srp/_srp.c:1166:12: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromString( srp_verifier_get_username(self->ver) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1177:12: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromString( srp_user_get_username(self->usr) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1224:16: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
return PyString_FromStringAndSize(u, key_len);
^
srp/_srp.c:1224:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize(u, key_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1241:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize(u, key_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1290:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize((const char *) bytes_HAMK,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1341:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize((const char *) bytes_M, len_M);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1600:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
srp/_srp.c:1610:29: warning: implicit declaration of function
'PyString_Check' is invalid in C99 [-Wimplicit-function-declaration]
if ( randstr && PyString_Check(randstr))
^
srp/_srp.c:1614:22: warning: implicit declaration of function
'PyString_AsStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
if (!PyString_AsStringAndSize(randstr, &buff, &slen))
^
srp/_srp.c:1631:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
srp/_srp.c:1636:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
srp/_srp.c:1638:9: warning: implicit declaration of function
'Py_InitModule3' is invalid in C99 [-Wimplicit-function-declaration]
m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a
implementation");
^
srp/_srp.c:1638:7: warning: incompatible integer to pointer conversion
assigning to 'PyObject *' (aka 'struct _object *') from 'int'
[-Wint-conversion]
m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a
implementation");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1641:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
12 warnings and 6 errors generated.
error: command 'clang' failed with exit status 1

I just looked at your code and it seems to have pure python and cython
version.
Is there anyway to make the cython version optional in install time?

It seems that your package is only SRP implementation in python. I need it
for my project.

Thanks

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
<https://github.com/cocagne/pysrp/issues/15>


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#15 (comment)

@cocagne
Copy link
Owner

cocagne commented Apr 18, 2016

Ah, cool. I'll try and get to your patch in a day or two. Thanks for
sending it. If you haven't noticed it yet, you may want to take a look at
the rfc5054_compat branch. It's more compatible with other SRP
implementations. Dunno if you'll need it or not but worth mentioning in
case you run into trouble. Eventually ill probably merge it to mainline.
On Apr 18, 2016 3:44 AM, "Masih Yeganeh" notifications@github.com wrote:

I'm not sure how but it was because of Python 3.
It would be great if you could make it work with both versions.
I did it with the C code and made a pull request, but other files better be
compatible with both Python versions.
In pure Python is as easy as long to int and str to bytes
conversion. (But somehow it should remain compatible with Python 2).

I'm writing an interface to a web site that uses SRP for login :)

On Apr 18, 2016 05:54, "Tom Cocagne" notifications@github.com wrote:

Based on your error messages, it looks like you're missing the Python
header files needed to build C extension modules. As you noted, the C
version is not required though. The easiest way to get up and running is
probably to just clone the git repository and comment out the extension
module in the setup.py file. It'll then install the pure Python and
ctypes-based implementation. The ctypes version is almost as fast as the C
extension so it'll probably be good enough.

Btw, what's your project?

Tom

On Sun, Apr 17, 2016 at 12:47 PM, Masih Yeganeh notifications@github.com
wrote:

I couldn't install your package. It has compile errors either in python 2
or 3.
Here is output of pip install srp==1.0.5:

srp/_srp.c:928:11: error: no member named 'ob_type' in 'PyVerifier'
self->ob_type->tp_free( (PyObject *) self );

srp/_srp.c:936:11: error: no member named 'ob_type' in 'PyUser'
self->ob_type->tp_free( (PyObject *) self );
~~~~ ^
srp/_srp.c:1166:12: warning: implicit declaration of function
'PyString_FromString' is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString( srp_verifier_get_username(self->ver) );
^
srp/_srp.c:1166:12: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromString( srp_verifier_get_username(self->ver) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1177:12: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromString( srp_user_get_username(self->usr) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1224:16: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
return PyString_FromStringAndSize(u, key_len);
^
srp/_srp.c:1224:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize(u, key_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1241:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize(u, key_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1290:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize((const char *) bytes_HAMK,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1341:16: warning: incompatible integer to pointer conversion
returning 'int' from a function with result type 'PyObject *' (aka 'struct
_object *') [-Wint-conversion]
return PyString_FromStringAndSize((const char *) bytes_M, len_M);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1600:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
srp/_srp.c:1610:29: warning: implicit declaration of function
'PyString_Check' is invalid in C99 [-Wimplicit-function-declaration]
if ( randstr && PyString_Check(randstr))
^
srp/_srp.c:1614:22: warning: implicit declaration of function
'PyString_AsStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
if (!PyString_AsStringAndSize(randstr, &buff, &slen))
^
srp/_srp.c:1631:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
srp/_srp.c:1636:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
srp/_srp.c:1638:9: warning: implicit declaration of function
'Py_InitModule3' is invalid in C99 [-Wimplicit-function-declaration]
m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a
implementation");
^
srp/_srp.c:1638:7: warning: incompatible integer to pointer conversion
assigning to 'PyObject *' (aka 'struct _object *') from 'int'
[-Wint-conversion]
m = Py_InitModule3("srp._srp", srp_module_methods,"SRP-6a
implementation");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
srp/_srp.c:1641:9: error: non-void function 'init_srp' should return a
value [-Wreturn-type]
return;
^
12 warnings and 6 errors generated.
error: command 'clang' failed with exit status 1

I just looked at your code and it seems to have pure python and cython
version.
Is there anyway to make the cython version optional in install time?

It seems that your package is only SRP implementation in python. I need it
for my project.

Thanks

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
<https://github.com/cocagne/pysrp/issues/15>


You are receiving this because you authored the thread.

Reply to this email directly or view it on GitHub
#15 (comment)


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#15 (comment)

@masihyeganeh
Copy link
Contributor Author

You mean master branch is not compatible with rfc5054?
Because I believe that the website is using rfc5054.
I need it to be a pip module, so I can use it in production. (CI stuff)
It would be great if we can make it ready together.

Thanks

@cocagne
Copy link
Owner

cocagne commented Apr 19, 2016

Well, it's not truly possible for an SRP implementation to be compatible
with rfc5054 in the general sense. It's an SSL RFC, not an RFC specifically
designed to make SRP a general non-SSL-related standard. However, the
ensuing years would suggest that it has become the de facto,
inter-implementation standard. I wasn't aware of this during the initial
implementation of pysrp so I only used that rfc loosely. The implementation
wound up being almost identical to that of other implementations that
claimed to follow the RFC with the single exception of the hashing
algorithm. A few kind contributors noticed this discrepancy and submitted
patches to align the pysrp implementation with what other libraries
required. Thus the rfc5054_compat branch was born.

In terms of the roadmap for pysrp, it's been on my agenda for quite a while
now to merge the rfc5054_compat branch into pysrp and add Python 3 support
(which you've already addressed, awesome!). The main requirement for the
rfc5054 merge is that it needs to be, by default, backwards compatible with
the original implementation. I have no way of knowing how many people rely
upon pysrp continuing to operate in the traditional manner but the number
of questions I've received over the years suggests that it's a decent
number. Overall, the rfc5054 branch is superior in every way (including a
few bug fixes that weren't easy to backport) but I'm sure there would be
quite a few ticked-off users if a pip install suddenly broke their
applications.

Adding support for both hashing algorithms and defaulting it to the
original implementation isn't overly difficult. It's just a little
time-consuming.... maybe a day's worth of effort. The only reason I haven't
just done it already is that I can't find a reasonable excuse to do it
during business hours. This is purely a free-time project for me these days
and by the time I put my 5-year-old to bed, my brains are shot. The ability
to dredge up the motivation to start on this from scratch has eluded me for
a long time. If you'd be willing to take a crack at solving the backwards
compatibility issue, I'd be more than happy to collaborate on it and get it
merged in and released. Doing so is definitely in the best interest of both
the project and all of it's users so if you have the time and motivation,
I'll help in any way I can.

Cheers,

Tom

On Mon, Apr 18, 2016 at 6:28 PM, Masih Yeganeh notifications@github.com
wrote:

You mean master branch is not compatible with rfc5054?
Because I believe that the website is using rfc5054.
I need it to be a pip module, so I can use it in production. (CI stuff)
It would be great if we can make it ready together.

Thanks


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#15 (comment)

@masihyeganeh
Copy link
Contributor Author

That's great.
I think changing major version world prevent break of dependent projects. I'm not sure about pip, I'm coming from npm and such package managers that support Semantic Version.
Anyway, to convert the pure Python version, we can use 2to3 too.

I'm doing know much about SRP and the RFC, I just needed it in my project, but if you can give me a list of things to do to make it ready for merge, I would do them.

@cocagne
Copy link
Owner

cocagne commented Apr 20, 2016

No knowledge of SRP or the RFC is necessary. The code just needs to work
when interacting with both old, non-rfc5054-compliant pysrp implementations
and with the compliant implementations. It just means that the
user-interface needs to accept a flag saying whether or not to use rfc5054
or the old implementation and then putting a few if-statements in the
underlying code to select the hashing implementation to use based off of
the flag. Simple stuff.

On Tue, Apr 19, 2016 at 4:21 AM, Masih Yeganeh notifications@github.com
wrote:

That's great.
I think changing major version world prevent break of dependent projects.
I'm not sure about pip, I'm coming from npm and such package managers that
support Semantic Version.
Anyway, to convert the pure Python version, we can use 2to3
https://docs.python.org/3.0/library/2to3.html too.

I'm doing know much about SRP and the RFC, I just needed it in my project,
but if you can give me a list of things to do to make it ready for merge, I
would do them.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#15 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants