After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752990 - pkcs11: Fix mismatches of length types
pkcs11: Fix mismatches of length types
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2015-07-29 03:37 UTC by Daiki Ueno
Modified: 2015-07-31 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pkcs11: Fix mismatches of length types (916 bytes, patch)
2015-07-29 03:37 UTC, Daiki Ueno
none Details | Review

Description Daiki Ueno 2015-07-29 03:37:41 UTC
When I run seahorse from the command line, I get:

  (seahorse:31446): Gcr-WARNING **: a derived class provided an invalid or unparseable X.509 DER certificate data.

and sometimes it causes crash:

  **
  ERROR:egg/egg-asn1x.c:829:atlv_parse_cls_tag_len: assertion failed: (end >= at)
  zsh: abort (core dumped)  ./seahorse

This doesn't happen with the versions prior to the Vala port of pkcs11 backend (3.10.2 or earlier).  After digging it a bit, I found a signature mismatch of get_der_data vfunc between GcrCertificate and SeahorsePkcs11Certificate.
Comment 1 Daiki Ueno 2015-07-29 03:37:45 UTC
Created attachment 308351 [details] [review]
pkcs11: Fix mismatches of length types

The get_der_data vfunc of GcrCertificate reports the length of data in
size_t, while the Vala generated code uses int and causes ASN.1 parsing
error if sizeof(size_t) != sizeof(int).
Comment 2 Stef Walter 2015-07-31 13:50:53 UTC
Thanks! Merged into git master.

Attachment 308351 [details] pushed as e9a8634 - pkcs11: Fix mismatches of length types