Page 2 of 2

Re: SubjectAltNameWarning

Published: August 18, 2022 - 08:55
by olaplanche
Hello,

I do have the old certificate in /opt/wapt/waptserver/ssl/.

You need to move the existing key:

`mkdir /root/oldkey` OK
`mv /opt/wapt/waptserver/ssl/key.pem /root/oldkey/` OK
`mv /opt/wapt/waptserver/ssl/cert.pem /root/oldkey/` OK

Restart postconf:

`/opt OK

Save the new key:

`mkdir /root/new` `
OK `mv /opt/wapt/waptserver/ssl/key.pem /root/new/ OK
root/new/` OK

Replace the old certificate

: `mv /root/oldkey/key.pem /opt/wapt/waptserver/ssl/` OK
mv /root/oldkey/cert.pem /opt/wapt/waptserver/ssl/` OK `

systemctl restart nginx` OK

Now you can Retrieve the public key:

cat /root/new/cert.pem /opt/wapt/waptserver/ssl/cert.pem >
/root/srvwapt.mydomain.lan.crt OK

Retrieve the file /root/srvwapt.mydomain.lan.crt and place/replace
the one in C:\Program Files (x86)\wapt\ssl\server\srvwapt.mydomain.lan.crt OK

You can now generate a new agent (which will therefore contain the
new file srvwapt.mydomain.lan.crt) OK

When I run the command wapt-get update on the machine where I deployed the new agent, the SubjectAltNameWarning warning is still present.

Re: SubjectAltNameWarning

Published: August 18, 2022 - 09:03
by olaplanche
FYI: if I edit the new .crt file, I do indeed have the new and old certificates:

-----BEGIN CERTIFICATE-----
blablabla
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
blablablabla
-----END CERTIFICATE-----

Re: SubjectAltNameWarning

Published: August 18, 2022 - 10:44
by sfonteneau
Yes, so that's normal;

the end of the procedure is missing:


The following operations should only be performed if the new file
C:\Program Files (x86)\wapt\ssl\server\srvwapt.mydomain.lan.crt is indeed present
on all agents.


The following operations are performed:

mv /opt/wapt/waptserver/ssl/key.pem /root/oldkey/
mv /opt/wapt/waptserver/ssl/cert.pem /root/oldkey/

mv /root/new/key.pem /opt/wapt/waptserver/ssl/
mv /root/new/cert.pem /opt/wapt/waptserver/ssl/

systemctl restart nginx

The goal of this operation is for the WAPT agent to accept both the old and new
certificates!

When the old certificate is present on the server side, it generates a warning.

Re: SubjectAltNameWarning

Published: August 18, 2022 - 11:36
by olaplanche
Okay, I get it!

I wanted to test before deploying the new agent to all the machines and completing the final steps of the procedure. I messed up... I just put the new certificate back in the /opt/wapt/waptserver/ssl/ folder and restarted nginx while testing on my test machine (with the new agent). Everything is OK, no more SubjectAltNameWarning warnings. I've put the old certificate back; all that's left is to deploy the new agent to all the machines and put the new certificate back in. ;)

Thanks for your invaluable help.