PowerVault ME4のWebコンソールに自己署名証明書を導入

 うちのデルPowerVault ME4シリーズへのWebコンソールアクセスでHTTPS接続を自己証明書でできるようにしましたが、他のと違ってたいへんでした。
 もとのマニュアルはこちらになります。もう少し詳しく説明した文章はこちら。一見、証明書ファイルをcert-fileという名前で、秘密鍵ファイルをcert-key-fileという名前でFTPかSFTPでアップロードすればできるとのことですが、ここにいろんな制約がありました。
 まずはRSAで作成した証明書と秘密鍵じゃないと受け付けてくれません。うちの環境では楕円曲線をデフォルトにしているので、このときと同じく他のマシンのeasy-rsaで作成した証明書と秘密鍵では以下のようにFTPでアップロードしてエラーとなります。

ftp> put sas1.crt cert-file
200 PORT command successful
150 Connecting to port 55317
226-File Transfer Complete. Starting Operation: (2022-03-25 13:25:45)
STATUS: Loading security certificate file
226-
226 Operation Complete. (2022-03-25 13:25:51)
ftp: 2908 バイトが送信されました 0.01秒 581.60KB/秒。

 とまずはCRTファイルのアップロードは問題ないのですが、

ftp> put sas1.key cert-key-file
200 PORT command successful
150 Connecting to port 55320
226-File Transfer Complete. Starting Operation: (2022-03-25 13:26:09)
STATUS: Loading security certificate file
Verifying uploaded certificate and key.
Error: The uploaded SSL certificate file does not match the uploaded key.

An error occurred. The uploaded SSL certificate and key have not been installed.
226-
226 Operation Complete. (2022-03-25 13:26:18)
ftp: 452 バイトが送信されました 0.00秒 226.00KB/秒。

 と秘密鍵のアップロード完了時の検査でエラーとなります。
 うちのeasy-rsaでは楕円曲線とする設定としていますので、以下のように手動でRSA秘密鍵CSRファイルを作成しました。

$ openssl req -newkey rsa:2048 -keyout sas1-cer.key -out sas1.csr
Generating a RSA private key
...................................................+++++
.............................................................................................+++++
writing new private key to 'sas1-cer.key'
Enter PEM pass phrase: パスフレーズを入力
Verifying - Enter PEM pass phrase: パスフレーズを入力
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:TODOHFUKEN
Locality Name (eg, city) :MACHI
Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company Name
Organizational Unit Name (eg, section)
:My Domain
Common Name (e.g. server FQDN or YOUR name) :sas1
Email Address
:mail@mydomain.local

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password :
An optional company name
:

 この作成されたCSRファイルはうちのルートCAで他のと同じように署名します。これは楕円曲線を用いて署名しても大丈夫でした。
 そしてさらに、秘密鍵ファイルにはパスフレーズが含まれているとダメなようです。
 こちらの投稿からこちらのページを参考に以下のように秘密鍵ファイルを再出力します。

$ openssl rsa -in sas1-cer.key -out sas1.key
Enter pass phrase for sas1-cer.key:上記パスフレーズを入力
writing RSA key

 これで署名済み証明書のCRTファイルと、パスフレーズを削除した秘密鍵ファイルが完成し、ようやくME4にファイルをアップロードします。

ftp> put sas1.crt cert-file
200 PORT command successful
150 Connecting to port 53856
226-File Transfer Complete. Starting Operation: (2022-03-25 14:57:26)
STATUS: Loading security certificate file
226-
226 Operation Complete. (2022-03-25 14:57:32)
ftp: 4178 バイトが送信されました 0.00秒 4178000.00KB/秒。
ftp> put sas1.key cert-key-file
200 PORT command successful
150 Connecting to port 56809
226-File Transfer Complete. Starting Operation: (2022-03-25 14:58:10)
STATUS: Loading security certificate file
Verifying uploaded certificate and key.
ERROR: cert verify FAILED.
       <C = JP, ST = TODOHFUKEN, L = MACHI, O = My Company Name, OU = My Domain, CN = sas1, emailAddress = mail@mydomain.local
error 20 at 0 depth lookup: unable to get local issuer certificate
error /mnt/ramdisk/apphome/cert-file.pending: verification failed>
Warning: The uploaded SSL certificate did not pass openssl validation.

The uploaded SSL certificate and key have been installed. Reboot the controller to apply.
226-
226 Operation Complete. (2022-03-25 14:58:17)
ftp: 1679 バイトが送信されました 0.01秒 111.93KB/秒。

 今回もエラーが出たのですが、警告止まりで証明書の適用は完了しました。エラーはファイルのエントリーの細部に違いがあったからかもしれません。
 最後に管理コンソールを再起動してHTTPSでの接続に問題ないことを確認して完了です。TLSv1.3での接続となっていました。