platform/upstream/gcr.git
15 years agoImplement valgrind support for our memory allocator, and support for
Stefan Walter [Wed, 11 Mar 2009 03:49:47 +0000 (03:49 +0000)]
Implement valgrind support for our memory allocator, and support for
running gnome-keyring-daemon under valgrind. Use --enable-valgrind=run

svn path=/trunk/; revision=1665

15 years agoCheck for asn1Parser tool in configure.
Stefan Walter [Thu, 5 Mar 2009 04:02:25 +0000 (04:02 +0000)]
Check for asn1Parser tool in configure.

Patch by Alberto Ruiz. Fixes bug #566731

svn path=/trunk/; revision=1660

15 years agoAllow specifying auto-authenticate property on a more fine grained level.
Stefan Walter [Tue, 3 Mar 2009 22:25:00 +0000 (22:25 +0000)]
Allow specifying auto-authenticate property on a more fine grained level.

svn path=/trunk/; revision=1657

15 years ago Fix "gnome-keyring-ask needs to disable
Stefan Walter [Tue, 3 Mar 2009 03:51:36 +0000 (03:51 +0000)]
 Fix "gnome-keyring-ask needs to disable
input method in password" bug #561331 Patch by Takao Fujiwara

svn path=/trunk/; revision=1654

15 years agoFix compiler warnings on 32-bit.
Stefan Walter [Sat, 28 Feb 2009 22:46:19 +0000 (22:46 +0000)]
Fix compiler warnings on 32-bit.

svn path=/trunk/; revision=1638

15 years agoSome changes to the import dialog.
Stefan Walter [Sat, 28 Feb 2009 03:20:13 +0000 (03:20 +0000)]
Some changes to the import dialog.

svn path=/trunk/; revision=1636

15 years agoFix problem with looking up pin initialized flag in the wrong
Stefan Walter [Sat, 28 Feb 2009 03:05:45 +0000 (03:05 +0000)]
Fix problem with looking up pin initialized flag in the wrong
structure.

svn path=/trunk/; revision=1632

15 years agoAdd quick hack to initialize tokens before importing into them.
Stefan Walter [Sat, 28 Feb 2009 01:24:13 +0000 (01:24 +0000)]
Add quick hack to initialize tokens before importing into them.

More functionality along this line will be needed in future versions.

svn path=/trunk/; revision=1627

15 years agoWhen enumerating objects in a module, skip tokens that fail from not being initialized.
Stefan Walter [Fri, 27 Feb 2009 01:00:07 +0000 (01:00 +0000)]
When enumerating objects in a module, skip tokens that fail from not being initialized.

svn path=/trunk/; revision=1623

15 years agoUse union instead of struct. Fixes bug #571951
Jeff Cai [Thu, 19 Feb 2009 03:41:47 +0000 (03:41 +0000)]
Use union instead of struct. Fixes bug #571951

2009-02-19  Jeff Cai <jeff.cai@sun.com>

    * egg/egg-secure-memory.c:
    Use union instead of struct.
    Fixes bug #571951

svn path=/trunk/; revision=1606

15 years agoRelease version 2.25.91
Stefan Walter [Sat, 14 Feb 2009 18:17:01 +0000 (18:17 +0000)]
Release version 2.25.91

svn path=/trunk/; revision=1589

15 years agoDon't show horizontal scrollbar.
Stefan Walter [Sat, 14 Feb 2009 03:45:34 +0000 (03:45 +0000)]
Don't show horizontal scrollbar.

svn path=/trunk/; revision=1578

15 years agoShow extensions as in hex form.
Stefan Walter [Sat, 14 Feb 2009 03:45:15 +0000 (03:45 +0000)]
Show extensions as in hex form.

No parsing of extensions yet.

svn path=/trunk/; revision=1577

15 years agoAllow loading any DER certificate file.
Stefan Walter [Sat, 14 Feb 2009 03:44:55 +0000 (03:44 +0000)]
Allow loading any DER certificate file.

svn path=/trunk/; revision=1576

15 years agoFill in the OID descriptions for RSA and DSA stuff.
Stefan Walter [Sat, 14 Feb 2009 00:31:17 +0000 (00:31 +0000)]
Fill in the OID descriptions for RSA and DSA stuff.

svn path=/trunk/; revision=1575

15 years agoFill in the key size field.
Stefan Walter [Sat, 14 Feb 2009 00:23:27 +0000 (00:23 +0000)]
Fill in the key size field.

svn path=/trunk/; revision=1574

15 years agoFill in key and signature algorithms and parameters.
Stefan Walter [Sat, 14 Feb 2009 00:23:22 +0000 (00:23 +0000)]
Fill in key and signature algorithms and parameters.

svn path=/trunk/; revision=1573

15 years agoChange to right directory so we can easily find test certificates.
Stefan Walter [Sat, 14 Feb 2009 00:23:14 +0000 (00:23 +0000)]
Change to right directory so we can easily find test certificates.

svn path=/trunk/; revision=1572

15 years agoPull out OID information functionality into it's own file.
Stefan Walter [Sat, 14 Feb 2009 00:23:07 +0000 (00:23 +0000)]
Pull out OID information functionality into it's own file.

svn path=/trunk/; revision=1571

15 years agoUse more readable upper case space delemited hex encoding for the fingerprint.
Stefan Walter [Fri, 13 Feb 2009 21:31:01 +0000 (21:31 +0000)]
Use more readable upper case space delemited hex encoding for the fingerprint.

svn path=/trunk/; revision=1569

15 years agoAllow specifying the delemiter and case of hex encodings.
Stefan Walter [Fri, 13 Feb 2009 21:30:57 +0000 (21:30 +0000)]
Allow specifying the delemiter and case of hex encodings.

svn path=/trunk/; revision=1568

15 years agoShow the correct MD5 hash in certificate basics dialog.
Stefan Walter [Fri, 13 Feb 2009 21:30:50 +0000 (21:30 +0000)]
Show the correct MD5 hash in certificate basics dialog.

Fixes bug #567769

svn path=/trunk/; revision=1567

15 years agoDon't try and allocate 0 bytes when changing allocator on an empty buffer.
Stefan Walter [Fri, 13 Feb 2009 18:32:47 +0000 (18:32 +0000)]
Don't try and allocate 0 bytes when changing  allocator on an empty buffer.

svn path=/trunk/; revision=1565

15 years agoDon't allow allocating zero bytes.
Stefan Walter [Fri, 13 Feb 2009 18:32:41 +0000 (18:32 +0000)]
Don't allow allocating zero bytes.

svn path=/trunk/; revision=1564

15 years agoUse size_t and gsize for memory sizes rather than unsigned long.
Stefan Walter [Fri, 13 Feb 2009 18:05:26 +0000 (18:05 +0000)]
Use size_t and gsize for memory sizes rather than unsigned long.

Fixes bug #571615

svn path=/trunk/; revision=1563

15 years agoCompletely overhaul the secure memory allocator.
Stefan Walter [Fri, 13 Feb 2009 04:21:00 +0000 (04:21 +0000)]
Completely overhaul the secure memory allocator.

Don't store metadata inside the secure memory area. Add memory guards, so that we can see if/when memory is incorrectly overflown.

svn path=/trunk/; revision=1562

15 years agoBe much stricter about checking pointers and sizes being passed around.
Stefan Walter [Fri, 13 Feb 2009 04:20:51 +0000 (04:20 +0000)]
Be much stricter about checking pointers and sizes being passed around.

svn path=/trunk/; revision=1561

15 years agoRemove unused field.
Stefan Walter [Fri, 13 Feb 2009 04:20:44 +0000 (04:20 +0000)]
Remove unused field.

svn path=/trunk/; revision=1560

15 years agoCalculate memory header size at compile time.
Stefan Walter [Fri, 13 Feb 2009 04:20:37 +0000 (04:20 +0000)]
Calculate memory header size at compile time.

svn path=/trunk/; revision=1559

15 years agoRemove FORCE_MALLOC_MEMORY define.
Stefan Walter [Fri, 13 Feb 2009 04:20:28 +0000 (04:20 +0000)]
Remove FORCE_MALLOC_MEMORY define.

It seems we can accomplish the identical goal with FORCE_FALLBACK_MEMORY.

svn path=/trunk/; revision=1558

15 years agoRemove non-useful mincell structure element from sub allocator.
Stefan Walter [Fri, 13 Feb 2009 04:20:17 +0000 (04:20 +0000)]
Remove non-useful mincell structure element from sub allocator.

svn path=/trunk/; revision=1557

15 years agoAdd G_BEGIN_DECLS/G_END_DECLS to gcr headers.
Stefan Walter [Wed, 11 Feb 2009 15:00:43 +0000 (15:00 +0000)]
Add G_BEGIN_DECLS/G_END_DECLS to gcr headers.

svn path=/trunk/; revision=1555

15 years agoCorrect pkg-config for the gp11 dependency.
Stefan Walter [Wed, 11 Feb 2009 01:08:25 +0000 (01:08 +0000)]
Correct pkg-config for the gp11 dependency.

svn path=/trunk/; revision=1552

15 years agoAdd translator comments.
Stefan Walter [Sun, 8 Feb 2009 14:38:13 +0000 (14:38 +0000)]
Add translator comments.

Fixes bug #570529

svn path=/trunk/; revision=1538

15 years agoSetup automatically log into token, and pool sessions.
Stefan Walter [Sun, 8 Feb 2009 04:56:48 +0000 (04:56 +0000)]
Setup automatically log into token, and pool sessions.

svn path=/trunk/; revision=1530

15 years agoCKA_TOKEN is a CK_BBOOL not a CK_ULONG
Stefan Walter [Sun, 8 Feb 2009 04:56:42 +0000 (04:56 +0000)]
CKA_TOKEN is a CK_BBOOL not a CK_ULONG

svn path=/trunk/; revision=1529

15 years agoFix problem with not distributing pkcs11.h
Stefan Walter [Sun, 8 Feb 2009 04:11:22 +0000 (04:11 +0000)]
Fix problem with not distributing pkcs11.h

svn path=/trunk/; revision=1527

15 years agoMove the general dbus code into our egg folder.
Stefan Walter [Sun, 8 Feb 2009 00:21:25 +0000 (00:21 +0000)]
Move the general dbus code into our egg folder.

svn path=/trunk/; revision=1524

15 years agoCentralize the way that libgcrypt is initialized from our code.
Stefan Walter [Sat, 7 Feb 2009 23:54:04 +0000 (23:54 +0000)]
Centralize the way that libgcrypt is initialized from our code.

So the different components don't step on each other's toes.

svn path=/trunk/; revision=1522

15 years agoWe should only have one pkcs11.h header.
Stefan Walter [Sat, 7 Feb 2009 23:23:41 +0000 (23:23 +0000)]
We should only have one pkcs11.h header.

svn path=/trunk/; revision=1517

15 years agoAdd GTK library dependency in libgcr.
Stefan Walter [Sat, 7 Feb 2009 18:29:30 +0000 (18:29 +0000)]
Add GTK library dependency in libgcr.

See bug #570393

svn path=/trunk/; revision=1509

15 years agoUse varargs properly.
Stefan Walter [Sat, 7 Feb 2009 18:04:14 +0000 (18:04 +0000)]
Use varargs properly.

svn path=/trunk/; revision=1508

15 years agoUse properly sized variable to store handle in the test.
Stefan Walter [Sat, 7 Feb 2009 18:04:09 +0000 (18:04 +0000)]
Use properly sized variable to store handle in the test.

svn path=/trunk/; revision=1507

15 years agoDon't use freed memory in test.
Stefan Walter [Sat, 7 Feb 2009 18:04:05 +0000 (18:04 +0000)]
Don't use freed memory in test.

svn path=/trunk/; revision=1506

15 years agoFix problem not specifying size correctly when using varargs in tests.
Stefan Walter [Sat, 7 Feb 2009 18:03:59 +0000 (18:03 +0000)]
Fix problem not specifying size correctly when using varargs in tests.

svn path=/trunk/; revision=1505

15 years agoUse more portable construct for signifying invalid memory in a test.
Stefan Walter [Sat, 7 Feb 2009 17:30:00 +0000 (17:30 +0000)]
Use more portable construct for signifying invalid memory in a test.

svn path=/trunk/; revision=1502

15 years agoFix problems with clearing out entire memory block when allocating
Stefan Walter [Sat, 7 Feb 2009 17:29:55 +0000 (17:29 +0000)]
Fix problems with clearing out entire memory block when allocating
memory, and then reallocating it.

svn path=/trunk/; revision=1501

15 years agoFix compiler warnings from -Wold-style-declaration. Fixes bug #5706
Thomas Hindoe Paaboel Andersen [Thu, 5 Feb 2009 20:57:49 +0000 (20:57 +0000)]
Fix compiler warnings from -Wold-style-declaration. Fixes bug #5706

svn path=/trunk/; revision=1498

15 years agoFix more size problems when using constants with varargs. Fixes bug
Stefan Walter [Mon, 2 Feb 2009 12:58:29 +0000 (12:58 +0000)]
Fix more size problems when using constants with varargs. Fixes bug

* daemon/pk/gkr-pk-cert.c:
* daemon/pk/gkr-pk-import.c:
* daemon/pk/gkr-pk-object.c:
* daemon/pk/gkr-pk-privkey.c:
* daemon/pk/gkr-pk-pubkey.c:
* daemon/pk/gkr-pk-util.c:
* gp11/gp11-attributes.c:
* gp11/gp11-object.c:
* gp11/tests/unit-test-gp11-attributes.c:
* gp11/tests/unit-test-gp11-object.c:
* gp11/tests/unit-test-gp11-session.c:
* pkcs11/gck/gck-attributes.c:
* pkcs11/gck/gck-private-key.c:
* pkcs11/gck/gck-public-key.c:
* pkcs11/gck/gck-session.c:
* pkcs11/ssh-agent/gck-ssh-agent-ops.c:
* pkcs11/ssh-agent/gck-ssh-agent-proto.c:
* tools/gkr-tool-import.c: Fix more size problems when using constants
with varargs. Fixes bug #569736. Research by Christophe Fergeau

svn path=/trunk/; revision=1492

15 years agoFix size problems when using constants with varargs. Fixes bug #569736.
Stefan Walter [Fri, 30 Jan 2009 21:06:57 +0000 (21:06 +0000)]
Fix size problems when using constants with varargs. Fixes bug #569736.

* gp11/gp11.h:
* gp11/pkcs11.h: Fix size problems when using constants
with varargs. Fixes bug #569736. Research by Christophe Fergeau

svn path=/trunk/; revision=1485

15 years agoUse a more definite value for our varargs termination. Fixes bug #569769
Stefan Walter [Fri, 30 Jan 2009 20:42:22 +0000 (20:42 +0000)]
Use a more definite value for our varargs termination. Fixes bug #569769

* gp11/gp11.h:
* gp11/gp11-attributes.c: Use a more definite value for
our varargs termination. Fixes bug #569769

svn path=/trunk/; revision=1484

15 years agoBuild fixes.
Stefan Walter [Thu, 29 Jan 2009 01:34:45 +0000 (01:34 +0000)]
Build fixes.

* gcr/gcr-simple-certificate.c:
* pkcs11/gck/gck-data-der.c: Build fixes.

svn path=/trunk/; revision=1482

15 years agoInstall appropriate header files and fix the pkg-config file for the gcr
Stefan Walter [Thu, 29 Jan 2009 01:12:43 +0000 (01:12 +0000)]
Install appropriate header files and fix the pkg-config file for the gcr

* gcr/gcr.h:
* gcr/gcr.pc.in:
* gcr/gcr-certificate-basics-widget.h:
* gcr/gcr-certificate-details-widget.h:
* gcr/gcr-importer.h:
* gcr/gcr-parser.h:
* gcr/gcr-types.h:
* gcr/Makefile.am: Install appropriate header files
and fix the pkg-config file for the gcr library.

* gcr/gcr-certificate.c:
* gcr/gcr-certificate.h:
* gcr/gcr-simple-certificate.c: (added)
* gcr/gcr-simple-certificate.h: (added)
* gcr/tests/ui-test-details.c:
* gcr/tests/unit-test-certificate.c: Make GcrCertificate
an interface so that it can more easily plug into
various libraries.

svn path=/trunk/; revision=1481

15 years agoAdd basic UI widgets for displaying a certificate.
Stefan Walter [Wed, 28 Jan 2009 01:38:38 +0000 (01:38 +0000)]
Add basic UI widgets for displaying a certificate.

* egg/egg-asn1.c:
* egg/egg-asn1.h:
* egg/egg-hex.c:
* egg/egg-hex.h:
* egg/pkix.asn:
* egg/tests/unit-test-asn1.c:
* egg/tests/unit-test-hex.c:
* gcr/gcr-certificate.c: (added)
* gcr/gcr-certificate.h: (added)
* gcr/gcr-certificate-basics-widget.c: (added)
* gcr/gcr-certificate-basics-widget.glade: (added)
* gcr/gcr-certificate-basics-widget.h: (added)
* gcr/gcr-certificate-details-widget.c: (added)
* gcr/gcr-certificate-details-widget.h: (added)
* gcr/gcr-library.c:
* gcr/gcr-parser.c:
* gcr/Makefile.am:
* gcr/tests/Makefile.am:
* gcr/tests/ui-test-details.c: (added)
* gcr/tests/unit-test-certificate.c: (added) Add basic UI widgets for
displaying a certificate.

svn path=/trunk/; revision=1480

15 years agoComplete importer in gcr library. Make 'gnome-keyring import' use the new
Stefan Walter [Wed, 21 Jan 2009 22:08:17 +0000 (22:08 +0000)]
Complete importer in gcr library. Make 'gnome-keyring import' use the new

* daemon/ui/gkr-ask-entry.c: (moved)
* daemon/ui/gkr-ask-entry.h: (moved)
* daemon/ui/gkr-ask-tool.c:
* daemon/ui/Makefile.am:
* egg/egg-secure-entry.c: (moved from daemon/ui/gkr-ask-entry.c)
* egg/egg-secure-entry.h: (moved from daemon/ui/gkr-ask-entry.h)
* egg/Makefile.am:
* gcr/gcr.h: (added)
* gcr/gcr-import-dialog.c: (added)
* gcr/gcr-import-dialog.glade:
* gcr/gcr-import-dialog.h: (added)
* gcr/gcr-importer.c:
* gcr/gcr-importer.h:
* gcr/gcr-internal.c: (removed)
* gcr/gcr-internal.h:
* gcr/gcr-library.c: (added)
* gcr/gcr-parser.c:
* gcr/gcr-parser.h:
* gcr/gcr-types.h:
* gcr/Makefile.am:
* gcr/tests/Makefile.am:
* gcr/tests/unit-test-parser.c:
* tool/gkr-tool.c:
* tool/gkr-tool-import.c:
* tool/Makefile.am: Complete importer in gcr library. Make 'gnome-keyring import'
use the new importer.

svn path=/trunk/; revision=1472

15 years agoAdd hash and equals functions for PKCS#11 modules, slots, and objects.
Stefan Walter [Tue, 20 Jan 2009 20:38:29 +0000 (20:38 +0000)]
Add hash and equals functions for PKCS#11 modules, slots, and objects.

* gp11/gp11.h:
* gp11/gp11-module.c:
* gp11/gp11-object.c:
* gp11/gp11-slot.c:
* gp11/tests/unit-test-gp11-module.c:
* gp11/tests/unit-test-gp11-object.c:
* gp11/tests/unit-test-gp11-slot.c: Add hash and equals functions for
PKCS#11 modules, slots, and objects. Allows them to be used in hash tables
and searches.

svn path=/trunk/; revision=1471

15 years agoExpose looking up slot flags, and a few other helpful functions.
Stefan Walter [Tue, 20 Jan 2009 16:41:14 +0000 (16:41 +0000)]
Expose looking up slot flags, and a few other helpful functions.

* gp11/gp11.h:
* gp11/gp11-misc.c:
* gp11/gp11-module.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c: Expose looking up slot flags,
and a few other helpful functions.

svn path=/trunk/; revision=1469

15 years agoRelease version 2.25.5
Stefan Walter [Tue, 20 Jan 2009 00:37:59 +0000 (00:37 +0000)]
Release version 2.25.5

* egg/Makefile.am:
* egg/tests/test.asn:
* egg/tests/unit-test-secmem.c:
* egg/tests/unit-test-symkey.c:
* egg/tests/test-data/test-certificate-1.der: (added)
* egg/tests/test-data/pem-rsa-enc.key: (added)
* gcr/Makefile.am:
* pkcs11/roots-sotre/gck-roots-module.c:
* configure.in:
* NEWS: Release version 2.25.5

svn path=/trunk/; revision=1467

15 years agoFix build warning
Stefan Walter [Sun, 18 Jan 2009 22:30:37 +0000 (22:30 +0000)]
Fix build warning

* gcr/tests/unit-test-parser.c: Fix build warning

svn path=/trunk/; revision=1464

15 years agoAdd new gcr library for crypto UI and related tasks. Implement GckParser
Stefan Walter [Sun, 18 Jan 2009 22:24:09 +0000 (22:24 +0000)]
Add new gcr library for crypto UI and related tasks. Implement GckParser

* egg/egg-asn1.c:
* egg/egg-hex.c: (split from pkcs11/gck/gck-util.c)
* egg/egg-hex.h: (split from pkcs11/gck/gck-util.h)
* egg/egg-openssl.c: (moved from pkcs11/gck/gck-data-openssl.c)
* egg/egg-openssl.h: (moved from pkcs11/gck/gck-data-openssl.h)
* egg/egg-symkey.c: (split from pkcs11/gck/gck-crypto.c)
* egg/egg-symkey.h: (split from pkcs11/gck/gck-crypto.h)
* egg/Makefile.am:
* egg/tests/Makefile.am:
* egg/tests/unit-test-asn1.c:
* egg/tests/unit-test-hex.c: (moved from pkcs11/gck/tests/unit-test-util.c)
* egg/tests/unit-test-openssl.c: (moved from pkcs11/gck/tests/unit-test-data-openssl.c)
* egg/tests/unit-test-symkey.c: (split from pkcs11/gck/tests/unit-test-crypto.c)
* gcr/gcr.pc.in: (added)
* gcr/gcr-internal.c: (added)
* gcr/gcr-internal.h: (added)
* gcr/gcr-marshal.list: (added)
* gcr/gcr-parser.c: (added)
* gcr/gcr-parser.h: (added)
* gcr/gcr-types.h: (added)
* gcr/Makefile.am: (added)
* gcr/template/*: (added)
* gcr/tests/Makefile.am: (added)
* gcr/tests/unit-test-parser.c: (added)
* gcr/tests/test-data: (copied from daemon/pkix/test/test-data)
* gp11/gp11.h:
* pkcs11/gck/gck-crypto.c:
* pkcs11/gck/gck-crypto.h:
* pkcs11/gck/gck-data-der.c:
* pkcs11/gck/gck-data-der.h:
* pkcs11/gck/gck-data-file.c:
* pkcs11/gck/gck-data-openssl.c: (moved)
* pkcs11/gck/gck-data-openssl.h: (moved)
* pkcs11/gck/gck-data-pem.c: (combined into egg/egg-openssl.c)
* pkcs11/gck/gck-data-pem.c: (combined into egg/egg-openssl.h)
* pkcs11/gck/gck-util.c:
* pkcs11/gck/gck-util.h:
* pkcs11/gck/Makefile.am:
* pkcs11/gck/tests/unit-test-crypto.c:
* pkcs11/gck/tests/unit-test-data-openssl.c: (moved)
* pkcs11/gck/tests/unit-test-util.c: (moved)
* pkcs11/roots-store/gck-roots-module.c:
* pkcs11/ssh-store/gck-ssh-openssh.c:
* pkcs11/user-store/gck-user-storage.c:
* configure.in:
* Makefile.am: Add new gcr library for crypto UI and related tasks. Implement
GckParser class.

svn path=/trunk/; revision=1463

15 years agoConsolidate truly common functionality into 'egg' library. Many more files
Stefan Walter [Sat, 17 Jan 2009 23:27:10 +0000 (23:27 +0000)]
Consolidate truly common functionality into 'egg' library. Many more files

* egg/egg-asn1.c: (moved from pkcs11/gck/gck-data-asn1.c)
* egg/egg-asn1.h: (moved from pkcs11/gck/gck-data-asn1.h)
* egg/egg-buffer.c: (moved from common/gkr-buffer.c)
* egg/egg-buffer.h: (moved from common/gkr-buffer.h)
* egg/egg-secure-memory.c: (moved from common/gkr-secure-memory.c)
* egg/egg-secure-memory.h: (moved from common/gkr-secure-memory.h)
* egg/egg-unix-credentials.c: (moved from common/gkr-unix-credentials.c)
* egg/egg-unix-credentials.h: (moved from common/gkr-unix-credentials.h)
* egg/Makefile.am: (added)
* egg/pk.asn: (moved from pkcs11/gck/pk.asn)
* egg/pkix.asn: (moved from pkcs11/gck/pkix.asn)
* egg/tests/Makefile.am: (added)
* egg/tests/test.asn: (moved from pkcs11/gck/tests/test.asn)
* egg/tests/unit-test-asn1.c: (moved from pkcs11/gck/tests/unit-test-data-asn1.c)
* egg/tests/unit-test-secmem.c: (moved from common/tests/unit-test-secmem.c)
* egg/tests/test-data: (added) Consolidate truly common functionality into 'egg'
library. Many more files touched due to above changes.

svn path=/trunk/; revision=1461

15 years agoDon't try to keep authenticating when bad password on protected auth path
Stefan Walter [Thu, 8 Jan 2009 18:41:26 +0000 (18:41 +0000)]
Don't try to keep authenticating when bad password on protected auth path

* gp11/gp11-module.c:
* gp11/gp11-session.c:
* gp11/gp11-slot.c: Don't try to keep authenticating when
bad password on protected auth path authentication. Protected
auth path repeats internally as necessary.

* pkcs11/pkcs11g.h:
* pkcs11/gck/gck-attributes.c:
* pkcs11/gck/gck-object.c:
* pkcs11/gck/gck-object.h:
* pkcs11/ssh-store/gck-ssh-module.c:
* pkcs11/ssh-store/gck-ssh-private-key.c:
* pkcs11/ssh-store/gck-ssh-private-key.h:
* pkcs11/ssh-store/gck-ssh-public-key.c:
* pkcs11/ssh-store/gck-ssh-public-key.h: Added CKA_GNOME_UNIQUE
attribute.

* daemon/gkr-daemon.c:
* daemon/Makefile.am:
* daemon/pkcs11/gkr-pkcs11-auth.c: (added)
* daemon/pkcs11/gkr-pkcs11-auth.h: (added)
* daemon/pkcs11/gkr-pkcs11-auth-ep.c: (added)
* daemon/pkcs11/gkr-pkcs11-daemon.c: (added)
* daemon/pkcs11/gkr-pkcs11-daemon.h: (added)
* daemon/pkcs11/Makefile.am:
* daemon/pkix/gkr-pkix-asn1.c:
* daemon/ssh/gkr-ssh-daemon.h: (removed)
* daemon/ssh/gkr-ssh-daemon-io.c: (removed)
* daemon/ssh/gkr-ssh-daemon-ops.c: (removed)
* daemon/ssh/Makefile.am: (removed)
* daemon/ui/gkr-ask-daemon.c:
* pkcs11/ssh-agent/gck-ssh-agent.c:
* pkcs11/ssh-agent/gck-ssh-agent-ops.c: Integrate new modular SSH agent
as the main gnome-keyring-daemon SSH agent.

svn path=/trunk/; revision=1447

15 years agoFix compiler warnings and add -Werror back in when --enable-tests is
Stefan Walter [Tue, 6 Jan 2009 06:26:42 +0000 (06:26 +0000)]
Fix compiler warnings and add -Werror back in when --enable-tests is

* configure.in:
* gp11/gp11.h:
* gp11/reference/Makefile.am:
* gp11/tests/gp11-test-module.c:
* gp11/tests/unit-test-gp11-attributes.c:
* pam/tests/unit-test-pam-setup.c:
* pkcs11/gck/gck-file-store.c:
* pkcs11/gck/gck-file-tracker.c:
* pkcs11/gck/gck-manager.c:
* pkcs11/gck/gck-session.c:
* pkcs11/roots/gck-roots-certificate.c:
* pkcs11/rpc-layer/gck-rpc-module.c:
* pkcs11/ssh-agent/gck-ssh-agent-ops.c:
* pkcs11/ssh-store/gck-ssh-public-key.c: Fix compiler warnings
and add -Werror back in when --enable-tests is configured.

svn path=/trunk/; revision=1442

15 years agoHelper function for matching mechanism types.
Stefan Walter [Tue, 6 Jan 2009 03:13:26 +0000 (03:13 +0000)]
Helper function for matching mechanism types.

* gp11/gp11.h:
* gp11/gp11-slot.c: Helper function for matching mechanism types.

* pkcs11/ssh-agent/gck-ssh-agent.c:
* pkcs11/ssh-agent/gck-ssh-agent.h:
* pkcs11/ssh-agent/gck-ssh-agent-ops.c:
* pkcs11/ssh-agent/gck-ssh-agent-private.h:
* pkcs11/ssh-agent/gck-ssh-agent-standalone.c: The modular ssh agent now
uses keys from any available PKCS#11 slots, and automatically selects a decent
slot for it's session keys.

svn path=/trunk/; revision=1441

15 years agoFix broken release, I have no idea why it distchecked.
Stefan Walter [Mon, 5 Jan 2009 22:51:13 +0000 (22:51 +0000)]
Fix broken release, I have no idea why it distchecked.

* pkcs11/gck/gck-module.c: Fix broken release, I have no idea
why it distchecked.

* gp11/gp11-slot.c:
* pkcs11/gck/gck-data-asn1.c:
* pkcs11/gck/gck-data-pem.c: Fix compiler warnings.

svn path=/trunk/; revision=1438

15 years agoRelease 2.25.4
Stefan Walter [Mon, 5 Jan 2009 05:05:44 +0000 (05:05 +0000)]
Release 2.25.4

* configure.in:
* NEWS:
* daemon/Makefile.am:
* pkcs11/gck/tests/Makefile.am:
* pkcs11/rpc-layer/Makefile.am:
* pkcs11/ssh-agent/gck-ssh-agent-standalone.c: Release 2.25.4

svn path=/trunk/; revision=1433

15 years agoFine tune function signatures.
Stefan Walter [Mon, 5 Jan 2009 04:29:23 +0000 (04:29 +0000)]
Fine tune function signatures.

* gp11/gp11.h:
* gp11/gp11-module.c:
* gp11/tests/unit-test-gp11-module.c: Fine tune function signatures.

svn path=/trunk/; revision=1432

15 years agoAdd gp11_module_enumerate_objects set of functions which enumerates all
Stefan Walter [Mon, 5 Jan 2009 03:59:24 +0000 (03:59 +0000)]
Add gp11_module_enumerate_objects set of functions which enumerates all

* gp11/gp11.h:
* gp11/gp11-call.c:
* gp11/gp11-module.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/tests/unit-test-gp11-crypto.c:
* gp11/tests/unit-test-gp11-module.c:
* gp11/tests/unit-test-gp11-session.c: Add gp11_module_enumerate_objects
set of functions which enumerates all objects of a given type on a token.
Move 'auto-authenticate' and session pool to the module level.

svn path=/trunk/; revision=1431

15 years agoAdd method to initialize module from a function list.
Stefan Walter [Sat, 3 Jan 2009 22:57:54 +0000 (22:57 +0000)]
Add method to initialize module from a function list.

* gp11/gp11.h:
* gp11/gp11-module.c: Add method to initialize module from a function list.

svn path=/trunk/; revision=1418

15 years agoAdd support for specifying custom allocators on GP11Attributes, and fine
Stefan Walter [Tue, 30 Dec 2008 02:18:02 +0000 (02:18 +0000)]
Add support for specifying custom allocators on GP11Attributes, and fine

* gp11/gp11.h:
* gp11/gp11-attributes.c:
* gp11/gp11-object.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/tests/Makefile.am:
* gp11/tests/unit-test-gp11-attributes.c:
* gp11/tests/unit-test-gp11-crypto.c:
* gp11/tests/unit-test-gp11-object.c:
* tool/gkr-tool-import.c: Add support for specifying custom allocators
on GP11Attributes, and fine tune how gp11_object_get_* work. Add
concept of locked attribute arrays with guarantees of application to
not modify while we're processing them.

svn path=/trunk/; revision=1414

15 years agoAdd crypto support to GP11 library. Add support for auto-login of context
Stefan Walter [Mon, 29 Dec 2008 06:46:36 +0000 (06:46 +0000)]
Add crypto support to GP11 library. Add support for auto-login of context

* gp11/gp11.h:
* gp11/gp11-call.c:
* gp11/gp11-marshal.list:
* gp11/gp11-object.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/tests/gp11-test.h:
* gp11/tests/gp11-test-module.c:
* gp11/tests/Makefile.am:
* gp11/unit-test-gp11-crypto.c:
* gp11/unit-test-gp11-session.c: Add crypto support to GP11 library.
Add support for auto-login of context specific unlock of keys. Rework
how auto-login of a token works.

svn path=/trunk/; revision=1413

15 years agoAdd basic thread-safety.
Stefan Walter [Sat, 27 Dec 2008 18:29:23 +0000 (18:29 +0000)]
Add basic thread-safety.

* gp11/gp11.h:
* gp11/gp11-call.c:
* gp11/gp11-marshal.list:
* gp11/gp11-misc.c:
* gp11/gp11-module.c:
* gp11/gp11-object.c:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/tests/unit-test-gp11-module.c:
* gp11/tests/unit-test-gp11-object.c:
* gp11/tests/unit-test-gp11-session.c: Add basic thread-safety.

svn path=/trunk/; revision=1411

15 years agoFix possible threading problems, by using proper class finalizer, and
Stefan Walter [Sun, 21 Dec 2008 17:15:37 +0000 (17:15 +0000)]
Fix possible threading problems, by using proper class finalizer, and

* gp11/gp11-private.h:
* gp11/gp11-call.c: Fix possible threading problems, by using
proper class finalizer, and hiding all instance details.

* gp11/gp11-object.c: Fix possible reference counting problem.

* gp11/gp11-slot.c:
* gp11/tests/unit-test-gp11-object.c: Fix test reference problems.

svn path=/trunk/; revision=1402

15 years agoThere was a problem when the main loop wasn't being run for periods of
Stefan Walter [Wed, 17 Dec 2008 19:55:48 +0000 (19:55 +0000)]
There was a problem when the main loop wasn't being run for periods of

* gp11/gp11-call.c: There was a problem when the main loop
wasn't being run for periods of time, things would backup.
Now we process a result for every async call we make.

* gp11/gp11-object.c:
* gp11/gp11-slot.c: Object lifetime fixes.

svn path=/trunk/; revision=1392

15 years agogp11/gp11.h
Stefan Walter [Sun, 14 Dec 2008 00:39:44 +0000 (00:39 +0000)]
gp11/gp11.h

* gp11/gp11.h
* gp11/gp11-call.c:
* gp11/gp11-object.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/gp11-test-gp11-object.c: Don't tie an object to a session unless
explicitly requested. Automatically open a session for object operations
(usually pooled).

svn path=/trunk/; revision=1388

15 years agoRemove usage of deprecated glib stuff.
Stefan Walter [Tue, 4 Nov 2008 12:54:32 +0000 (12:54 +0000)]
Remove usage of deprecated glib stuff.

* configure.in:
* gp11/tests/gp11-test.h:
* common/gkr-location.c: Remove usage of deprecated glib stuff.

svn path=/trunk/; revision=1362

15 years agoRelease version 2.24.0
Stefan Walter [Sat, 20 Sep 2008 22:22:57 +0000 (22:22 +0000)]
Release version 2.24.0

* ChangeLog:
* configure.in:
* NEWS:
* gp11/reference/Makefile.am: Release version 2.24.0

svn path=/trunk/; revision=1344

15 years agoUpdate documentation for functions in gp11 library.
Stefan Walter [Thu, 18 Sep 2008 02:19:47 +0000 (02:19 +0000)]
Update documentation for functions in gp11 library.

* gp11/gp11-module.c:
* gp11/gp11-object.c:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/reference/Makefile.am:
* gp11/reference/gp11-docs.sgml:
* gp11/reference/gp11-sections.txt:
* gp11/reference/gp11-undeclared.txt:
* gp11/reference/tmpl/gp11-unused.sgml: Update documentation
for functions in gp11 library.

svn path=/trunk/; revision=1336

15 years agoAdd init_args field. (gp11_module_initialize): Use init_args structure
Stefan Walter [Sun, 14 Sep 2008 22:35:43 +0000 (22:35 +0000)]
Add init_args field. (gp11_module_initialize): Use init_args structure

* gp11/gp11-module.c (GP11ModulePrivate): Add init_args field.
(gp11_module_initialize): Use init_args structure from private
structure since at least one PKCS#11 module (opensc) requires
that the init_args argument persists in memory.

svn path=/trunk/; revision=1327

15 years agoBuild fix for Solaris. Fixes bug #550943. Patch by Jeff Cai.
Stefan Walter [Sun, 7 Sep 2008 15:09:09 +0000 (15:09 +0000)]
Build fix for Solaris. Fixes bug #550943. Patch by Jeff Cai.

* gp11/gp11-slot.c: Build fix for Solaris.
Fixes bug #550943. Patch by Jeff Cai.

svn path=/trunk/; revision=1304

15 years agoComplete some more documentation.
Stefan Walter [Sun, 31 Aug 2008 20:16:23 +0000 (20:16 +0000)]
Complete some more documentation.

* gp11/gp11-misc.c:
* gp11/gp11-module.c: Complete some more documentation.

svn path=/trunk/; revision=1284

15 years agoUse a more easily translatable message for CKR_RANDOM_SEED_NOT_SUPPORTED.
Stefan Walter [Sun, 31 Aug 2008 18:17:36 +0000 (18:17 +0000)]
Use a more easily translatable message for CKR_RANDOM_SEED_NOT_SUPPORTED.

* gp11/gp11-misc.c: Use a more easily translatable message
for CKR_RANDOM_SEED_NOT_SUPPORTED.

svn path=/trunk/; revision=1281

15 years agoAdded start of documentation for the GP11 library.
Stefan Walter [Thu, 28 Aug 2008 03:13:42 +0000 (03:13 +0000)]
Added start of documentation for the GP11 library.

* gp11/Makefile.am:
* gp11/gp11-attributes.c:
* gp11/gp11.h:
* gp11/reference/*: (added) Added start of documentation for the
GP11 library.

svn path=/trunk/; revision=1280

15 years agoMissing file from previous commit
Stefan Walter [Thu, 28 Aug 2008 02:56:34 +0000 (02:56 +0000)]
Missing file from previous commit

svn path=/trunk/; revision=1277

15 years agoMake sure we use the UTC time when converting time from PKCS#11.
Stefan Walter [Thu, 28 Aug 2008 02:42:21 +0000 (02:42 +0000)]
Make sure we use the UTC time when converting time from PKCS#11.

* gp11/gp11-slot.c: Make sure we use the UTC time when
converting time from PKCS#11.

svn path=/trunk/; revision=1275

15 years agoFix build problem with string formats to g_set_error.
Stefan Walter [Sat, 23 Aug 2008 04:02:25 +0000 (04:02 +0000)]
Fix build problem with string formats to g_set_error.

* gp11/gp11-call.c: Fix build problem with string formats
to g_set_error.

svn path=/trunk/; revision=1261

15 years agoAdd license comments to top of files.
Stefan Walter [Sun, 17 Aug 2008 16:20:55 +0000 (16:20 +0000)]
Add license comments to top of files.

* gp11/gp11-attributes.c:
* gp11/gp11-call.c:
* gp11/gp11-misc.c:
* gp11/gp11-module.c:
* gp11/gp11-object.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/gp11.h: Add license comments to top of files.

svn path=/trunk/; revision=1249

15 years agogp11/gp11.h
Stefan Walter [Sun, 17 Aug 2008 16:09:52 +0000 (16:09 +0000)]
gp11/gp11.h

* gp11/gp11-attributes.c:
* gp11/gp11-misc.c:
* gp11/gp11-object.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/gp11.h
* gp11/tests/unit-test-gp11-object.c:
* gp11/tests/unit-test-gp11-slot.c:
* tool/gkr-tool-import.c: Use gulong for all CK_ULONG derived
types in PKCS#11. Fixes bug #547830

svn path=/trunk/; revision=1248

15 years agoAdd concept of invalid attributes. Don't throw error when some attributes
Stefan Walter [Sun, 3 Aug 2008 20:35:04 +0000 (20:35 +0000)]
Add concept of invalid attributes. Don't throw error when some attributes

* gp11/gp11-attribute.c:
* gp11/gp11-call.c:
* gp11/gp11-object.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/gp11.h: Add concept of invalid attributes. Don't throw error
when some attributes of a multi attribute retrieval are invalid.
Call async ready callbacks with right object.

* daemon/data/gnome-keyring.schemas.in: Add gconf schema for
noting the PKCS#11 objects for the current user.

svn path=/trunk/; revision=1216

15 years agoMore fine tuning of GP11 library. Add missing functions. Clarify date
Stefan Walter [Sun, 3 Aug 2008 17:03:01 +0000 (17:03 +0000)]
More fine tuning of GP11 library. Add missing functions. Clarify date

* gp11/gp11-attributes.c:
* gp11/gp11-object.c:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/gp11.h:
* gp11/tests/unit-test-gp11-attributes.c: More fine tuning of GP11
library. Add missing functions. Clarify date handling.

svn path=/trunk/; revision=1213

15 years agoFine tune GP11 library. Make attribute data be guchar, and install gnome
Stefan Walter [Sun, 3 Aug 2008 15:02:25 +0000 (15:02 +0000)]
Fine tune GP11 library. Make attribute data be guchar, and install gnome

* gp11/gp11-attributes.c:
* gp11/gp11.h:
* gp11/gp11.pc.in:
* pkcs11/Makefile.am: Fine tune GP11 library. Make attribute
data be guchar, and install gnome PKCS#11 header. Set proper
version on the library.

svn path=/trunk/; revision=1212

15 years agoFix text problems highlighted by Claude Paroz Fixes bug #545030.
Stefan Walter [Mon, 28 Jul 2008 03:50:18 +0000 (03:50 +0000)]
Fix text problems highlighted by Claude Paroz Fixes bug #545030.

* daemon/pk/gkr-pk-storage.c:
* daemon/ssh/gkr-ssh-storage.c:
* gp11/gp11-misc.c: Fix text problems highlighted by Claude
Paroz
Fixes bug #545030.

svn path=/trunk/; revision=1205

15 years agoBuild fixes. Fixes bug #544407
Stefan Walter [Fri, 25 Jul 2008 17:33:29 +0000 (17:33 +0000)]
Build fixes. Fixes bug #544407

* gp11/gp11-module.c: Build fixes. Fixes bug #544407

svn path=/trunk/; revision=1203

15 years agoAdd ability to gnome-keyring module to pass in the socket using the
Stefan Walter [Thu, 24 Jul 2008 17:30:50 +0000 (17:30 +0000)]
Add ability to gnome-keyring module to pass in the socket using the

* gp11/gp11.h:
* gp11/gp11-module.c:
* gp11/tests/unit-test-gp11-module.c:
* gp11/tests/unit-test-gp11-object.c:
* gp11/tests/unit-test-gp11-session.c:
* gp11/tests/unit-test-gp11-slot.c:
* pkcs11/gkr-pkcs11-module.c:
* pkcs11/Makefile.am:
* pkcs11/tests/Makefile.am:
* pkcs11/tests/unit-test-pkcs11-initialize.c:
* configure.in: Add ability to gnome-keyring module to pass in the
socket using the reserved argument. This is similar to how NSS
libsoftkn3 likes to be initialized.

svn path=/trunk/; revision=1200

16 years agoBuild fix
Stefan Walter [Thu, 24 Jul 2008 04:12:39 +0000 (04:12 +0000)]
Build fix

* gp11/gp11-attributes.c: Build fix

svn path=/trunk/; revision=1199

16 years agoRelease 2.23.5
Stefan Walter [Mon, 21 Jul 2008 22:24:57 +0000 (22:24 +0000)]
Release 2.23.5

* gp11/Makefile.am:
* configure.in:
* NEWS: Release 2.23.5

svn path=/trunk/; revision=1192

16 years agoAuto login of sessions when and where necessary.
Stefan Walter [Sun, 20 Jul 2008 02:56:06 +0000 (02:56 +0000)]
Auto login of sessions when and where necessary.

* gp11/gp11.h:
* gp11/gp11-call.c:
* gp11/gp11-marshal.list:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/Makefile.am:
* gp11/tests/gp11-test-module.c:
* gp11/tests/unit-test-gp11-session.c: Auto login of sessions when
and where necessary.

svn path=/trunk/; revision=1185

16 years agoMissing file from last commit.
Stefan Walter [Sat, 19 Jul 2008 21:54:02 +0000 (21:54 +0000)]
Missing file from last commit.

svn path=/trunk/; revision=1184

16 years agogp11/gp11.h
Stefan Walter [Sat, 19 Jul 2008 21:53:39 +0000 (21:53 +0000)]
gp11/gp11.h

* gp11/gp11.h
* gp11/gp11.pc.in:
* gp11/gp11-call.c:
* gp11/gp11-private.h:
* gp11/gp11-session.c:
* gp11/gp11-slot.c:
* gp11/Makefile.am:
* gp11/tests/unit-test-gp11-session.c: Add ability to reuse sessions,
in a simple pool.

svn path=/trunk/; revision=1183

16 years agoMove to glib based testing for new stuff
Stefan Walter [Mon, 14 Jul 2008 23:32:02 +0000 (23:32 +0000)]
Move to glib based testing for new stuff

* gp11/tests/gp11-test.h:
* gp11/tests/gp11-test-module.c:
* gp11/tests/Makefile.am:
* gp11/tests/unit-test-gp11-attributes.c:
* gp11/tests/unit-test-gp11-module.c:
* gp11/tests/unit-test-gp11-object.c:
* gp11/tests/unit-test-gp11-session.c:
* gp11/tests/unit-test-gp11-slot.c:
* tests/gtest.make: (moved from check.make)
* tests/gtest-helpers.c: (moved from check-helpers.c)
* tests/gtest-helpers.h: (moved from check-helpers.h)
* tests/Makefile.am:
* tests/prep-gtest.sh: (moved from prep-check.sh)
* configure.in: Move to glib based testing for new stuff

svn path=/trunk/; revision=1178