<div dir="ltr"><div>I found a fix:</div><div><br></div><div>In fnrancid (version 3724 2017-08-01 17:58:06Z), I had to change the regex a bit because on my system (Fortiweb, not Fortigate), the double quote is on another line.</div><div><br></div><div>I haven't been able to make it work with the new line (tried \n and \r\n) and it didn't work so I just removed the double quote in the regex.</div><div><br></div><div># if (/^\s*-----END (RSA|ENCRYPTED) PRIVATE KEY-----"/) {<br> if (/^\s*-----END (RSA|ENCRYPTED) PRIVATE KEY-----/) {</div><div><br></div><div>I'm not sure how future-proof this is but tips are welcome to make the regex work with this input:</div><div><br></div><div><br></div><div>OSnA0DuUpx2/FvoFbJM9jmx=<br>-----END ENCRYPTED PRIVATE KEY-----<br>"<br> unset passwd</div><div><br></div><div>Thanks,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 25, 2019 at 3:17 PM john heasley <<a href="mailto:heas@shrubbery.net">heas@shrubbery.net</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">Thu, Jul 25, 2019 at 02:52:42PM -0400, Ugo Bellavance:<br>
> Hi,<br>
> <br>
> I'm trying to get rancid to work with my Fortinet device. It seems to work<br>
> OK, except for the fact that it doesn't collect the whole config. It looks<br>
> like it's stuck in the removal of the private key. It stops like this:<br>
> <br>
> # set private-key "-----BEGIN ENCRYPTED PRIVATE KEY-----<br>
> # <removed><br>
> Connection to server.xxx.xxx closed.<br>
> <br>
> I checked the code for filter cycling RSA private keys, but I don't know<br>
> where would be the problem.<br>
> <br>
> Any help or suggestion would be appreciated.<br>
<br>
what version of rancid? show us example input. test that you can run the<br>
command with the login script and receive the full output.<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Ugo Bellavance (<a href="mailto:ugob@lubik.ca" target="_blank">ugob@lubik.ca</a>)<br></div>