GNOME Bugzilla – Bug 681319
gtlscertificate: Add certificate-bytes and private-key-bytes props
Last modified: 2012-08-06 20:38:05 UTC
As suggested by Dan in bug #681121.
Created attachment 220473 [details] [review] gtlscertificate: Add certificate-bytes and private-key-bytes props * These properties contain the same data as certificate and private-key, but as GBytes
Created attachment 220474 [details] [review] gnutls: Add tests for certificate-bytes and private-key-bytes props * And rearrange the test setup/teardown slightly at the same time. * Can't actually read out the private-key from the certificate so just run through the motions of creating it with a private key.
Comment on attachment 220473 [details] [review] gtlscertificate: Add certificate-bytes and private-key-bytes props >+ * GTlsCertificate:certificate-bytes: >+ * >+ * The DER (binary) encoded representation of the certificate as >+ * a #GBytes. This property and the #GTlsCertificate:certificate >+ * contain the same data. It would be good if :certificate and :certificate-pem also referenced :certificate-bytes. Otherwise good to go.
Comment on attachment 220474 [details] [review] gnutls: Add tests for certificate-bytes and private-key-bytes props The gtlscertificate-gnutls.c part of this should be split out as a separate patch. >+ if (byte_array) >+ set_certificate_from_der (gnutls, byte_array->data, byte_array->len); that's indented too far >+ if (bytes) >+ set_certificate_from_der (gnutls, g_bytes_get_data (bytes, NULL), >+ g_bytes_get_size (bytes)); {}s around the body since it's multi-line please (likewise for private-key-bytes). ok to commit (as two patches) with those changes
Attachment 220474 [details] pushed as e0115fd - gnutls: Add tests for certificate-bytes and private-key-bytes props