pyme-help Mailing List for PyMe (Page 2)
Status: Beta
Brought to you by:
belyi
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
(1) |
Aug
(5) |
Sep
|
Oct
(5) |
Nov
(3) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(1) |
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(4) |
Oct
|
Nov
(7) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
(7) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
(5) |
Nov
(3) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(11) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Uldis A. <uld...@gm...> - 2009-11-26 07:47:45
|
I had exactly the same error. The reason is an unexpected exception in pyPassphraseCb. The error is actualy in pygpgme_exception_init which might even work if you have suitable PYTHONPATH or something (I didn't manage to get it working though). Here is the patch --- helpers.c.ORIG 2009-11-25 08:53:46.000000000 +0200 +++ helpers.c 2009-11-25 08:53:51.000000000 +0200 @@ -29,7 +29,7 @@ void pygpgme_exception_init(void) { if (GPGMEError == NULL) { PyObject *errors; - errors = PyImport_ImportModule("errors"); + errors = PyImport_ImportModule("pyme.errors"); if (errors) { GPGMEError=PyDict_GetItemString(PyModule_GetDict(errors), "GPGMEError"); Py_XINCREF(GPGMEError); |
From: Igor B. <be...@us...> - 2009-11-24 03:46:40
|
Igor Belyi wrote: > I'll try to look into the building on Windows problem over the upcoming > weekend and will get back to you. Just a small update. I can build with Python 2.6 on win32 just fine using "simply run make" approach. The problem is that after installation it does not work in Python 2.6. The "import pyme.core" command results in "DLL load failed: The specified procedure could not be found." I'm still investigating what changes in initialization requirement are not met - the only required before "init_pygpgme" function is correctly exported in the built _pygpgme.pyd DLL. Cheers, Igor |
From: Igor B. <be...@us...> - 2009-11-20 21:00:08
|
Bernhard Reiter wrote: >> I wish Igor would chime in here since he has built it for >> win32 in the past. >> > > Yes, this would be helpful. But this is Free Software and if Igor is somehow > unable to respond, the community can take over in principle. > My apologies for not being there for so long... I'm slowly getting back. I'll try to look into the building on Windows problem over the upcoming weekend and will get back to you. Short answer is that I did use MinGW and the steps were "just run 'make'". I'll need to look closer at the problem you are facing. Cheers, Igor |
From: Bernhard R. <ber...@in...> - 2009-10-14 07:45:00
|
Tony, Am Dienstag, 13. Oktober 2009 17:48:20 schrieb Tony Caduto: > Yes, I tried it under minsys (the shell for mingw32) which I use to > build libpq.dll for postgresql, and > I still could not get it to build, I generated the swig files but still > no love, seems you have to know the exact steps > to build it. thanks for trying, could you also place your excat logs and steps somewhere? There is a small chance that I could peek a look at it. > I wish Igor would chime in here since he has built it for > win32 in the past. Yes, this would be helpful. But this is Free Software and if Igor is somehow unable to respond, the community can take over in principle. > A lot of other people are having trouble building it for win32, I found > some questions on stackoverflow.com and most have simply > given up on Pyme, which is a shame but oh well. Again, thanks for trying pyme! Sorry for not being in a position to really help. Bernhard -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Tony C. <ton...@am...> - 2009-10-13 15:46:50
|
Bernhard Reiter wrote: > There is a bash shell available for windows that you could try. > (Comes out of the Cygwin environment as far as I remember.) > Also you could compare the commands executed on a GNU system > save them to a file and then create a .bat file for it. > pyme is quite small, so this sounds doable to me. > (I haven't checked, but I think that you can use the generate swig file > anyway, so no need for swig.) > > Yes, I tried it under minsys (the shell for mingw32) which I use to build libpq.dll for postgresql, and I still could not get it to build, I generated the swig files but still no love, seems you have to know the exact steps to build it. I wish Igor would chime in here since he has built it for win32 in the past. A lot of other people are having trouble building it for win32, I found some questions on stackoverflow.com and most have simply given up on Pyme, which is a shame but oh well. Later, Tony |
From: Bernhard R. <ber...@in...> - 2009-10-13 09:37:44
|
Am Dienstag, 13. Oktober 2009 07:03:51 schrieb Tony Caduto: > Yes, it shouldn't be rocket science but it seems to be. > I spent about 3 hours fooling around with mingw trying to get it to build. > I can build other compiled extensions like pycrypto without issue, but > the problem with pyme is the distutils setup.py > is not setup like other extensions, it expects a working unix shell so > it does not build with distutils on win32 with > mingw32. There is a bash shell available for windows that you could try. (Comes out of the Cygwin environment as far as I remember.) Also you could compare the commands executed on a GNU system save them to a file and then create a .bat file for it. pyme is quite small, so this sounds doable to me. (I haven't checked, but I think that you can use the generate swig file anyway, so no need for swig.) > We are probably going to have to use some other solution if a 2.6 > compatible version does > not come along at some point. Sorry I cannot help more (for lack of time, and I just assume it is not a project you would want to pay for...). There is also https://launchpad.net/pygpgme as an alternative, but I do not know if this is easier on windows. Best, Bernhard -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Tony C. <ton...@am...> - 2009-10-13 06:19:58
|
Bernhard Reiter wrote: > On Tuesday 29 September 2009, Tony Caduto wrote: > >> Any chance a version for win32 compiled with Python 2.6 could be released? >> Or possibly provide info on how it can be compiled? >> > > I haven't build pyme on windows yet, but I guess it will not be rocket > science. You probably will need to build a recent version of > gpgme first and then pyme with the generic instruction how to build python > extension packages on windows (you will be able to find latter one this on the > web). > > Yes, it shouldn't be rocket science but it seems to be. I spent about 3 hours fooling around with mingw trying to get it to build. I can build other compiled extensions like pycrypto without issue, but the problem with pyme is the distutils setup.py is not setup like other extensions, it expects a working unix shell so it does not build with distutils on win32 with mingw32. We are probably going to have to use some other solution if a 2.6 compatible version does not come along at some point. Later, Tony |
From: Bernhard R. <ber...@in...> - 2009-10-12 16:37:13
|
On Tuesday 29 September 2009, Tony Caduto wrote: > Any chance a version for win32 compiled with Python 2.6 could be released? > Or possibly provide info on how it can be compiled? I haven't build pyme on windows yet, but I guess it will not be rocket science. You probably will need to build a recent version of gpgme first and then pyme with the generic instruction how to build python extension packages on windows (you will be able to find latter one this on the web). My last compilations on windows were with MinGW but it might be as well just work with the Microsoft compilers. If you have problems to compile gpgme ask on the public gnupg-devel@ or gpg4win-devel@ list. Ask again here if you are fully stuck and you did not receive help from the other sources. Best Regards, Bernhard -- Managing Director - Owner: www.intevation.net (Free Software Company) Deputy Germany Coordinator: fsfeurope.org. Coordinator: Kolab-Konsortium.com. Intevation GmbH, Neuer Graben 17, Osnabrück, DE; AG Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Tony C. <ton...@am...> - 2009-09-29 17:54:01
|
Hi, Any chance a version for win32 compiled with Python 2.6 could be released? Or possibly provide info on how it can be compiled? Thanks, Tony |
From: Bernhard R. <ber...@in...> - 2009-06-23 13:27:48
|
Hi Thomas, On Monday 22 June 2009, Thomas Hirsch wrote: > On some of my systems (kubuntu jaunty), I am running into the following > error(s) when trying to sign some Data(). On others (ubuntu jaunty), I > am not. personally I would try to find out the important difference that makes the difference. So what is the difference in installed versions? Maybe you are having gnupg2 installed on the others. I would try with a newer gnupg2 > Invocation of gpgme_op_sign: Unspecified source: General error (0,1) > > This seems to be related to having or not a gpg key manager. You probably mean "pinentry"? > A similar > report was posted to the forums in May. > https://sourceforge.net/forum/message.php?msg_id=7390582 > It might also be related to the deprecation messages (the general error > being raised while trying to raise a more specific one?). For gpgme (and gnupg) General Error is a catch all if no specific error messagee exists. > On the kubuntu system, my passphrase callback gets called just fine, > before the error is raised. On the ubuntu system, the key managers' > passphrase input box appears, and no error is raised. The passphrase is asked by a separate application, if someone wants to get rid of the interactive dialog, the best way as far as I know is to implement your own pinentry application (or have key without passphrase). > Is this a known issue? How can I find out more about the actual error > behind that message? > > I can provide (more) example code if necessary. > === installed packages === > ii python-pyme 0.8.1+clean-1build1 > ii libgpgme11 1.1.8-2ubuntu3 > > ii gnupg 1.4.9-3ubuntu1 > ii gnupg-agent 2.0.9-3.1 > ii gpgv 1.4.9-3ubuntu1 Do you have gnupg2 installed? If not, try with it. The gnupg family can be instructed to print out more debugging messages, but this only helps if you feel ready to dig into the code. Another possibility is to see if the operation succeeds on the command line, but again I first would check and compare installed versions and configuration. Next I would say, creating a test case as small as possible so that developers can recreate the issue is a good step to tackle. > > === Full traceback === > File "createtopic.py", line 48, in <module> > c.op_sign(blob, sig, pyme.constants.sig.mode.CLEAR) > File "/usr/lib/python2.6/dist-packages/pyme/util.py", line 64, in > _funcwrap > "Invocation of " + name) > File "/usr/lib/python2.6/dist-packages/pyme/errors.py", line 46, in > errorcheck > raise GPGMEError(retval, extradata) > pyme.errors.GPGMEError/usr/lib/python2.6/dist-packages/pyme/errors.py:29: > DeprecationWarning: BaseException.message has been deprecated as of > Python 2.6 > if self.message != None: > /usr/lib/python2.6/dist-packages/pyme/errors.py:30: DeprecationWarning: > BaseException.message has been deprecated as of Python 2.6 > message = "%s: %s" % (self.message, message) > > : Invocation of gpgme_op_sign: Unspecified source: General error (0,1) -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Neuer Graben 17, Osnabrück, DE; AG Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Thomas H. <tho...@fo...> - 2009-06-22 14:29:01
|
Dear all, On some of my systems (kubuntu jaunty), I am running into the following error(s) when trying to sign some Data(). On others (ubuntu jaunty), I am not. Invocation of gpgme_op_sign: Unspecified source: General error (0,1) This seems to be related to having or not a gpg key manager. A similar report was posted to the forums in May. https://sourceforge.net/forum/message.php?msg_id=7390582 It might also be related to the deprecation messages (the general error being raised while trying to raise a more specific one?). On the kubuntu system, my passphrase callback gets called just fine, before the error is raised. On the ubuntu system, the key managers' passphrase input box appears, and no error is raised. Is this a known issue? How can I find out more about the actual error behind that message? I can provide (more) example code if necessary. Best regards, Thomas === installed packages === ii python-pyme 0.8.1+clean-1build1 ii libgpgme11 1.1.8-2ubuntu3 ii gnupg 1.4.9-3ubuntu1 ii gnupg-agent 2.0.9-3.1 ii gpgv 1.4.9-3ubuntu1 === Full traceback === File "createtopic.py", line 48, in <module> c.op_sign(blob, sig, pyme.constants.sig.mode.CLEAR) File "/usr/lib/python2.6/dist-packages/pyme/util.py", line 64, in _funcwrap "Invocation of " + name) File "/usr/lib/python2.6/dist-packages/pyme/errors.py", line 46, in errorcheck raise GPGMEError(retval, extradata) pyme.errors.GPGMEError/usr/lib/python2.6/dist-packages/pyme/errors.py:29: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 if self.message != None: /usr/lib/python2.6/dist-packages/pyme/errors.py:30: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 message = "%s: %s" % (self.message, message) : Invocation of gpgme_op_sign: Unspecified source: General error (0,1) |
From: mailing l. <mar...@gm...> - 2009-06-19 23:32:02
|
I installed the latest version for windows but when I get this when I run: >>> from pyme import core Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python24\Lib\site-packages\pyme\core.py", line 22, in ? import pygpgme File "C:\Python24\Lib\site-packages\pyme\pygpgme.py", line 7, in ? import _pygpgme ImportError: DLL load failed: The specified module could not be found. And this pop up comes up --------------------------- python.exe - Unable To Locate Component --------------------------- This application has failed to start because python25.dll was not found. Re-installing the application may fix this problem. --------------------------- OK --------------------------- Is it just because it doesn't support Python 2.4? Could you guys make a 2.4 version? Otherwise can you tell me how to compile one myself? Much thanks, Greg |
From: Bernhard R. <ber...@in...> - 2009-03-24 17:29:40
|
It is not really finished yet, but better than nothing, a new example script decryptdetails.py which can even detail with both protocols, if you give it a --CMS option. Get it as the attachment from https://bugs.g10code.com/gnupg/issue1020 -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Neuer Graben 17, Osnabrück, DE; AG Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Bernhard R. <ber...@in...> - 2009-03-24 17:28:11
|
On Wednesday 13 August 2008, Bernhard Reiter wrote: > > I have attached an updated version of testCMSgetkey.py > > which used the new API. > > Here is an updated version. > # 20080813: more verbosity about the key and its uids: printing some > attributes Igor, you did not check this in so far, didn't you? |
From: Bernhard R. <ber...@in...> - 2009-03-06 08:56:02
|
Am Freitag, 6. März 2009 00:41:38 schrieb Matt Newcomb: > I'm using gpg 1.4.9 ( it's what ubuntu gives me ). You could give gnupg2 a spin and see if it is different in this regard. Which version of gpgme, btw? > The dialog box says "you need a passphrase to unlock the secret key > for user "blah blah blah", 1024 bit DSA key, ID blah blah, created > <date>". Then there is an okay and cancel box. Okay, this looks like the gpg-agent was queried and brought up a pinentry. (BTW, this was not a self contained script that I could simply run myself to see what it does in my installation which would be optimal for my trying to help you.) > def getPassphrase(self, x,y,z): > c.set_passphrase_cb(self.getPassphrase) My info gpgme documentation says: -- Function: void gpgme_set_passphrase_cb (gpgme_ctx_t CTX, gpgme_passphrase_cb_t PASSFUNC, void *HOOK_VALUE) The function `gpgme_set_passphrase_cb' sets the function that is used when a passphrase needs to be provided by the user to PASSFUNC. The function PASSFUNC needs to implemented by the user, and whenever it is called, [..] Not all crypto engines require this callback to retrieve the passphrase. It is better if the engine retrieves the passphrase from a trusted agent (a daemon process), rather than having each user to implement their own passphrase query. Some engines do not even support an external passphrase callback at all, in this case the error code `GPG_ERR_NOT_SUPPORTED' is returned. I do not know which engine support this and which does not, you could try to ask this on http://lists.gnupg.org/mailman/listinfo/gnupg-devel. Maybe the engine your are using (probably OpenPGP for gnupg 1.4.9) does not support this and OpenPGP/GnuPG2 does. Best, Bernhard -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Matt N. <mne...@wi...> - 2009-03-05 23:41:49
|
Hi, Certainly, the methods involved with signing are at the bottom of this email. I'm using gpg 1.4.9 ( it's what ubuntu gives me ). The dialog box says "you need a passphrase to unlock the secret key for user "blah blah blah", 1024 bit DSA key, ID blah blah, created <date>". Then there is an okay and cancel box. Thank you! Matt def getPassphrase(self, x,y,z): print "get passphrase.." return "%s\n" % self.passPhrase def sign(self, DataFileName): core.check_version(None) c = core.Context() c.signers_clear() for sigkey in c.op_keylist_all(self.signerEmail, 1): if sigkey.can_sign: c.signers_add(sigkey) if not c.signers_enum(0): raise NoSignerKeyException(self.signerEmail) print c.signers_enum(0) c.set_armor(1) c.set_passphrase_cb(self.getPassphrase) plain = core.Data(file=DataFileName) sig = core.Data() print "just before opt_sign" c.op_sign(plain, sig, mode.DETACH) sys.exit(-1) sig.seek(0,0) return sig On Thu, Mar 5, 2009 at 4:38 AM, Bernhard Reiter <ber...@in...> wrote: > Matt, > > Am Mittwoch, 4. März 2009 18:46:14 schrieb Matt Newcomb: >> I'm trying to use pyme to sign some automatically generated emails. >> I'm trying to specify the passphrase in the script that does the >> signing, but if I do something like this: >> >> c.set_passphrase_cb(self.getPassphrase) >> c.op_sign(plain, sig, mode.DETACH) >> >> This is with pyme version 0.8.1. >> >> At the call to c.op_sign a dialog box pops up that I didn't generate >> and after I hit cancel then my getPassphrase method gets called. How >> do I not get that dialog box? > > could you give use a full script that shows the unwanted behaviour? > What does the dialog say that pops up? > Which version of Gnupg are you using? > > Bernhard > > > -- > Managing Director - Owner: www.intevation.net (Free Software Company) > Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. > Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998 > Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner > |
From: Bernhard R. <ber...@in...> - 2009-03-05 10:38:51
|
Matt, Am Mittwoch, 4. März 2009 18:46:14 schrieb Matt Newcomb: > I'm trying to use pyme to sign some automatically generated emails. > I'm trying to specify the passphrase in the script that does the > signing, but if I do something like this: > > c.set_passphrase_cb(self.getPassphrase) > c.op_sign(plain, sig, mode.DETACH) > > This is with pyme version 0.8.1. > > At the call to c.op_sign a dialog box pops up that I didn't generate > and after I hit cancel then my getPassphrase method gets called. How > do I not get that dialog box? could you give use a full script that shows the unwanted behaviour? What does the dialog say that pops up? Which version of Gnupg are you using? Bernhard -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Matt N. <mne...@wi...> - 2009-03-04 17:46:29
|
Hi, I'm trying to use pyme to sign some automatically generated emails. I'm trying to specify the passphrase in the script that does the signing, but if I do something like this: c.set_passphrase_cb(self.getPassphrase) c.op_sign(plain, sig, mode.DETACH) This is with pyme version 0.8.1. At the call to c.op_sign a dialog box pops up that I didn't generate and after I hit cancel then my getPassphrase method gets called. How do I not get that dialog box? Thanks, Matt Newcomb |
From: Matt N. <spo...@gm...> - 2009-03-04 17:44:54
|
Hi, I'm trying to use pyme to sign some automatically generated emails. I'm trying to specify the passphrase in the script that does the signing, but if I do something like this: c.set_passphrase_cb(self.getPassphrase) c.op_sign(plain, sig, mode.DETACH) This is with pyme version 0.8.1. At the call to c.op_sign a dialog box pops up that I didn't generate and after I hit cancel then my getPassphrase method gets called. How do I not get that dialog box? Thanks, Matt Newcomb |
From: Igor B. <be...@us...> - 2008-11-25 01:53:31
|
PyMe 0.8.1 is released. Release Note: Bug fixes release. The main reason for this release is a fix for a hung problem which happens on Windows system when passphrase_cb is used. Other fixes worth mentioning: eliminated memory leak in Context class and added methods to Context class and core module which were not trivial to call before. Cheers, PyMe maintainer |
From: Bernhard R. <ber...@in...> - 2008-11-24 10:21:18
|
On Montag, 24. November 2008, Carsten Reimer wrote: > In the meantime I tried another approach (the > one Bernhard suggested) to try to enable the latest version of pyme on > the target system Good, this definately is the better approach. > I had to compile libgpg-errors, libgpgme, swig and after some changes in > Make- and header-files (python was at a very unusual place on that > system) installing pyme worked and I can use the software I have written > for that version of pyme. Wonderful! -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998 Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner |
From: Carsten R. <car...@ga...> - 2008-11-24 08:22:39
|
Hello Igor and Bernhard, thank you for your help. In the meantime I tried another approach (the one Bernhard suggested) to try to enable the latest version of pyme on the target system (I was not desperate enough before to do so ;-) ). I had to compile libgpg-errors, libgpgme, swig and after some changes in Make- and header-files (python was at a very unusual place on that system) installing pyme worked and I can use the software I have written for that version of pyme. So thanks again for all your help. With best regards Carsten Reimer > Igor Belyi wrote: >> Carsten Reimer wrote: >>> sory for asking for help for this _very outdated_ version of pyme, >>> but the system that has to be used does not allow any other version >>> because of the underlying gpgme-lib. >>> >>> I managed to en- and decrypt messages and sign as well but verifying >>> does not work for me. >>> >>> The problem is in the third parameter of op_verify which in the >>> original gpgme-func is of type GpgmeSigStat and will take the >>> summarized result of the verification (with 0.8.0 you can do that >>> with op_verify_result() and then check the signatures yourself). >>> As far as I can see there is no equivalent to this GpgmeSigStat-type >>> in pyme so I tried to set it to None or use an integer var but the >>> latter resulted in a type error requesting a _p_GpgmeSigStat type for >>> that variable while the first resulted in an error messoge 'Invalid >>> value (3)'. >>> >>> I tried as well using only op_verify_start and asking >>> get_sig_ulong_attr(0, attr.SIG_SUMMARY, 0) afterwards but that does >>> not lead to anything else but zero as return value. >>> >>> So is 0.5.0 not able to verify signatures or am I too blind to see >>> how that works? >>> >> I don't remember details of the libgpgme6 API. Could you send gpgme.h >> from the version of the gpgme-lib on your >> system? At least, declaration of the op_verify method and of the >> structures used there as parameters. > OK, the oldest gpgme-lib I could find is 0.3.13 although the pyme-0.5.0 > from the John Goerzen's site was built against > 0.3.12 but I don't think the difference should be important for your > problem. > > As for the op_verify problem I think you are out of luck unless you can > recompile pyme on that system. > > Passing by reference in Python wrapper requires helper functions. If you > look at the gpgme.i file their generation > is requested with %pointer_functions() directive for each type passed by > reference in some gpgme function. You'll > need to add the following directive in there: > %pointer_functions(GpgmeSigStat, GpgmeSigStat_p); > > After that you should add the following method to the Context class in > pyme/core.py: > def op_verify(self, sig, text): > ptr = gpgme.new_GpgmeSigStat_p() > errorcheck(gpgme.gpgme_op_verify(self.wrapped, sig, text, ptr)) > status = gpgme.GpgmeSigStat_p_value(ptr) > gpgme.delete_GpgmeSigStat_p(ptr) > return status > > With these changes after recompile op_verify will require only 2 > parameters and will return status value. > > Hope it's helpful. > Cheers, > Igor > -- Carsten Reimer Web Developer car...@ga... Phone +49.228.42150.73 Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Phone +49.228.42150.0 (Zentrale) .77 (Fax) http://www.galileo-press.de/ Managing Directors: Tomas Wehren, Ralf Kaulisch, Rainer Kaltenecker HRB 8363 Amtsgericht Bonn |
From: Igor B. <be...@us...> - 2008-11-22 19:25:58
|
Igor Belyi wrote: > Carsten Reimer wrote: >> sory for asking for help for this _very outdated_ version of pyme, >> but the system that has to be used does not allow any other version >> because of the underlying gpgme-lib. >> >> I managed to en- and decrypt messages and sign as well but verifying >> does not work for me. >> >> The problem is in the third parameter of op_verify which in the >> original gpgme-func is of type GpgmeSigStat and will take the >> summarized result of the verification (with 0.8.0 you can do that >> with op_verify_result() and then check the signatures yourself). >> As far as I can see there is no equivalent to this GpgmeSigStat-type >> in pyme so I tried to set it to None or use an integer var but the >> latter resulted in a type error requesting a _p_GpgmeSigStat type for >> that variable while the first resulted in an error messoge 'Invalid >> value (3)'. >> >> I tried as well using only op_verify_start and asking >> get_sig_ulong_attr(0, attr.SIG_SUMMARY, 0) afterwards but that does >> not lead to anything else but zero as return value. >> >> So is 0.5.0 not able to verify signatures or am I too blind to see >> how that works? >> > I don't remember details of the libgpgme6 API. Could you send gpgme.h > from the version of the gpgme-lib on your > system? At least, declaration of the op_verify method and of the > structures used there as parameters. OK, the oldest gpgme-lib I could find is 0.3.13 although the pyme-0.5.0 from the John Goerzen's site was built against 0.3.12 but I don't think the difference should be important for your problem. As for the op_verify problem I think you are out of luck unless you can recompile pyme on that system. Passing by reference in Python wrapper requires helper functions. If you look at the gpgme.i file their generation is requested with %pointer_functions() directive for each type passed by reference in some gpgme function. You'll need to add the following directive in there: %pointer_functions(GpgmeSigStat, GpgmeSigStat_p); After that you should add the following method to the Context class in pyme/core.py: def op_verify(self, sig, text): ptr = gpgme.new_GpgmeSigStat_p() errorcheck(gpgme.gpgme_op_verify(self.wrapped, sig, text, ptr)) status = gpgme.GpgmeSigStat_p_value(ptr) gpgme.delete_GpgmeSigStat_p(ptr) return status With these changes after recompile op_verify will require only 2 parameters and will return status value. Hope it's helpful. Cheers, Igor |
From: Igor B. <be...@us...> - 2008-11-22 19:13:58
|
Carsten Reimer wrote: > sory for asking for help for this _very outdated_ version of pyme, but > the system that has to be used does not allow any other version because > of the underlying gpgme-lib. > > I managed to en- and decrypt messages and sign as well but verifying > does not work for me. > > The problem is in the third parameter of op_verify which in the original > gpgme-func is of type GpgmeSigStat and will take the summarized result > of the verification (with 0.8.0 you can do that with op_verify_result() > and then check the signatures yourself). > As far as I can see there is no equivalent to this GpgmeSigStat-type in > pyme so I tried to set it to None or use an integer var but the latter > resulted in a type error requesting a _p_GpgmeSigStat type for that > variable while the first resulted in an error messoge 'Invalid value (3)'. > > I tried as well using only op_verify_start and asking > get_sig_ulong_attr(0, attr.SIG_SUMMARY, 0) afterwards but that does not > lead to anything else but zero as return value. > > So is 0.5.0 not able to verify signatures or am I too blind to see how > that works? > I don't remember details of the libgpgme6 API. Could you send gpgme.h from the version of the gpgme-lib on your system? At least, declaration of the op_verify method and of the structures used there as parameters. Thanks, Igor |
From: Bernhard R. <ber...@in...> - 2008-11-20 07:43:19
|
On Mittwoch, 19. November 2008, Carsten Reimer wrote: > sory for asking for help for this _very outdated_ version of pyme, but > the system that has to be used does not allow any other version because > of the underlying gpgme-lib. No chance of bringing your own gpgme? (Should be possible on almost all systems.) |