Showing posts with label Certificate. Show all posts
Showing posts with label Certificate. Show all posts

Wednesday, 8 June 2016

renew Openvas 8 Certificates

This happens on a yearly basis and always left my scratching my head:

openvas-mkcert -q -f 'Refreshes the server certificate for a year
openvas-mkcert-client -n -i 'Refresahes the client certificate for a year
reboot

Thursday, 6 February 2014

Securing SQL Server connections with a certificate

I had an issue trying to get a SQL server to use a certificate to secure a connection with SSL.
The certificate was selected in SQL configuration manager but when the SQL service was restarted, it would fail with an EventID 26104 indicating it couldn't read find the certificate.

After a bit of googling, I found this:
http://nickstips.wordpress.com/2010/09/08/sql-ssl-and-sql-server-2008-service-doesnt-start-error-code-2146885628/

Turns out, if you run your SQL server under a non-privileged account as per best practice, the account can't read the private key of the certificate.

Altering the certificate permissions to allow your SQL server to read the certificate private key allows the SQL server to start.

Friday, 6 November 2009

How-To Prepare A Certificate With Subject Alternative Names Using Exchange Powershell


1. Use powershell from an Exchange 2007 box to generate a certificate request (all on one line and replace italics with your details):

New-ExchangeCertificate
-GenerateRequest:$true
-Path C:\NewCert.req
-DomainName fqdn1.domain.tld,fqdn1,fqdn2.domain.tld,fqdn2
-PrivateKeyExportable:$true
-FriendlyName "fqdn1.domain.tld"
-IncludeAcceptedDomains:$False
-Force:$true
-SubjectName "CN=fqdn1.domain.tld,OU=Department,O=Organisation,L=Location,S=County,C=GB"
2. Request a certificate from your AD certificate server, (http://yourcertserver/certsrv). This needs to be an advanced request, using the request file generated above, and for a web server. Download it to your local drive as C:\CertNew.cer.

3. Import the certificate into your Exchange server using:
Import-ExchangeCertificate C:\NewCert.req

4. On the Exchange server, use the MMC certificate snap-in, export the certificate. Export it with the private key to a PFX file. Make sure you target the computer certficate store when loading the MMC. Use a password to protect the exported certificate.

5. On the target server, load the certificate MMC, again targeting the computer store and import the pfx file.

6. Using the IIS console, switch your webserver to the new certificate.

7. You can delete the original certificate from your Exchange server if you wish.