Re: Display TLS certificate in the GUI



On 28.06.2016 08:19, philip chimento gmail com wrote:
On Fri, Jun 24, 2016 at 8:06 AM Jay Strict <jay strict posteo de
<mailto:jay strict posteo de>> wrote:
    ======================================================================
    (gnome-shell:543): Gjs-WARNING **: JS ERROR: Error: Unable to introspect
    element-type of container in GValue
    ======================================================================


    Can someone help me understand this error message?


Unfortunately, it means that you can't use that property in GJS. The
documentation for that property from the C API [1] says it is of type
GByteArray*, and the GJS source code seems to suggest that such values
are explicitly not yet supported in GJS [2].


If you just wanted the data you could use the 'certificate-pem' property
[3]. As the documentation states, "This property and the “certificate”
property represent the same data, just in different forms."

However, it seems like you can't construct a Gcr.Certificate object from
the PEM-encoded data. I don't have a good solution for this.

[1]
https://developer.gnome.org/gio/unstable/GTlsCertificate.html#GTlsCertificate--certificate 
[2] https://git.gnome.org/browse/gjs/tree/gi/value.cpp#n875
[3] https://developer.gnome.org/gio/unstable/GTlsCertificate.html#GTlsCertificate--certificate-pem



I see. Thank you for the thorough explanation.
I will try to parse the PEM data myself and show it to the user in a
home-made widget then.


Kind regards,
Jay


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]