Executing the certctl rehash command after upgrading to 14.3 (amd64) returns a tr: Illegal byte sequence error.
Executing the certctl rehash command after upgrading to 14.3 (amd64) returns a tr: Illegal byte sequence error.
tr may fail if locale/llang is not set to "C"
Using awk(1)* instead of tr(1), should be more robust. It fully supports UTF-8 and, probably more important, it specifically matches the non-UNIX-like line ending by usingThis ensures that certificate files or bundles with DOS or Mac line
endings are recognized as such and handled identically to those with
Unix line endings.
\r$
. eolcvt()
{
cat "$@" | tr -s '\r' '\n'
}
eolcvt()
{
cat "$@" | awk '{ sub(/\r$/, ""); print }'
}
certctl.sh - 14.2-RELEASE does not implement the functionFortunately, the certctl script from 14.2 runs correctly on 14.3, so I have a workaround in the meantime
eolcvt
; it is not called in the do_scan
function. However, do_scan
in certctl.sh - 14.3-RELEASE does use eolcvt
.sed 's/\r$//'
should also work, although, AFAIK, sed(1) does not fully support UTF-8.I will see tonight but I have an "exotic" locale, yet it works under 14.3-RELEASE. I think there are one or more cert in the OP machine that cause the problem.Please post the result oflocale
One of the certs was the issue! For some reason it did not like the CA root cert for our AD servers in .crt format, but certctl rehash works with the same cert in .pem format.I will see tonight but I have an "exotic" locale, yet it works under 14.3-RELEASE. I think there are one or more cert in the OP machine that cause the problem.
Emrion are you seeing the Scanning .... output when running it on your 14.3 installs?
# certctl rehash