pyme-help Mailing List for PyMe (Page 5)
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: Stefan N. <ste...@fr...> - 2005-04-21 07:57:54
|
Igor Belyi schrieb: > Stefan, > > I've tried to use your functions and they seem to work perfectly: Nice to hear, but why doesn't it work correctly with me? > signature = sign("fr...@mi...", "Hello") > print verify("Hello", signature) Yes, thats, the way I test it as well. > yields (if "print result.signatures.fpr" is uncommented): > > 024E0908E5E7CD865B7D87BDCAB3D9DD2A51DAAC OK, the fingerprint, i get as well. Like I wrote you I have Segmentation Faults with: result.signatures.next result.signatures.exp_timestamp result.signatures.validity_reason result.signatures.validity > valid, but more Information This is great. It shows that the Signature bit sigsum.GREEN is set! > There's a chance that Frodo cannot sign - what value is shown for > key.can_sign? It has a 1, so it is possible to sign! > Another problem can be related to how PyMe is compiled - do you use > precompiled package or compiled pyme yourself? Precompiled debian package 0.6.2 [..] > If you use precompiled version - what version of PyMe and GnuPG do you use? Python 2.3 Pyme 0.6.2 GnuPG: self build debian Package 1.4.1 with a small patch (doesn't change the working behaviour, just debug) > P.S. > I've Cc: this message to the newly created pyme-help mailing list. > You will need to subscribe to it before you can post messages there. > You can subscribe at the following location: > https://lists.sourceforge.net/lists/listinfo/pyme-help Great! This is IMHO the best way! So, thanks for your help, I will test it on a diffrent machine. Best regards, Stefan |
From: Igor B. <be...@us...> - 2005-04-20 20:16:30
|
Stefan, I've tried to use your functions and they seem to work perfectly: signature = sign("fr...@mi...", "Hello") print verify("Hello", signature) yields (if "print result.signatures.fpr" is uncommented): 024E0908E5E7CD865B7D87BDCAB3D9DD2A51DAAC valid, but more Information There's a chance that Frodo cannot sign - what value is shown for key.can_sign? Another problem can be related to how PyMe is compiled - do you use precompiled package or compiled pyme yourself? If you compiled it yourself - what version of PyMe, GPGME, and Swing did you use? Any warning? If you use precompiled version - what version of PyMe and GnuPG do you use? Cheers, Igor P.S. I've Cc: this message to the newly created pyme-help mailing list. You will need to subscribe to it before you can post messages there. You can subscribe at the following location: https://lists.sourceforge.net/lists/listinfo/pyme-help Stefan Neumann wrote: >Hi Igor. >So, with some help, I finally finished the signing and verifying. But >there are still some errors: > >First of all, I can't get any information about the summary. > > text = c.op_verify(sig,signed_text,None) > result = c.op_verify_result() > summary = result.signatures.summary > >In the beginning, the value was always 4 (sigsum.RED). Since I fixed the >bugs, I only get a zero (The same with result.signatures.status) > >That is the first thing, the other is the problem of segmentation faults: > >I have them with: > >result.signatures.next >result.signatures.exp_timestamp >result.signatures.validity_reason >result.signatures.validity > >So, I will give you my functions: > >================= > >def sign(sender,msg,clear=False): > > if(clear): > _mode=mode.CLEAR > else: > _mode=mode.DETACH > > message = core.Data(msg) > sig = core.Data() > ctx = core.Context() > ctx.set_armor(1) > > ctx.op_keylist_start(sender, 0) > key=ctx.op_keylist_next() > > ctx.signers_clear() > ctx.signers_add(key) > > ctx.set_passphrase_cb(getpassphrase,"") > ctx.op_sign(message,sig,mode.DETACH) > sig.seek(0,0) > return sig.read() > >================= > >def verify(message,sig): > > signed_text=core.Data(message) > sig = core.Data(sig) > c=core.Context() > > text = c.op_verify(sig,signed_text,None) > result = c.op_verify_result() ># return result > summary = result.signatures.summary ># print summary > msg="" > > if (summary&sigsum.VALID|summary==0): > msg="Totally valid" > else: > if (summary&sigsum.GREEN): > msg += "valid, but more Information" > if (summary&sigsum.RED): > msg+="not valid" > if (summary&sigsum.KEY_REVOKED): > msg+="The key or at least one certificate has been revoked." > if (summary&sigsum.KEY_EXPIRED): > msg+="The key or one of the certificates has expired." > if (summary&sigsum.SIG_EXPIRED): > msg+="The signature has expired." > if (summary&sigsum.KEY_MISSING): > msg+="Can\'t verify due to a missing key or certificate." > if (summary&sigsum.CRL_MISSING): > msg+=" The CRL (or an equivalent mechanism) is not available." > if (summary&sigsum.CRL_TOO_OLD): > msg+="Available CRL is too old." > if (summary&sigsum.BAD_POLICY): > msg+="A policy requirement was not met." > if (summary&sigsum.SYS_ERROR): > msg+="A system error occured." > status = result.signatures.status ># print status ># print result.signatures.fpr > return msg > >===================== > >So, if you want to check the result, just uncomment the return result >line. In my checking of summary, i use summary==0 just in case, that it >is totally valid, but i am not sure about it. > >Best regards, >Stefan > > > |
From: Igor B. <be...@us...> - 2005-04-20 16:39:51
|
Test posting on this newly created list. Admin |