Broken python bindings?

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Broken python bindings?

by Davide Pesavento :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
the following Python code does not work.

---
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from cryptlib_py import *

cryptInit()
privKeyContext = cryptCreateContext(CRYPT_UNUSED, CRYPT_ALGO_RSA)
privKeyContext.CTXINFO_LABEL = "foo"
---

Traceback (most recent call last):
 File "./test.py", line 8, in <module>
   privKeyContext.CTXINFO_LABEL = "foo"
 File "<string>", line 32, in __setattr__
cryptlib_py.CryptException: (-2, 'Bad argument, parameter 2')

The equivalent C code works fine. I'm using cryptlib-3.3.2 and
python-2.6.2 on a Gentoo Linux amd64 system. Please help.

Thanks,
Davide

_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Re: Broken python bindings?

by Davide Pesavento :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, May 10, 2009 at 13:53, Davide Pesavento <davidepesa@...> wrote:

> Hi,
> the following Python code does not work.
>
> ---
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> from cryptlib_py import *
>
> cryptInit()
> privKeyContext = cryptCreateContext(CRYPT_UNUSED, CRYPT_ALGO_RSA)
> privKeyContext.CTXINFO_LABEL = "foo"
> ---
>
> Traceback (most recent call last):
>  File "./test.py", line 8, in <module>
>    privKeyContext.CTXINFO_LABEL = "foo"
>  File "<string>", line 32, in __setattr__
> cryptlib_py.CryptException: (-2, 'Bad argument, parameter 2')
>
> The equivalent C code works fine. I'm using cryptlib-3.3.2 and
> python-2.6.2 on a Gentoo Linux amd64 system. Please help.
>

Please see also https://bugs.gentoo.org/show_bug.cgi?id=268947

Thanks,
Davide

_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.