summaryrefslogtreecommitdiff
path: root/gcr
Commit message (Collapse)AuthorAgeFilesLines
* Create a workaround for tests and GTaskwip/nielsdg/fix-tests-with-racy-gtaskNiels De Graef2021-01-151-6/+9
| | | | | | | | | | It's possible that a GTask that has been called with `g_task_run_in_thread()` still has a reference held by that thread after the `_finish()` function has been called. This is a little problematic for tests that check for the final reference, so use this as a workaround instead. See https://gitlab.gnome.org/GNOME/glib/-/issues/1346 for more info
* prompt: Support transient_for in WaylandNiels De Graef2021-01-131-0/+4
| | | | | | | | | GDK provides an interface to the _xdg-foreign_ protocol extension, which exactly allows to export a handle that another window can use to set itself transient to. Also bump the minmal GTK version to 3.22, since that is the version that adds the necessary methods to do this in GDK.
* gcr-console-interaction: Port to GTaskNiels De Graef2021-01-121-26/+29
|
* gcr-pkcs11-importer: Port to GTaskNiels De Graef2021-01-121-95/+71
|
* gcr-trust: Port to GTaskNiels De Graef2021-01-121-134/+89
|
* gcr-certificate-chain: Port to GTaskNiels De Graef2021-01-121-17/+14
|
* gcr-gnupg-importer: Port to GTaskNiels De Graef2021-01-121-21/+16
|
* gcr-subject-public-key: Port to GTaskNiels De Graef2021-01-121-20/+17
|
* gcr-gnupg-collecion: Port to GTaskNiels De Graef2021-01-121-43/+32
|
* gcr-library: Port to GTaskNiels De Graef2021-01-121-28/+24
|
* gcr-pkcs11-certificate: Port to GTaskNiels De Graef2021-01-121-44/+22
|
* gcr-memory-icon: Port to GTaskNiels De Graef2021-01-121-7/+8
|
* gcr-certificate-request: Port to GTaskNiels De Graef2021-01-121-40/+32
|
* Increase test-gnupg-collection timeoutEmilio Pozuelo Monfort2020-11-071-1/+1
| | | | | | | | | | | | The timeout length in the current test is too low and can make the test fail if the system is too slow or too loaded. This test correctly stops waiting when a result is received, so the timeout will not actually be reached unless there is a problem. [smcv: Expand commit message] Fixes: https://gitlab.gnome.org/GNOME/gcr/issues/29 Bug-Debian: https://bugs.debian.org/846728 Signed-off-by: Simon McVittie <smcv@debian.org>
* meson: Make sure gcr-oids.h is builtNiels De Graef2020-06-191-1/+4
| | | | Fixes https://gitlab.gnome.org/GNOME/gcr/-/issues/48
* gcr: Test the correct decoding of the keyUsage bit stringChristophe Kamphaus2020-06-091-0/+28
|
* gcr: Also display missing key usage bitsChristophe Kamphaus2020-06-091-0/+2
| | | | | Previously the nonRepudiation, encipherOnly and decipherOnly bits were not listed.
* gcr: Reverse bit order of usage extensionChristophe Kamphaus2020-06-091-0/+13
| | | | Helps #47
* meson.build: correctly set internal vapi dependenciesAlexander Kanavin2020-05-201-1/+1
| | | | | | | | | If they are set as strings, meson will supply the right arguments to vapigen, but will not set the ninja dependencies to ensure they get built first, and so races will occur: https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/1881/steps/8/logs/step1b Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
* gcr: Cleanup with G_DEFINE_BOXED_TYPENiels De Graef2020-03-311-13/+1
|
* gcr: Fix GcrCertificateIface vfunc gtk-docNiels De Graef2020-03-101-1/+1
|
* gcr: Add gtk-doc comment to get_der_data()-vfuncNiels De Graef2020-03-051-7/+4
| | | | | | | gtk-doc can now understand Gtk-doc comments on vfuncs, so let's use that. See also https://gitlab.gnome.org/GNOME/gcr/merge_requests/35#note_678211
* Mark deprecated functions with G_DEPRECATEDNiels De Graef2020-02-071-0/+8
| | | | | | | If we want applications to switch, deprecation warnings are a good way to make that happen. Fixes https://gitlab.gnome.org/GNOME/gcr/issues/36
* gcr: add support for "NEW CERTIFICATE REQUEST" headerDmitry Baryshkov2020-01-302-0/+12
| | | | | | | According to RFC 7468 parsers MAY treat "NEW CERTIFICATE REQUEST" as equivalent to "CERTIFICATE REQUEST", so act accordingly. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* gcr/fixtures: add several GOST certificates and certificate requestsDmitry Baryshkov2020-01-307-0/+58
| | | | | | Add files to test parsing of GOST certificates/cert requests. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* gcr: add support for parsing GOST public keys/certificatesDmitry Baryshkov2020-01-302-0/+78
| | | | | | | Add support for parsing certificates/public keys according to RFC 4491 and draft-deremin-4491-bis. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* gcr: use new egg_asn1x_decode_any_as_string()Dmitry Baryshkov2020-01-292-3/+3
| | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* test-certificate: test otherName parsingDmitry Baryshkov2020-01-291-2/+12
| | | | | | | Add tests for parsing otherName, which implies converting ANY to BMPString and UTF8String. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* vala: add gck-1 to gcs dependency fileCorentin Noël2020-01-231-1/+1
| | | | This is a regression to the meson port
* gcr: Provide support for g_autoptr for all typesNiels De Graef2020-01-1327-94/+56
|
* gcr: Use g_strdup() instead of strdup()Niels De Graef2020-01-111-5/+5
| | | | This fixes some warnings about implicit declaration.
* Cast result of g_object_ref() if necessaryNiels De Graef2020-01-112-2/+2
| | | | | | Although `g_object_ref()` technically returns a `gpointer`, on some compilers it will return the type of its argument. This means we need to add the necessary casting.
* meson: Add missing feature test macro'sNiels De Graef2020-01-111-0/+1
| | | | | | We needed this for the call to `strptime()` and `timegm()`. Also once we missed a `#include <time.h>`
* gcr-certificate: Add (virtual) annotationNiels De Graef2020-01-051-1/+1
| | | | | | | | | | | | | | By adding `(virtual)` to a method, you tell the GObject Introspection scanner that it is the public API of a certain vfunc. Since you can't annotate a vfunc, GIR has a workaround where it will take over the annotations of the invoker. In other words, to make sure the annotations of the return value of `GcrCertificate.get_der_data()` are understoor correctly, we just need to add the necessary tags to `gcr_certificate_get_der_data()` and mark it as `(virtual get_der_data)`. Fixes https://gitlab.gnome.org/GNOME/gcr/issues/37
* meson: Fix pkgconfig RequiresNiels De Graef2020-01-041-0/+1
| | | | | | Meson isn't setting the "Requires" field, so we have to do it manually. Since we don't want to specify each dependency in `glib_deps` as a dependency, we also give each a separate variable.
* meson: Fix include directories of gcr-*.pcNiels De Graef2020-01-041-0/+1
| | | | | We introduced a regression in Meson as we do not add the correct `-I` flags for the compiler.
* gcr: Use G_PARAM_STATIC_STRINGSNiels De Graef2020-01-0413-66/+89
| | | | | | This prevents some unnecessary string copies, resulting in less memory used and some unnecessary performance overhead being removed. Well, a little bit at least.
* Mark GIR constants as suchNiels De Graef2020-01-036-18/+18
| | | | | It doesn't matter really for bindings, but looks better when they are rendering documentation (e.g. `NULL` is replaced by `None` for python).
* Don't use deprecated (allow-none) GIR annotationNiels De Graef2020-01-0316-51/+51
| | | | | It should be replaced with either `(optional)`, `(nullable)`, or in some cases both.
* Support Meson build systemNiels De Graef2019-12-313-0/+326
|
* gcr: g_type_class_add_private() is deprecatedNiels De Graef2019-05-2414-47/+28
| | | | | Use `G_ADD_PRIVATE()` (or the convenience macro `G_DEFINE_TYPE_WITH_PRIVATE()`) instead.
* build: Fix gcr-trust symbols not appearing in GIR, and hence also VAPIMichael Gratton2019-04-031-1/+1
| | | | | | | | | | Despite making it into the API docs, the trust APIs are not included in the GCR GIR or VAPI files, since they were marked as private in the Makefile, not public. As a result, apps using language bindings cannot use the trust API without manual intervention. This fixes the missing API by marking gcr-trust.c and gcr-trust.h public.
* gcr-certificate-extensions: Fix typo in parsing SubjectAltNameDaiki Ueno2019-02-072-2/+25
| | | | Reported by David Leonard in #15.
* Update gcr_pkcs11_get_trust_{store|lookup}_slot URI checksmjog/gcr-lib-uri-handlingMichael Gratton2019-01-101-3/+15
| | | | | | | | | | No store/lookup URIs may be present, even after initialising them, if no appropriate stores are found. Check this is the case before attempting to use them, and clarify in both debug output and the gtkdocs about what is happening in such cases. This makes the underlying problem in #10 a bit more obvious when debugging.
* gcr: Don't specify checksum types for certificate fingerprint docswip/mjog/cert-fingerprint-docsMichael Gratton2019-01-091-6/+0
| | | | | Remove sentences that suggest only SHA1 and MD5 are supported hashes when getting a certificate's fingerprint.
* system-prompter: Fix use of g_hash_table_lookup_extendedDaiki Ueno2018-09-301-1/+3
| | | | | | | | Since the glib commit 8dc8b33d, g_hash_table_lookup_extended() started to clear the argument to NULL, even if the lookup failed. Do not expect the original key is preserved in that case. Fixes #9.
* test-secure-memory: Skip oversized tests when running as rootDaiki Ueno2018-06-141-0/+11
| | | | | If the test program is running as a privileged user, it is not possible to set the limit of mlock().
* gcr: Implement GcrSshAskpass APIwip/dueno/ssh-askpassStef Walter2018-02-246-1/+794
| | | | | | | This allows calling ssh programs like ssh-add or ssh itself, and handling the password prompts. https://bugzilla.gnome.org/show_bug.cgi?id=735873
* gcr: Suppress compiler warningDaiki Ueno2018-01-081-1/+1
|
* Properly DER encode CKA_EC_POINTJakub Jelen2017-11-273-10/+95
| | | | | | | | | * The PKCS#11 specification described this attribute as DER encoded and existing tools expect the value as an OCTET STRING Signed-off-by: Jakub Jelen <jjelen@redhat.com> https://bugzilla.gnome.org/show_bug.cgi?id=785234