<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 20 Sep 2020 at 22:16, Paul Wouters <<a href="mailto:paul@nohats.ca">paul@nohats.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, 20 Sep 2020, Andrew Cagney wrote:<br>
<br>
> - if orient() tries to load a cert and fails, should the connection be tossed or left unoriented?<br>
<br>
It's too late than isn't it? The connection is already loaded before<br>
orient() can be called on it.<br>
<br>
> First, it looks like message generated by "ipsec whack --label 'SAwest-east leftrsasigkey' --keyid<br>
> "@west" --pubkeyrsa ..." should trigger an attempt to load the corresponding private key (but ignore<br>
> failure). Both of these:<br>
> <a href="https://testing.libreswan.org/v3.30-1714-gcab2172733-main/delete-sa-01/OUTPUT/west.console.txt" rel="noreferrer" target="_blank">https://testing.libreswan.org/v3.30-1714-gcab2172733-main/delete-sa-01/OUTPUT/west.console.txt</a><br>
> <a href="https://testing.libreswan.org/v3.30-1714-gcab2172733-main/ikev2-55-ipseckey-02/OUTPUT/east.console.diff" rel="noreferrer" target="_blank">https://testing.libreswan.org/v3.30-1714-gcab2172733-main/ikev2-55-ipseckey-02/OUTPUT/east.console.diff</a><br>
> were relying on *.secrets triggering an attempt to load the private key.<br></blockquote><div><br></div><div>I believe these are fixed.</div><div><br></div><div>A follow-up is to look at dropping how rsasigkey=... causes the key to be added to the cache (why not just bind it to its connection).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> and this leads to a potential refinement:<br>
> <br>
> - "add" triggers a lazy attempt at loading the private key - this already happens with certificates (it<br>
> warns when the private key is missing)<br></blockquote><div><br></div><div>I'm probably going to push this.</div><div>It also logs a message (but not to whack) when the private key gets loaded (vs found in the cache).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> - orient() can then check that the public / private key is available<br><br></blockquote><div>However this can be left until post 4.0.</div><div>I'm seeing tests where the preloaded private key gets deleted while the connection is up.  get_connection_private_key() then re-loads it.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Paul<br>
</blockquote></div></div>