Setting up a Self-Signed Certificate (2024)

Info>Pleasant Password Server>B. Server Configuration>2) Certificates>Setting up a Self-Signed CertificatePage last modified Jan 24 2024, 19:28

Share KeePass Passwords with your Team of multiple users

Certificates are are an integral part of security as they help to establish trusted connections.

By following these steps below,you can configure a trusted connection to your server usingSelf-Signed certificates.

  • PowerShell Commands

Background information: When hosting software, a valid certificate enables encrypted connections to browsers and other software clients.

  • We usually recommend using a purchased 3rd-party certificate from a Trusted Certificate Authority. However in some cases they are required (e.g. for use with Azure) or useful for testing / internal use.
  • You can follow these technical steps to create your own Self-Signed Certificate.

Other alternatives:

  • Purchase a 3rd-party certificate from a Trusted Certificate Authority
  • Create a certificate using IIS (requires IIS Hosting)
  • Use your internal Certificate Authority process.
  • Use a Certificate AuthoritylikeLet's Encrypt, which provides free certificates.
  • Azure now provides free certificates.

Related topic:

  • Trust Warning

How to Mitigate Certificate Warning Messages

When first connecting KeePass to a new server, you will receive a warning messagethat a valid certificate has not been set up yet.

Setting up a Self-Signed Certificate (1)

Overview Server Machine:

    1. Create a Self-Signed Certificate and Certificate Authority (CA)
    2. Export the CA and Self-Signed Certificate
    3. Import the Self-Signed Certificate
    4. Restart Pleasant Password Service

OverviewClient Machine:

    1. Export the Trusted Root CA
    2. Import the Trusted Root CA on the client machines

Create a Self-Signed Certificate and Certificate Authority(CA)

If installing on Windows Server 2012 R2, then use analternate methodto create theself-signed certificate.

The following PowerShell commands and instructions will create a Root Certificate and a Self-Signed Certificate, valid for 10 years, and 350 days respectively and will place them in the Certificate Store on the local machine.

Run the Command Prompt by typing "cmd" in the Windows search bar and right click and choose "Run as administrator."

Setting up a Self-Signed Certificate (2)

PowerShell Commands to Create Certificates

Enter PowerShell:

  • Type "powershell" in the command prompt window (oropen the PowerShell ISE)

Setting up a Self-Signed Certificate (3)

Step 1.Create a Certificate Authority (CA) by running the following command (or copy paste the following script and hit enter).

  • Firstreplace the generic name "MyRootCA" to a name of your choice:
$rootCA = New-SelfSignedCertificate -Subject "CN=MyRootCA,O=My Company, Inc,OU=https://MyWebsite.com" `
-CertStoreLocation "cert:\LocalMachine\My" `
-KeyExportPolicy Exportable `
-KeyUsage CertSign,CRLSign,DigitalSignature `
-KeyLength 4096 `
-KeyUsageProperty All `
-KeyAlgorithm 'RSA' `
-HashAlgorithm 'SHA256' `
-Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" `
-NotAfter (Get-Date).AddYears(10)

Step 2. Now create a Self-Signed Certificate for your site, by running this command. The name should include the same address that your users will use to connect.

  • First replace "MyPPassSite.org" (mentioned twice) with the site name, a URL that users will use site:
    • e.g. "CN=ppass.domain.org", OR,
    • e.g. "CN=*.domain.org"
$siteCert = New-SelfSignedCertificate -Subject "CN=MyPPassSite.org" `
-Signer $rootCA `
-KeyLength 2048 `
-CertStoreLocation "cert:\LocalMachine\My" `
-KeyExportPolicy Exportable `
-KeyUsage DigitalSignature,KeyEncipherment `
-DnsName MyPPassSite.org `
-KeyAlgorithm 'RSA' `
-HashAlgorithm 'SHA256' `
-Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" `
-NotAfter (Get-Date).AddDays(350)

Now we we can print out the certificate detailsby just entering the file name and hitting enter. This will help us in a future step:

  • $siteCert

Save the Thumbprint value forafuture step.

Setting up a Self-Signed Certificate (4)

Step 3.Export the Certificate Authority certificate.

Now the both certificates can now be found in the Certificate Store, with the Root certificatein the Trusted Roots folder, and the site Certificate found under Personal certificates.

Run the following commands to export the certificates to the current folder:

# Export Root Certificate to .pfx and .cer files$CertPassword = ConvertTo-SecureString -String "YourPassword" -Force –AsPlainTextExport-PfxCertificate -Cert $rootCA -FilePath ".\MyRootCA.pfx" -Password $CertPasswordExport-Certificate -Cert $rootCA -FilePath ".\MyRootCA.cer"
# Export Site Certificate to .pfx and .cer files$siteCertPwd = ConvertTo-SecureString -String "YourPassword" -Force -AsPlainTextExport-PfxCertificate -Cert $siteCert -FilePath ".\SiteCert.pfx" -Password $siteCertPwdExport-Certificate -Cert $siteCert -FilePath ".\SiteCert.cer"

The .pfx files contain private keys and should be kept in secure locations.
The root .cer certifcate can be distributed to other machines in your network.

Step 4.Now that the certificates are in the store, we canalso ensure that the Root certificate is placed in the the Trusted Root folder. Fun these import commands on the server machine(s) to trust the certificate:

Import-Certificate -CertStoreLocation cert:\LocalMachine\AuthRoot -FilePath ".\MyRootCA.cer"

Step 5.Now the following commands will configurePassword Server to use this newcertificate.

  • Note:if you are using IIS, you will also need to import the certificate into IIS for the site.

Use the sections below for information on: exporting, importing with Service Config, ordistributing to other machines.

  • First, replace these values:
    • "MyPPassSite.org", replace with your certificate name (CN name)
    • "63DF81FF0024F...", replace withtheresulting Thumbprint value(step 2)
  • Run the commands
  • Restart the service/site.
Set-ItemProperty "HKLM:\Software\Pleasant Solutions\PasswordManager" -Name CertificateName -Value "MyPPassSite.org"
Set-ItemProperty "HKLM:\Software\Pleasant Solutions\PasswordManager" -Name ThumbPrint -Value "63DF81FF0024F999D2A5B077F6152480E6C31F0"

Step 6. Now we can distribute the public Root certificate (.cer) to the machines that will connect to this site.

There are multiple methods of adding this Root Certificate to the Trusted Root folder in the certificate store.

A) The easiest and most common way to distribute certificates across all machines in an Active Directory envrionment, is by using Group Policy:

B) Run the import commands on the machine(s):

Import-Certificate -CertStoreLocation cert:\LocalMachine\AuthRoot -FilePath ".\MyRootCA.cer"

Export the CA and Self-Signed Certificate

To manually export certificates, run the certificate manager as administrator by entering certlm.msc in the windows search bar and choosing "Run as administrator."

Setting up a Self-Signed Certificate (5)

Expand both the "Personal" and "Trusted Root Certification" directories. In the Personal Certificates folder, you will find both the CA and the Self-Signed Certificate that we created in the previous steps.

Drag and drop the CA file "MyRootCA" from the "Personal Certificates" directory into the Trusted Root Certification Certificate directory.

Setting up a Self-Signed Certificate (6)

Next we will right-click the Self-Signed Certificate file "mycert" and choose All Tasks > Export

Setting up a Self-Signed Certificate (7)

Click Next then select "Yes, export the private key". This key should be stored securely.

    • Select "Personal Information Exchange - PKCS #12 (.PFX)
      • Ensure both "Include all certificates in the certification path if possible" and
      • "Enable certificate privacy" are both checked before clicking Next once again.

    You can also export again without the private key to a .cer file, which file can be distributed to other machines.

    Setting up a Self-Signed Certificate (8)

    Then enter a password to protect your certificate and set the encryption to AES256-SHA256 and click next.

    Setting up a Self-Signed Certificate (9)

    Then give the exported certificate a meaningful name. ClickNext.

    Then we will be at the final review page and clickFinish.

    Setting up a Self-Signed Certificate (10)

    Import the Self-Signed Certificate

    Next we will run the Pleasant Password Server Service Configuration utility by typing "Service" in the windows search bar.

    Setting up a Self-Signed Certificate (11)

    Once the Service Configuration utility opens click the "Certificate Configuration" button, then click "Import Certificate." You will be able to find the recently created self-signed certificate that we just exported in theC:\Windows\System32 directory then select the file.

    Restart Pleasant Password Service

    In the windows search bar type "Services" to run the windows services utility. Find the Pleasant Password Server service and click Restart.

    Setting up a Self-Signed Certificate (12)

    Congratulations! You now have a trusted certificate!

    Export the Trusted Root CA

    Return back to the Certificate store and export the Trusted Root CA we created earlier and moved to the "Trusted Root Certification" Certificate directory

    Setting up a Self-Signed Certificate (13)

    ClickNextthen select "No, do not export the private key"

      • Select "Base-64 encoded X.509 (CER)" and click Next

      Setting up a Self-Signed Certificate (14)

      Give the exported file a name (could give it the same name to keep it simple) click Next and then review the details and click Finish.

      Setting up a Self-Signed Certificate (15)

      Import the Trusted Root CA into Client Machines

      This step will need to be repeated on every client machine that connects to the server.

      You will be able to find the recently createdTrusted Root CA file that we just exported in theC:\Windows\System32 directory then select the file.

      Copy the file we just exported to the client machine. Then Right click the certificate file and select "Install Certificate"

      Setting up a Self-Signed Certificate (16)

      Then run choose Local machine

      Setting up a Self-Signed Certificate (17)

      Select the "Place all certificates in the following store" radio button and click Browse...

      And select the "Trusted Root Certification Authorities" and click next.

      Setting up a Self-Signed Certificate (18)

      Review the action and clickFinish.

      Congratulations! Now your client machine will trust your self signed certificate!

      Installing on Windows 7 Client Machine

      The only major difference with Windows 7 is how we access the certificate store.

      Click Start -> Run -> Enter 'MMC' and click 'OK'

      Setting up a Self-Signed Certificate (19)

      Click File > Add/Remove Snap-In

      Setting up a Self-Signed Certificate (20)

      Locate "Certificates" on the left and click "Add"

      Setting up a Self-Signed Certificate (21)

      Select "Computer Account"radio button and click next.

      Setting up a Self-Signed Certificate (22)

      Ensure the "Local Computer" radio button is selected and click Finish

      Setting up a Self-Signed Certificate (23)

      Then select Ok which will open the Console1 window. Right Click the "Trusted Root Certification Authorities" and choose All Tasks > Import.

      Setting up a Self-Signed Certificate (24)

      From here the instructions are the same as for Windows 10.

      Problems?

        • Double-CheckService startup

        • If Hosting with IIS, remember to stop and disable the service.
        • Contact Supportwith your specific configuration and a description of the problem you are having.

        Setting up a Self-Signed Certificate (2024)

        FAQs

        How do I create a self-signed certificate? ›

        Generation of a self-signed SSL certificate involves a simple 3-step procedure:
        1. STEP 1: Create the server private key. openssl genrsa -out cert.key 2048.
        2. STEP 2: Create the certificate signing request (CSR) openssl req -new -key cert.key -out cert.csr.
        3. STEP 3: Sign the certificate using the private key and CSR.

        How do I add a self-signed certificate in Windows 10? ›

        Certificate installation
        1. Open the Microsoft Management Console (Start > MMC);
        2. Provide the self-signed certificate: Choose File > Add/Remove Snap-in; in the standalone tab, choose Add; choose the Certificates snap-in > Add; in the wizard, choose the Computer Account > Local Computer; press Finish to end the wizard;

        Is self-signed certificate legal? ›

        By design self signed certificates – whether they're for TLS/SSL, S/MIME, document signing or code signing – can have any validity period because they are not subject to any regulation. They will however still need to be renewed and redeployed before they expire.

        What are the disadvantages of a self-signed certificate? ›

        Since self-signed certificates aren't issued by a trusted CA, they will trigger security warnings in web browsers, potentially causing trust issues for users.

        Can I create my own digital signature certificate? ›

        Create a digital certificate to digitally sign a document immediately. If you do not want to purchase a digital certificate from a third-party certificate authority (CA), or if you want to digitally sign your document immediately, you can create your own digital certificate.

        How do I authorize a self-signed certificate? ›

        1. Prerequisites.
        2. Create a root CA certificate.
        3. Create a server certificate.
        4. Configure the certificate in your web server's TLS settings.
        5. Access the server to verify the configuration.
        6. Verify the configuration with OpenSSL.
        7. Upload the root certificate to Application Gateway's HTTP Settings.
        8. Next steps.
        Jan 17, 2024

        How do I know if a certificate is self-signed Windows? ›

        Check the “Issued by” section or the issuer.

        If both of these aspects are the same, this certificate is self-signed.

        How do you bind a self-signed certificate? ›

        Using the certificate
        1. Open IIS.
        2. Go to the website you want to add the certificate to.
        3. Click on Bindings…
        4. Tick the box which says 'Require Server Name Identification (SNI)
        5. The in the SSL certificate dropdown you can choose the certificate you created.
        6. After that, click on OK and you should be all set.

        How to create self-signed certificate using CMD? ›

        The New-SelfSignedCertificate cmdlet creates a self-signed certificate for testing purposes. Using the CloneCert parameter, a test certificate can be created based on an existing certificate with all settings copied from the original certificate except for the public key.

        When should you avoid using self signing certificates? ›

        Using self-signed certificates for your external-facing sites can be detrimental for your business as your clients become reluctant to share their credentials on your website, harming your brand reputation and customer trust.

        Why are self-signed certificates not trusted? ›

        Self-signed certificates aren't trusted by browsers because they are generated by your server, not by a CA. You can tell if a certificate is self-signed if a CA is not listed in the issuer field in our SSL Certificate tester.

        What is the point of a self-signed certificate? ›

        The main advantage of a self-signed SSL certificate is that they are available at no cost and can be requested easily by any developer. They are able to quickly be implemented on your own timetable and are often used in internal testing environments or web servers that are otherwise locked down to external users.

        How do I make a self-signed certificate valid? ›

        Adding a self-signed certificate to the Server application
        1. Create a new file via a text editor and save it as cert. pem. ...
        2. Open the cert. pem file and add the contents of files created in step 1 to the cert. ...
        3. Stop the server application. ...
        4. Move the cert. ...
        5. Start the server application.
        Feb 29, 2024

        What is the alternative to self-signed certificates? ›

        Safer Alternatives to Self-Signed Certificates

        The safer choice, especially for public-facing services, is to use certificates from trusted CAs like SSL.com.

        Are self-signed certificates a vulnerability? ›

        Vulnerabilities in SSL Certificate is a Self Signed is a Medium risk vulnerability that is one of the most frequently found on networks around the world. This issue has been around since at least 1990 but has proven either difficult to detect, difficult to resolve or prone to being overlooked entirely.

        Does Microsoft Word have a certificate template? ›

        Using Microsoft Word templates is one of the quickest ways to create certificates for most occasions. It is free, customizable, and offers a considerable number of pre-made templates.

        How do I create a self-signed certificate for a PDF? ›

        Right-click the signature field, and select Sign Document or Certify with Visible Signature. Note: You can also create an appearance using the Signature preferences: Hamburger menu > Preferences > Signatures (Windows) or Acrobat > Preferences > Signatures (macOS).

        What is a self-signed certificate? ›

        In cryptography and computer security, self-signed certificates are public key certificates that are not issued by a certificate authority (CA). These self-signed certificates are easy to make and do not cost money. However, they do not provide any trust value.

        Top Articles
        CRN Information
        Najlepsze karty graficzne do kopania kryptowalut (2024) [Crypto 101] | CrypS.
        Pet For Sale Craigslist
        Devon Lannigan Obituary
        Regal Amc Near Me
        Nfr Daysheet
        Top 10: Die besten italienischen Restaurants in Wien - Falstaff
        The Potter Enterprise from Coudersport, Pennsylvania
        5 Bijwerkingen van zwemmen in een zwembad met te veel chloor - Bereik uw gezondheidsdoelen met praktische hulpmiddelen voor eten en fitness, deskundige bronnen en een betrokken gemeenschap.
        Gw2 Legendary Amulet
        Comenity Credit Card Guide 2024: Things To Know And Alternatives
        DIN 41612 - FCI - PDF Catalogs | Technical Documentation
        Https //Advanceautoparts.4Myrebate.com
        Connexus Outage Map
        Overton Funeral Home Waterloo Iowa
        Money blog: Domino's withdraws popular dips; 'we got our dream £30k kitchen for £1,000'
        Byte Delta Dental
        Nashville Predators Wiki
        Procore Championship 2024 - PGA TOUR Golf Leaderboard | ESPN
        Craigslist Free Stuff Greensboro Nc
        Palm Coast Permits Online
        Why Is 365 Market Troy Mi On My Bank Statement
        China’s UberEats - Meituan Dianping, Abandons Bike Sharing And Ride Hailing - Digital Crew
        Rural King Credit Card Minimum Credit Score
        Viha Email Login
        Team C Lakewood
        Tips and Walkthrough: Candy Crush Level 9795
        Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
        Cognitive Science Cornell
        Tuw Academic Calendar
        Rainfall Map Oklahoma
        Ryujinx Firmware 15
        Haunted Mansion Showtimes Near Cinemark Tinseltown Usa And Imax
        Vistatech Quadcopter Drone With Camera Reviews
        Kaiju Paradise Crafting Recipes
        Chase Bank Cerca De Mí
        Exploring TrippleThePotatoes: A Popular Game - Unblocked Hub
        Tgh Imaging Powered By Tower Wesley Chapel Photos
        oklahoma city community "puppies" - craigslist
        Austin Automotive Buda
        Manatee County Recorder Of Deeds
        Planet Fitness Lebanon Nh
        Raising Canes Franchise Cost
        Mvnt Merchant Services
        Dr Adj Redist Cadv Prin Amex Charge
        Indio Mall Eye Doctor
        888-822-3743
        Craigslist Antique
        Deezy Jamaican Food
        Santa Ana Immigration Court Webex
        Tweedehands camper te koop - camper occasion kopen
        Fishing Hook Memorial Tattoo
        Latest Posts
        Article information

        Author: Nathanael Baumbach

        Last Updated:

        Views: 6396

        Rating: 4.4 / 5 (75 voted)

        Reviews: 82% of readers found this page helpful

        Author information

        Name: Nathanael Baumbach

        Birthday: 1998-12-02

        Address: Apt. 829 751 Glover View, West Orlando, IN 22436

        Phone: +901025288581

        Job: Internal IT Coordinator

        Hobby: Gunsmithing, Motor sports, Flying, Skiing, Hooping, Lego building, Ice skating

        Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.