Bug 1144941

Summary: libreswan 3.10 upgrade breaks old ipsec.secrets configs
Product: [Fedora] Fedora Reporter: Oskari Saarenmaa <oskari>
Component: libreswanAssignee: Paul Wouters <pwouters>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: pwouters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreswan-3.12-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1145231 (view as bug list) Environment:
Last Closed: 2014-11-07 02:30:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1145231    

Description Oskari Saarenmaa 2014-09-22 05:51:35 UTC
libreswan-3.8 and before used to have this in README.nss:

"""
Add following to /etc/ipsec.secrets file:
: RSA "name of certificate in nss db" ""
"""

but libreswan 3.10 no longer accepts ipsec.secrets lines with a passphrase in them, breaking old configuration after an upgrade:

"""
Sep 22 08:46:51 oslt pluto[15307]: "/etc/ipsec.d/fs.secrets" line 1: RSA private key file -- unexpected token after friendly_name
[...]
Sep 22 08:46:52 oslt pluto[15307]: "FS" #1: I am sending my cert
Sep 22 08:46:52 oslt pluto[15307]: "FS" #1: I am sending a certificate request
Sep 22 08:46:52 oslt pluto[15307]: "FS" #1: unable to locate my private key for RSA Signature
"""

It's easy enough to fix this by editing the ipsec secrets file once it's clear what the problem is, but it took me a while to figure out that libreswan had been upgraded on my system and it had changed its secret-file format.

It would be nice if libreswan would accept the old type secret-lines and maybe just issue a warning about the ignored passphrase field.

Version-Release number of selected component (if applicable):
libreswan-3.10-3.fc20.x86_64

Comment 1 Oskari Saarenmaa 2014-09-22 15:30:12 UTC
Posted a pull request to libreswan github page to fix this:

https://github.com/libreswan/libreswan/pull/17

Comment 2 Paul Wouters 2014-10-24 01:33:22 UTC
This is fixed in 3.11-1. It will now say:

002 RSA private key file -- ignoring empty token after friendly_name -- this will be an error in a future release

Comment 3 Fedora Update System 2014-10-24 01:53:14 UTC
libreswan-3.11-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/libreswan-3.11-1.el6

Comment 4 Fedora Update System 2014-10-24 01:54:48 UTC
libreswan-3.11-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libreswan-3.11-1.fc21

Comment 5 Fedora Update System 2014-10-24 01:58:52 UTC
libreswan-3.11-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libreswan-3.11-1.fc20

Comment 6 Fedora Update System 2014-10-24 01:59:30 UTC
libreswan-3.11-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libreswan-3.11-1.fc19

Comment 7 Fedora Update System 2014-10-27 08:16:15 UTC
Package libreswan-3.11-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libreswan-3.11-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-13597/libreswan-3.11-1.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-11-07 02:30:28 UTC
libreswan-3.11-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-11-07 02:34:27 UTC
libreswan-3.11-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2014-11-07 06:12:03 UTC
libreswan-3.12-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/libreswan-3.12-1.el6

Comment 11 Fedora Update System 2014-11-10 06:35:22 UTC
libreswan-3.11-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2014-11-24 21:19:17 UTC
libreswan-3.12-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.