path: root/client/gtk.c
AgeCommit message (Collapse)AuthorFilesLines
2014-08-19Show an error message when certificate retreival failsSamuel Lidén Borell1-0/+12
2014-08-04Rewrite most initializers to not require relocationsSamuel Lidén Borell1-33/+45
This patch changes most initializers to not require relocations, except for the ASN1 stuff in client/request.c and baseClass in plugin/npobject.c
2014-04-30Replace deprecated GTK_STOCK_ macros by their official replacement labelsHenrik Nordstrom1-2/+2
2014-02-16Focus password entry again if the password was incorrectSamuel Lidén Borell1-0/+3
2014-02-16Give the password entry focus even when signing a text messageSamuel Lidén Borell1-0/+3
2014-02-08Change unspecified argument lists "()" into "(void)"Samuel Lidén Borell1-8/+8
2014-02-07Remove version expiry status checking systemSamuel Lidén Borell1-8/+0
This system had two purposes: 1) to make FriBID able to determine the latest version of the official software it could emulate, without having to upgrade FriBID itself. 2) to make it possible to "revoke" old versions of FriBID in case of security problems. It has turned out that this system is not necessary. 1) was never really needed because the official software was updated quite rarely anyway and only a few web sites cared about the version string anyway. 2) is a kind of "kill switch" but it's not very useful since it's only checked when you use the FriBID user interface. Hence users who use FriBID (the user interface) infrequently or users who do not use it any longer would not see the warning message. And it seems that most users only use FriBID infrequently (typically once a year or so). This change removes a lot of code. One of the function calls removed is platform_seedRandom which was ONLY used for the "expiry" feature which used rand(). This does not affect the crypto stuff which uses OpenSSL's random generator which in turn uses /dev/random.
2014-02-02Fix window size in recent Firefox versionsSamuel Lidén Borell1-3/+3
2014-02-01Select the last sorted (usaully the newest) token at start upSamuel Lidén Borell1-8/+33
2014-02-01Remove unused sort codeSamuel Lidén Borell1-4/+0
2014-02-01Sort the list of tokensSamuel Lidén Borell1-5/+5
2012-10-10New error message when P12 file can be created, but is not writableSamuel Lidén Borell1-0/+2
2012-04-27Change my e-mailSamuel Lidén Borell1-1/+1
2012-04-06Print and display error messages from OpenSSL and libp11Samuel Lidén Borell1-1/+10
2012-04-06New error codes/messages: SignatureFailure and MessageTooLongSamuel Lidén Borell1-0/+4
2012-01-16Remove useless const qualifiersSamuel Lidén Borell1-1/+1
2011-10-14Remove cast to GtkVBox, which is deprecated in Gtk 3.2+Samuel Lidén Borell1-3/+3
2011-08-16Avoid deprecated GDK function. Fixes 64-bit problemSamuel Lidén Borell1-1/+1
We disable prototypes of deprecated functions, so this function will get default return and parameters types of int. This is a problem on 64-bit platforms where int is smaller than a pointer. Thanks to Edward Tjörnhammar who discovered this problem.
2011-07-31Refuse to generate keys if there's no PRNG stateSamuel Lidén Borell1-0/+4
2011-07-13Sort the tokens by their display nameSamuel Lidén Borell1-0/+4
2011-06-22Fix compile error on GTK 3.0Samuel Lidén Borell1-0/+7
gdk_window_foreign_new was deprecated in 2.24 and removed in 3.0. We still use this function on 2.24 so builds created on this version can run on older versions (2.18 is supported by FriBID).
2011-06-22Remove compatiblity with GTK <2.14Samuel Lidén Borell1-4/+0
Most likely this didn't work because we use GtkInfoBar etc. which was added in 2.18
2011-04-22Make error dialogs stay above the keygen and file chooser dialogs alsoSamuel Lidén Borell1-3/+9
2011-04-20Implement password policysSamuel Lidén Borell1-1/+49
This patch adds support for the parameters MinLen, MinChars and MinDigits. I didn't add MaxLen because I think it's stupid to prohibit long passwords :)
2011-04-20Improve English language stringsSamuel Lidén Borell1-2/+2
2011-04-19Make sign dialog stay on top of browser window againSamuel Lidén Borell1-1/+1
Commit f33cc29f2d1c4ecac3b2d7b766a7fe3e5aeb4d76 broke this
2011-04-17Show more specific error messages and use g_strerrorSamuel Lidén Borell1-6/+22
2011-04-17Add password choice / key generation dialogSamuel Lidén Borell1-26/+111
2011-04-12Ignore .tmp files in ~/cbtSamuel Lidén Borell1-1/+5
2011-01-03Add certificate request creation to the interface for the backendsSamuel Lidén Borell1-1/+3
2010-09-05pinpad entry improvementsMarcus Carlson1-4/+44
2010-07-03Add an abstraction layer for tokensSamuel Lidén Borell1-118/+181
This patch adds a common interface for different kinds of tokens. The interface should hopefully be able to support both smart cards and file-based tokens (PKCS12 and NGE/NGP), but at the moment only PKCS12 tokens are implemented. I've included a few other changes in this patch as well because it was easier to make them at the same time. This includes more useful error messages and a little refactoring of the PKCS12 code.
2010-06-15Only list certificates with the correct keyusage when doing ↵Marcus Carlson1-5/+10
2010-06-10Use GSEAL when buildingMarcus Carlson1-2/+4
This prevents direct access to data structures in GTK (and GLib in the future). Thanks to Marcus Carlson for this patch!
2010-04-12Allow p12 files in ~/.cbtMarcus Carlson1-8/+14
2010-03-24Make the signing/authentication dialog fasterSamuel Lidén Borell1-4/+9
Before this patch it was shown and then filled with information. This caused it to be resized and repainted. With this patch the dialog isn't shown until the platform_sign function is called.
2010-02-23Fix some bugs from the second last patchSamuel Lidén Borell1-3/+3
These changes fix two bugs from the secure memory patch, 2605e8dd6ffd0b8cc710a3f91d58192cd510473a The one in gtk.c was caused by the password variable being dereferenced after it had been indexed (an operator precedence problem). This could cause a crash. The one in main.c was a logic error were an error message was sent as a parameter to the plugin. However, the plugin expects this parameter to be the Signature so this was wrong (but hard to spot!). I also changed a secmem_init_pool function to reset the pool pointer to NULL if mmap fails, to avoid errors later on.
2010-02-20Introduce guaranteed_memset()Linus Walleij1-1/+2
This patch tries to counter the issues presented by some compilers that agressively optimize inlined memset() code. Solution proposed by Michael Howard as documented in David Wheelers secure programming book. Signed-off-by: Linus Walleij <>
2010-02-20Provide a secure memory pool and use itLinus Walleij1-6/+11
This implements a secure memory pool for use in fribid, allocating a page at a time for secure use. We currently only use one page for the passphrase, but an arbitrary number of pages can be made available. We currently don't need more intelligence than this. The page pool is mmap():ed in to make sure it's on even pages, and the entire pool is then mlock():ed to hinder it from being spooled out as swap. This also augments the platform_sign function so that it takes the piece of (secure) memory used to store the password as a parameter, and copied the passphrase into it as soon as it's retrieved, so that it is not allocated or passed around elsewhere. Signed-off-by: Linus Walleij <>
2010-02-20Fix GCC warnings about sentinelsSamuel Lidén Borell1-2/+2
Thanks to Markus Bergkvist for this patch.
2010-02-20Fixed a few more window id problems on 64-bit platformsSamuel Lidén Borell1-2/+2
This commit fixes the code outside of the plugin to work properly with 64-bit windows ids. I also simplified the plugin code a bit by using the None value instead of having a separate parameter and a boolean return value.
2010-01-02Clear UCS2 passwords when they are freedSamuel Lidén Borell1-1/+3
The password/passphrase is converted from UTF-8 to UCS2, because NSS expects passwords in UCS2 format.
2010-01-02Corrected the usage of gtk_message_dialog_newSamuel Lidén Borell1-1/+1
2010-01-02Better wording in the user interfaceSamuel Lidén Borell1-5/+5
2010-01-02Don't create duplicate subjects when adding the same P12 file twiceSamuel Lidén Borell1-1/+30
2010-01-02Select the only signature if there's only oneSamuel Lidén Borell1-0/+14
2010-01-02Set the modal hint on the dialog using GTK instead of GDKSamuel Lidén Borell1-1/+1
2010-01-02Made the window modal instead of "stay on top"Samuel Lidén Borell1-3/+23
2010-01-02Documented some functionsSamuel Lidén Borell1-3/+8
2010-01-02Added translation support and a Swedish translationSamuel Lidén Borell1-12/+20