When creating a self-signed certificate to be used to identify a server or client, from the Key Management Menu or Token Management Menu, enter 6.You are prompted for a number of items to define the certificate, including the intended use of the certificate, the key algorithm and key size, and possibly the digest algorithm for the certificate signature. Create and Activate a Device Certificate Communication between your device and AWS IoT Core is protected through the use of X.509 certificates. AWS IoT Core can generate a certificate for you or you can use your own X.509 certificate. If the Certification Authority (CA) that issued the server's certificate is not already defined in your client key database, you need to request the CA's certificate from the CA, receive it into your key database, and mark it as trusted. See Designating a key as a trusted root. Your client uses its private key to sign messages sent to servers.

-->

Point-to-Site connections use certificates to authenticate. This article shows you how to create a self-signed root certificate and generate client certificates using PowerShell on Windows 10 or Windows Server 2016. If you are looking for different certificate instructions, see Certificates - Linux or Certificates - MakeCert.

You must perform the steps in this article on a computer running Windows 10 or Windows Server 2016. The PowerShell cmdlets that you use to generate certificates are part of the operating system and do not work on other versions of Windows. The Windows 10 or Windows Server 2016 computer is only needed to generate the certificates. Once the certificates are generated, you can upload them, or install them on any supported client operating system.

If you do not have access to a Windows 10 or Windows Server 2016 computer, you can use MakeCert to generate certificates. The certificates that you generate using either method can be installed on any supported client operating system.

Create a self-signed root certificate

Product key for microsoft office 2016 generator. Use the New-SelfSignedCertificate cmdlet to create a self-signed root certificate. For additional parameter information, see New-SelfSignedCertificate.

  1. From a computer running Windows 10 or Windows Server 2016, open a Windows PowerShell console with elevated privileges. These examples do not work in the Azure Cloud Shell 'Try It'. You must run these examples locally.

  2. Use the following example to create the self-signed root certificate. The following example creates a self-signed root certificate named 'P2SRootCert' that is automatically installed in 'Certificates-Current UserPersonalCertificates'. You can view the certificate by opening certmgr.msc, or Manage User Certificates.

  3. Leave the PowerShell console open if you want to create a client certificate right after creating this root certificate.

Generate a client certificate

Each client computer that connects to a VNet using Point-to-Site must have a client certificate installed. You generate a client certificate from the self-signed root certificate, and then export and install the client certificate. If the client certificate is not installed, authentication fails.

The following steps walk you through generating a client certificate from a self-signed root certificate. You may generate multiple client certificates from the same root certificate. When you generate client certificates using the steps below, the client certificate is automatically installed on the computer that you used to generate the certificate. If you want to install a client certificate on another client computer, you can export the certificate.

The examples use the New-SelfSignedCertificate cmdlet to generate a client certificate that expires in one year. For additional parameter information, such as setting a different expiration value for the client certificate, see New-SelfSignedCertificate.

Example 1 - PowerShell console session still open

Use this example if you have not closed your PowerShell console after creating the self-signed root certificate. This example continues from the previous section and uses the declared '$cert' variable. If you closed the PowerShell console after creating the self-signed root certificate, or are creating additional client certificates in a new PowerShell console session, use the steps in Example 2.

Modify and run the example to generate a client certificate. If you run the following example without modifying it, the result is a client certificate named 'P2SChildCert'. If you want to name the child certificate something else, modify the CN value. Do not change the TextExtension when running this example. The client certificate that you generate is automatically installed in 'Certificates - Current UserPersonalCertificates' on your computer.

Example 2 - New PowerShell console session

If you are creating additional client certificates, or are not using the same PowerShell session that you used to create your self-signed root certificate, use the following steps:

  1. Identify the self-signed root certificate that is installed on the computer. This cmdlet returns a list of certificates that are installed on your computer.

  2. Locate the subject name from the returned list, then copy the thumbprint that is located next to it to a text file. In the following example, there are two certificates. The CN name is the name of the self-signed root certificate from which you want to generate a child certificate. In this case, 'P2SRootCert'.

    To connect with Private Key: This is not a recommended way to connect. We highly suggest using MEW offline for this option. On the MEW front page, select ‘Access My Wallet’. Choose the ‘Software’ option to connect, then select ‘Private Key’ and click ‘Continue’. Copy and paste your private key into the value field. Generate a new wallet via our interface and take a look at the different options you may have downloaded or saved. Sometimes backtracking can help jog your memory. In the future, we strongly recommend you use our fully fledged mobile app MEW wallet,. How is my ether wallet private key generated.

  3. Declare a variable for the root certificate using the thumbprint from the previous step. Replace THUMBPRINT with the thumbprint of the root certificate from which you want to generate a child certificate.

    For example, using the thumbprint for P2SRootCert in the previous step, the variable looks like this:

  4. Modify and run the example to generate a client certificate. If you run the following example without modifying it, the result is a client certificate named 'P2SChildCert'. If you want to name the child certificate something else, modify the CN value. Do not change the TextExtension when running this example. The client certificate that you generate is automatically installed in 'Certificates - Current UserPersonalCertificates' on your computer.

Export the root certificate public key (.cer)

After creating a self-signed root certificate, export the root certificate public key .cer file (not the private key). You will later upload this file to Azure. The following steps help you export the .cer file for your self-signed root certificate:

  1. To obtain a .cer file from the certificate, open Manage user certificates. Locate the self-signed root certificate, typically in 'Certificates - Current UserPersonalCertificates', and right-click. Click All Tasks, and then click Export. This opens the Certificate Export Wizard. If you can't find the certificate under Current UserPersonalCertificates, you may have accidentally opened 'Certificates - Local Computer', rather than 'Certificates - Current User'). If you want to open Certificate Manager in current user scope using PowerShell, you type certmgr in the console window.

  2. In the Wizard, click Next.

  3. Select No, do not export the private key, and then click Next.

  4. On the Export File Format page, select Base-64 encoded X.509 (.CER)., and then click Next.

  5. For File to Export, Browse to the location to which you want to export the certificate. For File name, name the certificate file. Then, click Next.

  6. Click Finish to export the certificate.

  7. Your certificate is successfully exported.

  8. The exported certificate looks similar to this:

  9. If you open the exported certificate using Notepad, you see something similar to this example. The section in blue contains the information that is uploaded to Azure. If you open your certificate with Notepad and it does not look similar to this, typically this means you did not export it using the Base-64 encoded X.509(.CER) format. Additionally, if you want to use a different text editor, understand that some editors can introduce unintended formatting in the background. This can create problems when uploaded the text from this certificate to Azure.

Export the self-signed root certificate and private key to store it (optional)

You may want to export the self-signed root certificate and store it safely as backup. If need be, you can later install it on another computer and generate more client certificates. To export the self-signed root certificate as a .pfx, select the root certificate and use the same steps as described in Export a client certificate.

Export the client certificate

When you generate a client certificate, it's automatically installed on the computer that you used to generate it. If you want to install the client certificate on another client computer, you need to export the client certificate that you generated.

  1. To export a client certificate, open Manage user certificates. The client certificates that you generated are, by default, located in 'Certificates - Current UserPersonalCertificates'. Right-click the client certificate that you want to export, click all tasks, and then click Export to open the Certificate Export Wizard.

  2. In the Certificate Export Wizard, click Next to continue.

  3. Select Yes, export the private key, and then click Next.

  4. On the Export File Format page, leave the defaults selected. Make sure that Include all certificates in the certification path if possible is selected. This setting additionally exports the root certificate information that is required for successful client authentication. Without it, client authentication fails because the client doesn't have the trusted root certificate. Then, click Next.

  5. On the Security page, you must protect the private key. If you select to use a password, make sure to record or remember the password that you set for this certificate. Then, click Next.

  6. On the File to Export, Browse to the location to which you want to export the certificate. For File name, name the certificate file. Then, click Next.

  7. Click Finish to export the certificate.

Install an exported client certificate

Each client that connects to the VNet over a P2S connection requires a client certificate to be installed locally.

To install a client certificate, see Install a client certificate for Point-to-Site connections.

Next steps

Continue with your Point-to-Site configuration.

  • For Resource Manager deployment model steps, see Configure P2S using native Azure certificate authentication.
  • For classic deployment model steps, see Configure a Point-to-Site VPN connection to a VNet (classic).

You can use vSphere Certificate Manager to generate Certificate Signing Requests (CSRs). Submit those CSRs to your enterprise CA or to an external certificate authority for signing. You can use the signed certificates with the different supported certificate replacement processes.

  • You can use vSphere Certificate Manager to create the CSR.
  • If you prefer to create the CSR manually, the certificate that you send to be signed must meet the following requirements.
    • Key size: 2048 bits or more
    • PEM format. VMware supports PKCS8 and PKCS1 (RSA keys). When keys are added to VECS, they are converted to PKCS8.
    • x509 version 3
    • If you are using custom certificates, the CA extension must be set to true for root certificates, and cert sign must be in the list of requirements.
    • CRL signing must be enabled.
    • Enhanced Key Usage can be either empty or contain Server Authentication.
    • No explicit limit to the length of the certificate chain. VMCA uses the OpenSSL default, which is 10 certificates.
    • Certificates with wildcards or with more than one DNS name are not supported.
    • You cannot create subsidiary CAs of VMCA.

      See the VMware knowledge base article at http://kb.vmware.com/kb/2112009, Creating a Microsoft Certificate Authority Template for SSL certificate creation in vSphere 6.0, for an example using Microsoft Certificate Authority.

vSphere Certificate Manager prompts you for information. The prompts depend on your environment and on the type of certificate that you want to replace.

For any CSR generation, you are prompted for the password of the administrator@vsphere.local user, or for the administrator of the vCenter Single Sign-On domain that you are connecting to.

Procedure

  1. Run the vSphere Certificate Manager. OS
    Command
    Windows
    Linux/usr/lib/vmware-vmca/bin/certificate-manager
  2. Select Option 2.
    Initially, you use this option to generate the CSR, not to replace certificates.
  3. Supply the password and the Platform Services Controller IP address or host name if prompted.
  4. Select Option 1 to generate the CSR and answer the prompts.
    As part of the process, you have to provide a directory. Certificate Manager places the certificate to be signed ( *.csr file) and the corresponding key file ( *.key file) in the directory.
  5. Name the certificate signing request (CSR) root_signing_cert.csr.
  6. Send the CSR to your enterprise or external CA for signing and name the resulting signed certificate root_signing_cert.cer.
  7. In a text editor, combine the certificates as follows.
  8. Save the file as root_signing_chain.cer.

Create Client Authentication Certificate

What to do next

Generate Client Certificate With Ca Key Chain

Replace the existing root certificate with the chained root certificate. See Replace VMCA Root Certificate with Custom Signing Certificate and Replace All Certificates.