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

sign failed with return value -1 #11

Open
kmiloaguilar opened this issue Dec 26, 2016 · 3 comments
Open

sign failed with return value -1 #11

kmiloaguilar opened this issue Dec 26, 2016 · 3 comments

Comments

@kmiloaguilar
Copy link

So steps to reproduce:

  1. create a virtual env
  2. clone this repository/master
  3. install dependencies
  4. run py.test
  5. results:

test_sign_and_verify failes.

================================================================================= FAILURES ==================================================================================
___________________________________________________________________________ test_sign_and_verify ____________________________________________________________________________

envelope = '\n        <soap:Envelope\n            xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"\n            xmlns:wsse=...:Body>\n            <Foo xmlns="http://example.com">Text</Foo>\n          </soap:Body>\n        </soap:Envelope>\n    '
cert_path = '/private/var/folders/sh/6c_c8s5n3v7fpg7n5ry27jxr0000gn/T/pytest-of-camilo/pytest-0/test_sign_and_verify0/cert.pem'
key_path = '/private/var/folders/sh/6c_c8s5n3v7fpg7n5ry27jxr0000gn/T/pytest-of-camilo/pytest-0/test_sign_and_verify0/key.pem'

    def test_sign_and_verify(envelope, cert_path, key_path):
>       signed = signing.sign(envelope, key_path, cert_path)

test/test_signing.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wsse/signing.py:139: in sign
    ctx.sign(signature)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   Error: (u'sign failed with return value', -1)

src/xmlsec/ds.pyx:79: Error
========================================================================= 1 failed in 0.12 seconds ==========================================================================
@brad
Copy link
Member

brad commented Dec 27, 2016

@kmiloaguilar Can you please share on which version of Python this occured? Also, the output of pip freeze. I just reran the Travis tests and was unable to reproduce the issue there or locally in a Python 3.4 virtualenv.

@kmiloaguilar
Copy link
Author

Python version = 2.7.13
OS: macOS 10.12.2

Pip freeze? is the same one in here since I created a virtualenv just for this.

@0xbepresent
Copy link

It's the same for me.

Python version = 2.7.10
OS: macOS = 10.12.3

platform darwin -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2
rootdir: /Users/misa/development/webpaysoap/env/lib/python2.7/site-packages/wsse/py-wsse, inifile:
collected 1 items

test/test_signing.py F

================================================================================================= FAILURES =================================================================================================
___________________________________________________________________________________________ test_sign_and_verify ___________________________________________________________________________________________
test/test_signing.py:20: in test_sign_and_verify
    signed = signing.sign(envelope, key_path, cert_path)
wsse/signing.py:139: in sign
    ctx.sign(signature)
src/xmlsec/ds.pyx:79: in xmlsec.ds.SignatureContext.sign (src/xmlsec/ds.c:1966)
    ???
E   Error: (u'sign failed with return value', -1)


But I tested also with a linux platform and the test passed, so the problem maybe is in a library which is different in mac OS.

(.venv) asim@ubuntu:~/py-wsse$ python runtests.py
=========================================================================================== test session starts ============================================================================================
platform linux2 -- Python 2.7.12, pytest-3.0.6, py-1.4.32, pluggy-0.4.0
rootdir: /home/asim/py-wsse, inifile:
collected 1 items

test/test_signing.py .

========================================================================================= 1 passed in 0.34 seconds =========================================================================================

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

3 participants