Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1158748

Summary: [TAHI][IKEv2] IKEv2.EN.I.1.1.10.1: libreswan could not handle CERTREQ payload
Product: Red Hat Enterprise Linux 7 Reporter: Hangbin Liu <haliu>
Component: libreswanAssignee: Paul Wouters <pwouters>
Status: CLOSED WONTFIX QA Contact: Hangbin Liu <haliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: amarecek, haliu
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-28 17:55:59 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:
Attachments:
Description Flags
pluto.log none

Description Hangbin Liu 2014-10-30 05:58:55 UTC
Created attachment 951970 [details]
pluto.log

Description of problem:
[TAHI][IKEv2] IKEv2.EN.I.1.1.10.1: libreswan could not handle CERTREQ payload

Version-Release number of selected component (if applicable):
libreswan-3.10-2.el7

How reproducible:


Steps to Reproduce:
   NUT                  TN1
(End-Node)           (End-Node)
    |                    |
    |------------------->| IKE_SA_INIT request (HDR, SAr1, KEi, Ni)
    |                    | (Judgement #1)
    |<-------------------| IKE_SA_INIT Response (HDR, SAr1, KEr, Nr, CERTREQ)
    |                    | (Packet #1)
    |                    |
    |------------------->| IKE_AUTH request (HDR, SK {IDi, CERT, AUTH, N, SAi2, TSi, TSr})
    |                    | (Judgement #2)
    |                    |
    V                    V


# certutil -L -d /etc/ipsec.d
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI

clientKey.crt                                                u,u,u
serverKey.crt                                                u,u,u
# cat /etc/ipsec.secrets
: RSA "clientKey.crt"
# cat /etc/ipsec.conf
config setup
        protostack=netkey
        plutodebug="all crypt"
        plutostderrlog="/tmp/pluto.log"
conn ikev2
        left=2001:0db8:0001:0001::1234
        right=2001:0db8:000f:0001::1
        leftid=2001:0db8:0001:0001::1234
        rightid=2001:0db8:000f:0001::1
        leftrsasigkey=%cert
        leftcert=clientKey.crt
        rightrsasigkey=%cert
        rightcert=serverKey.crt
        type=transport
        ikev2=insist
        ike=3des-sha1;modp1024
        phase2=esp
        phase2alg=3des-sha1
        narrowing=no
        auto=start
        connaddrfamily=ipv6
        authby=secret


Actual results:
Could not get IKE_AUTH request

Expected results:
Should get IKE_AUTH request with with a CERT payload

Additional info:
http://10.66.13.78/IKEv2/IKEv2_USGv6_59-67_NS_fail/
http://10.66.13.78/IKEv2/IKEv2_USGv6_59-67_NS_fail/1-EN-I/IKEv2-EN-I-1-1-10-1-A.html
http://10.66.13.78/IKEv2/IKEv2_USGv6_59-67_NS_fail/59.html

FYI: test IKEv2.EN.I.1.1.10.1 was marked as N/S in USGv6 IKEv2 conformance testing, so this bug is not in a hurry.

Comment 1 Paul Wouters 2014-12-01 22:11:59 UTC
What is intended to be established? An RSA authenticated connection or a PSK authenticated connection? CERTREQ is only relevant for RSA.

You have configured: authby=secret which means the connection is attempting to use PSK for both endpoints. But your ipsec.secrets has no PSK in it, so the connection will fail to establish. libreswan initiates for PSK, fails to find it, and logs this error:

| *****emit IKEv2 Authentication Payload:
|    next payload type: ISAKMP_NEXT_v2SA
|    critical bit: none
|    auth method: IKEv2_AUTH_SHARED
| started looking for secret for 2001:db8:1:1::1234->2001:db8:f:1::1 of kind PPK_PSK
| actually looking for secret for 2001:db8:1:1::1234->2001:db8:f:1::1 of kind PPK_PSK
| line 1: key type PPK_PSK(2001:db8:1:1::1234) to type PPK_RSA 
| concluding with best_match=0 best=(nil) (lineno=-1)
"ikev2" #1: No matching PSK found for connection:ikev2
"ikev2" #1: Failed to find our PreShared Key
| complete v2 state transition with STF_FATAL

This is all unrelated to CERTREQ

I think you meant to use authby=rsasig ?

Comment 5 RHEL Program Management 2015-01-28 17:55:59 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.