QgpgME

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

QgpgME

by Bugzilla from mat69@gmx.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I try to use QgpgME in KGet, yet when I compile I get the follolwing error:

CMakeFiles/kgetcore.dir/core/verifier.o: In function
`boost::detail::shared_count::shared_count<QFile>(QFile*)':                            
verifier.cpp:
(.text._ZN5boost6detail12shared_countC1I5QFileEEPT_[boost::detail::shared_count::shared_count<QFile>(QFile*)]+0x62):
undefined reference to `boost::throw_exception(std::exception const&)'              


Does anybody know what I might be doing wrong?

Cheers
matthias
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Bugzilla from vkrause@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 28 September 2009 12:29:08 Matthias Fuchs wrote:

> Hi,
>
> I try to use QgpgME in KGet, yet when I compile I get the follolwing error:
>
> CMakeFiles/kgetcore.dir/core/verifier.o: In function
> `boost::detail::shared_count::shared_count<QFile>(QFile*)':
> verifier.cpp:
> (.text._ZN5boost6detail12shared_countC1I5QFileEEPT_[boost::detail::shared_c
>ount::shared_count<QFile>(QFile*)]+0x62): undefined reference to
> `boost::throw_exception(std::exception const&)'
>
>
> Does anybody know what I might be doing wrong?
Looks like you don't have exceptions enabled, try adding the following to your
CMakeLists.txt:

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )

regards
Volker


_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

signature.asc (196 bytes) Download Attachment

Re: QgpgME

by Bugzilla from mat69@gmx.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 28 September 2009 13:00:04 Volker Krause wrote:

> On Monday 28 September 2009 12:29:08 Matthias Fuchs wrote:
> > Hi,
> >
> > I try to use QgpgME in KGet, yet when I compile I get the follolwing
> > error:
> >
> > CMakeFiles/kgetcore.dir/core/verifier.o: In function
> > `boost::detail::shared_count::shared_count<QFile>(QFile*)':
> > verifier.cpp:
> > (.text._ZN5boost6detail12shared_countC1I5QFileEEPT_[boost::detail::shared
> >_c ount::shared_count<QFile>(QFile*)]+0x62): undefined reference to
> > `boost::throw_exception(std::exception const&)'
> >
> >
> > Does anybody know what I might be doing wrong?
>
> Looks like you don't have exceptions enabled, try adding the following to
>  your CMakeLists.txt:
>
> set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
>
> regards
> Volker
>

Thanks, that did the trick.

Btw. is there a reason why exceptions are not enabled by default for KDE, or
might there be some side-effects with qt-code and exceptions?

Cheers,
matthias
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Bugzilla from vkrause@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 28 September 2009 13:49:21 Matthias Fuchs wrote:

> On Monday 28 September 2009 13:00:04 Volker Krause wrote:
> > On Monday 28 September 2009 12:29:08 Matthias Fuchs wrote:
> > > Hi,
> > >
> > > I try to use QgpgME in KGet, yet when I compile I get the follolwing
> > > error:
> > >
> > > CMakeFiles/kgetcore.dir/core/verifier.o: In function
> > > `boost::detail::shared_count::shared_count<QFile>(QFile*)':
> > > verifier.cpp:
> > > (.text._ZN5boost6detail12shared_countC1I5QFileEEPT_[boost::detail::shar
> > >ed _c ount::shared_count<QFile>(QFile*)]+0x62): undefined reference to
> > > `boost::throw_exception(std::exception const&)'
> > >
> > >
> > > Does anybody know what I might be doing wrong?
> >
> > Looks like you don't have exceptions enabled, try adding the following to
> >  your CMakeLists.txt:
> >
> > set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
> >
> > regards
> > Volker
>
> Thanks, that did the trick.
>
> Btw. is there a reason why exceptions are not enabled by default for KDE,
> or might there be some side-effects with qt-code and exceptions?
it's mostly for historical reasons AFAIK, from the time when compilers
generated slower code just for enabling exceptions.

Using exceptions alongside Qt is not a problem, throwing "through" Qt code
(such as the event loop and/or signal/slot connections) can be a problem
though, depends somewhat on whether or not Qt is build with exception support
enabled.

regards
Volker


_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

signature.asc (196 bytes) Download Attachment

Re: QgpgME

by Bugzilla from mat69@gmx.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I want to verify a file (kernel.gz) with kernel.gz.sign, to see if that file was
signed with that signature, but I'm doing something wrong. I'm not completely
sure what will tell me if I was successful, the output I get is not that
satisfying.

Can someone please look at this code sample and tell me where my error lies?

const KUrl fileUrl = mFile->url();
    const KUrl sigUrl = mSig->url();

    if (fileUrl.isEmpty() || sigUrl.isEmpty()) {
        return;
    }

    GpgME::Context *context =
GpgME::Context::createForProtocol(GpgME::OpenPGP);
    if (!context) {
        return;
    }

    boost::shared_ptr<QFile> qFile(new QFile(fileUrl.pathOrUrl()));
    qFile->open(QIODevice::ReadOnly);
    QGpgME::QIODeviceDataProvider *file = new
QGpgME::QIODeviceDataProvider(qFile);

    boost::shared_ptr<QFile> qSign(new QFile(sigUrl.pathOrUrl()));
    qSign->open(QIODevice::ReadOnly);
    QGpgME::QIODeviceDataProvider *sign = new
QGpgME::QIODeviceDataProvider(qSign);

    GpgME::Data dFile(file);//e.g. kernel.gz
    GpgME::Data dSign(sign);//e.g. kernel.gz.sign
    kDebug() << "Data correct:" << !dFile.isNull() << ' ' << !dSign.isNull()
<< ' ' << dFile.impl() << ' ' << dSign.impl();

    GpgME::VerificationResult result = context->verifyDetachedSignature(dSign,
dFile);
//     GpgME::VerificationResult result = context->verifyOpaqueSignature(dFile,
dSign);
    GpgME::Error error = result.error();
    kDebug() << "Error:" << error.source() << ' ' << error.asString();
    for (uint i = 0; i < result.numSignatures(); ++i) {
        GpgME::Signature signature = result.signature(i);
        kDebug() << "Validity:" << signature.validity() << ' ' <<
signature.validityAsString() << ' ' <<
signature.nonValidityReason().asString() << ' ' <<
signature.isVerifiedUsingChainModel() << signature.summary() <<
signature.pkaStatus();
    }
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Ingo Klöcker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009, Matthias Fuchs wrote:
> Hi,
>
> I want to verify a file (kernel.gz) with kernel.gz.sign, to see if
> that file was signed with that signature, but I'm doing something
> wrong. I'm not completely sure what will tell me if I was successful,
> the output I get is not that satisfying.

What output do you get?


Regards,
Ingo


_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

signature.asc (204 bytes) Download Attachment

Re: QgpgME

by Bugzilla from mat69@gmx.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009 22:31:03 Ingo Klöcker wrote:

> On Friday 02 October 2009, Matthias Fuchs wrote:
> > Hi,
> >
> > I want to verify a file (kernel.gz) with kernel.gz.sign, to see if
> > that file was signed with that signature, but I'm doing something
> > wrong. I'm not completely sure what will tell me if I was successful,
> > the output I get is not that satisfying.
>
> What output do you get?
>
>
> Regards,
> Ingo
>

GpgME::Data(): DataProvider supports: read, no write, seek, release
GpgME::Data(): DataProvider supports: read, no write, seek, release
MainWindow::slotVerify: Data correct: true   true   0x1216660   0x144f140
MainWindow::slotVerify: Error: Quelle nicht angegeben   Erfolg
MainWindow::slotVerify: Validity: 0   ?   Erfolg   false 0 0
QIODeviceDataProvider::release()
QIODeviceDataProvider::release()


"Quelle nicht angegeben" = "Source not defined"
"Erfolg" = "Success"
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Bugzilla from mat69@gmx.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Saturday 03 October 2009 00:39:41 Matthias Fuchs wrote:

> On Friday 02 October 2009 22:31:03 Ingo Klöcker wrote:
> > On Friday 02 October 2009, Matthias Fuchs wrote:
> > > Hi,
> > >
> > > I want to verify a file (kernel.gz) with kernel.gz.sign, to see if
> > > that file was signed with that signature, but I'm doing something
> > > wrong. I'm not completely sure what will tell me if I was successful,
> > > the output I get is not that satisfying.
> >
> > What output do you get?
> >
> >
> > Regards,
> > Ingo
>
> GpgME::Data(): DataProvider supports: read, no write, seek, release
> GpgME::Data(): DataProvider supports: read, no write, seek, release
> MainWindow::slotVerify: Data correct: true   true   0x1216660   0x144f140
> MainWindow::slotVerify: Error: Quelle nicht angegeben   Erfolg
> MainWindow::slotVerify: Validity: 0   ?   Erfolg   false 0 0
> QIODeviceDataProvider::release()
> QIODeviceDataProvider::release()
>
>
> "Quelle nicht angegeben" = "Source not defined"
> "Erfolg" = "Success"

Is there anyone who could help me on that issue?
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Ingo Klöcker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 08 October 2009, Matthias Fuchs wrote:

> On Saturday 03 October 2009 00:39:41 Matthias Fuchs wrote:
> > On Friday 02 October 2009 22:31:03 Ingo Klöcker wrote:
> > > On Friday 02 October 2009, Matthias Fuchs wrote:
> > > > Hi,
> > > >
> > > > I want to verify a file (kernel.gz) with kernel.gz.sign, to see
> > > > if that file was signed with that signature, but I'm doing
> > > > something wrong. I'm not completely sure what will tell me if I
> > > > was successful, the output I get is not that satisfying.
> > >
> > > What output do you get?
> > >
> > >
> > > Regards,
> > > Ingo
> >
> > GpgME::Data(): DataProvider supports: read, no write, seek, release
> > GpgME::Data(): DataProvider supports: read, no write, seek, release
> > MainWindow::slotVerify: Data correct: true   true   0x1216660  
> > 0x144f140 MainWindow::slotVerify: Error: Quelle nicht angegeben  
> > Erfolg MainWindow::slotVerify: Validity: 0   ?   Erfolg   false 0 0
> > QIODeviceDataProvider::release()
> > QIODeviceDataProvider::release()
> >
> >
> > "Quelle nicht angegeben" = "Source not defined"
> > "Erfolg" = "Success"
>
> Is there anyone who could help me on that issue?
Probably not. QgpgME is just a thin wrapper around GpgME++ which is a
thin C++ wrapper around GpgME. You might get some answers on a mailing
list dedicated to gpgme (probably gnupg-devel).


Regards,
Ingo


_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

signature.asc (204 bytes) Download Attachment

Re: QgpgME

by Frank Osterfeld :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 08 October 2009 07:02:41 pm Matthias Fuchs wrote:

> On Saturday 03 October 2009 00:39:41 Matthias Fuchs wrote:
> > On Friday 02 October 2009 22:31:03 Ingo Klöcker wrote:
> > > On Friday 02 October 2009, Matthias Fuchs wrote:
> > > > Hi,
> > > >
> > > > I want to verify a file (kernel.gz) with kernel.gz.sign, to see if
> > > > that file was signed with that signature, but I'm doing something
> > > > wrong. I'm not completely sure what will tell me if I was successful,
> > > > the output I get is not that satisfying.
> > >
> > > What output do you get?
> > >
> > >
> > > Regards,
> > > Ingo
> >
> > GpgME::Data(): DataProvider supports: read, no write, seek, release
> > GpgME::Data(): DataProvider supports: read, no write, seek, release
> > MainWindow::slotVerify: Data correct: true   true   0x1216660   0x144f140
> > MainWindow::slotVerify: Error: Quelle nicht angegeben   Erfolg
> > MainWindow::slotVerify: Validity: 0   ?   Erfolg   false 0 0
> > QIODeviceDataProvider::release()
> > QIODeviceDataProvider::release()
> >
> >
> > "Quelle nicht angegeben" = "Source not defined"
> > "Erfolg" = "Success"
>
> Is there anyone who could help me on that issue?

I think there are some cases where gpgme_verify_result_t says both "signature
green" but also has some error set. I ran into a similar case (untrusted key,
iirc), where I didn't know how to interpret the verification result correctly.
You could debug into it until you have the gpgme_verify_result_t, "print" it
in gdb and send the output.

Frank
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Bugzilla from mat69@gmx.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 11 October 2009 12:16:22 Frank Osterfeld wrote:
> I think there are some cases where gpgme_verify_result_t says both
>  "signature green" but also has some error set. I ran into a similar case
>  (untrusted key, iirc), where I didn't know how to interpret the
>  verification result correctly. You could debug into it until you have the
>  gpgme_verify_result_t, "print" it in gdb and send the output.
>
> Frank
>

Ok, I tried around a little and it seems that I get correct summary-messages
as long as there is an error, like the keys are not available or they are Red,
but if the key should be correct it returns None and in
GpgME::Signature::summary() gpgme_sigsum_t sigsum is also 0.

So what I wonder is, should I use summary only if there was an error
(signature.status() == true), because status reports correctly?

Cheers!
matthias
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Frank Osterfeld-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 11 October 2009 17:12:08 Matthias Fuchs wrote:

> On Sunday 11 October 2009 12:16:22 Frank Osterfeld wrote:
> > I think there are some cases where gpgme_verify_result_t says both
> >  "signature green" but also has some error set. I ran into a similar case
> >  (untrusted key, iirc), where I didn't know how to interpret the
> >  verification result correctly. You could debug into it until you have
> > the gpgme_verify_result_t, "print" it in gdb and send the output.
> >
> > Frank
>
> Ok, I tried around a little and it seems that I get correct
>  summary-messages as long as there is an error, like the keys are not
>  available or they are Red, but if the key should be correct it returns
>  None and in
> GpgME::Signature::summary() gpgme_sigsum_t sigsum is also 0.
>
> So what I wonder is, should I use summary only if there was an error
> (signature.status() == true), because status reports correctly?

That's something to check the gpgme docs for, or if they don't say anything
about this, ask on their mailing list.

--
Frank Osterfeld | frank@... | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

Re: QgpgME

by Bugzilla from faure@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009, Matthias Fuchs wrote:
>  boost::shared_ptr<QFile> qFile(new QFile(fileUrl.pathOrUrl()));
 
This should be fileUrl.toLocalFile() btw, with a previous check like
if (!fileUrl.isLocalFile())
  return;

(otherwise for ftp://ftp.kde.org/etc/password you'll open /etc/password
locally; taking a random file name as example ;) )

--
David Faure, faure@..., http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror
(http://www.konqueror.org).
_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/