Thanks Kess, looks good to me!
I did several tests this morning (snap certbot) with your OpenSSL.pm patch:
- Create, renew, revoke and restore works for all LE Certificates
- Installing purchased certificates works
- it survives an i-mscp reconfiguration (setup) no errors occurred
- even after the reconfiguration everything works as above (create, renew, revoke, restore incl. edit and save purchased certificates)
so everything should work!
Display MoreOK guys, it seems I found the way to renew certificates per cron job in the normal way.
Thank you to vege.net for you hint here LetsEncrypt - SSL certificate is not valid but unfortunately it's not complete.
The following little modifications, works for LE certificates and for paid certificates.
Edit file /var/www/imscp/engine/PerlLib/iMSCP/OpenSSL.pm and instead of modifying line 134 as stated in the previous post, just add the little code below.
Display MoreCode
- 132. my $cmd = [
- 133. 'openssl', 'verify',
- 134. ( ( $self->{'ca_bundle_container_path'} ne '' ) ? ( '-CAfile', $self->{'ca_bundle_container_path'} ) : () ),
- 135. '-purpose', 'sslserver', $self->{'certificate_container_path'}
- 136. ];
- 137.
- 138. my $rs = execute( $cmd, \ my $stdout, \ my $stderr );
- 139. debug( $stdout ) if $stdout;
- # BEGIN: Check certificates validity for Let's Encrypt certificates on renewal
- if ( $rs && ( $self->{'ca_bundle_container_path'} ne '' ) ) {
- $cmd = [
- 'openssl', 'verify',
- '-purpose', 'sslserver', $self->{'certificate_container_path'}
- ];
- $rs = execute( $cmd, \ $stdout, \ $stderr );
- debug( $stdout ) if $stdout;
- }
- # END: Check certificates validity for Let's Encrypt certificates on renewal
Please let me know if it works for you also,
bye Kess.