NetworkManager/libnm-util
Dan Williams 8c35e96b60 libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups
To be backwards compatible clients need to handle both paths to private
keys and the decrypted private key data, which is what used to get passed
in the private-key and phase2-private-key attributes of the 802.1x setting.
When moving a connection around between system-settings and user-settings,
if the private key is decrypted data, the settings service needs to store
that decrypted data somewhere so that the key can be sent to NM during
the connection process.

But we don't want to store the decrypted private key data, so we have to
re-encrypt it (possibly generating a private key password if one wasn't
sent with the decrypted data) and save it to disk, then send NM a path
to that private key during connection.

To help clients do this, and so that they don't have to carry around
multiple crypto implementations depending on whether they want to use
NSS or gnutls/gcrypt, add a helper to libnm-util.

Furthermore, I misunderstood a bunch of stuff with crypto padding when
writing the encrypt/decrypt functions long ago, so fix that up.  Don't
return padding as part of the decrypted data, and make sure to verify
the padding's expected lengths and values when decrypting.  Many thanks
to Nalin Dahyabhai for pointing me in the right direction.
2009-09-15 16:01:50 -07:00
..
tests libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00
COPYING doc: fix FSF address (bgo #575625) 2009-09-10 21:03:30 -04:00
crypto.c libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00
crypto.h libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00
crypto_gnutls.c libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00
crypto_nss.c libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00
libnm-util.pc.in Patch from Timo Hoenig: fix library name for libnm-util 2006-01-09 15:05:19 +00:00
libnm-util.ver libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00
Makefile.am olpc: add mesh device logic and config setting 2009-08-05 16:34:02 -04:00
nm-connection.c doc: fixes 2009-08-30 23:31:07 -05:00
nm-connection.h Documentation updates 2008-11-24 04:30:36 +00:00
nm-param-spec-specialized.c 2008-10-01 Dan Williams <dcbw@redhat.com> 2008-10-01 21:38:23 +00:00
nm-param-spec-specialized.h Rename private nm_* functions to _nm_* 2008-08-26 09:34:31 +00:00
nm-setting-8021x.c libnm-util: allow certificate/key paths 2009-09-04 09:07:00 -05:00
nm-setting-8021x.h libnm-util: allow certificate/key paths 2009-09-04 09:07:00 -05:00
nm-setting-bluetooth.c bluetooth: DUN + no CDMA/GSM means invalid connection, really it does 2009-05-21 17:51:11 -04:00
nm-setting-bluetooth.h bluetooth: fix confusion about NAP and PAN 2009-05-14 13:00:22 -04:00
nm-setting-cdma.c docs: clarify UUID property, document NMSettingCdma 2009-07-12 10:27:10 -04:00
nm-setting-cdma.h 2008-10-26 Dan Williams <dcbw@redhat.com> 2008-10-26 17:21:01 +00:00
nm-setting-connection.c doc: fixes 2009-08-30 23:31:07 -05:00
nm-setting-connection.h Documentation updates 2008-11-24 04:30:36 +00:00
nm-setting-gsm.c gsm: fix GSM network mode max value 2009-07-10 07:58:55 -04:00
nm-setting-gsm.h 2008-10-26 Dan Williams <dcbw@redhat.com> 2008-10-26 17:23:37 +00:00
nm-setting-ip4-config.c Implement sending current host name to DHCP server. 2009-03-20 14:44:49 +02:00
nm-setting-ip4-config.h Implement sending current host name to DHCP server. 2009-03-20 14:44:49 +02:00
nm-setting-ip6-config.c libnm-util: fix verifying METHOD_IGNORE in NMSettingIP6Config 2009-08-12 10:33:21 -04:00
nm-setting-ip6-config.h Install and fix up libnm-util IPv6 config stuff 2009-07-29 21:34:19 -04:00
nm-setting-olpc-mesh.c libnm-util: OLPC mesh setting fixes 2009-08-30 23:58:23 -05:00
nm-setting-olpc-mesh.h olpc: add mesh device logic and config setting 2009-08-05 16:34:02 -04:00
nm-setting-ppp.c libnm-util: flag properties with G_PARAM_CONSTRUCT so default values get set 2009-02-01 20:18:21 -05:00
nm-setting-ppp.h 2008-10-27 Dan Williams <dcbw@redhat.com> 2008-10-27 17:39:59 +00:00
nm-setting-pppoe.c 2008-10-27 Dan Williams <dcbw@redhat.com> 2008-10-27 17:36:18 +00:00
nm-setting-pppoe.h 2008-10-26 Dan Williams <dcbw@redhat.com> 2008-10-26 17:08:58 +00:00
nm-setting-serial.c 2008-10-27 Dan Williams <dcbw@redhat.com> 2008-10-27 17:36:18 +00:00
nm-setting-serial.h 2008-10-26 Dan Williams <dcbw@redhat.com> 2008-10-26 16:54:17 +00:00
nm-setting-template.c 2008-10-27 Dan Williams <dcbw@redhat.com> 2008-10-27 17:36:18 +00:00
nm-setting-template.h 2008-07-27 Dan Williams <dcbw@redhat.com> 2008-07-27 20:03:46 +00:00
nm-setting-vpn.c 2008-11-20 Dan Williams <dcbw@redhat.com> 2008-11-20 15:44:57 +00:00
nm-setting-vpn.h 2008-10-29 Tambet Ingo <tambet@gmail.com> 2008-10-29 09:13:40 +00:00
nm-setting-wired.c libnm-util: flag properties with G_PARAM_CONSTRUCT so default values get set 2009-02-01 20:18:21 -05:00
nm-setting-wired.h 2008-10-26 Dan Williams <dcbw@redhat.com> 2008-10-26 17:02:05 +00:00
nm-setting-wireless-security.c wifi: handle WEP & WPA passphrases (bgo #513820) (rh #441070) 2009-05-09 23:09:42 -04:00
nm-setting-wireless-security.h wifi: handle WEP & WPA passphrases (bgo #513820) (rh #441070) 2009-05-09 23:09:42 -04:00
nm-setting-wireless.c libnm-util: ignore Privacy for APs broadcasting WPA & RSN IEs (rh #445369) 2009-02-06 17:32:56 -05:00
nm-setting-wireless.h 2008-10-28 Dan Williams <dcbw@redhat.com> 2008-10-28 19:26:00 +00:00
nm-setting.c libnm-util:keyfile: typo fixes 2009-06-03 09:27:44 -04:00
nm-setting.h clean up glib includes (bgo #564376) 2009-01-19 00:16:40 -05:00
nm-utils-private.h 2008-11-20 Dan Williams <dcbw@redhat.com> 2008-11-20 20:22:14 +00:00
nm-utils.c libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00
nm-utils.h libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups 2009-09-15 16:01:50 -07:00