Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6692039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:49:17+00:00 2026-05-26T05:49:17+00:00

How can I create a certificate using makecert with a ‘Subject Alternative Name’ field

  • 0

How can I create a certificate using makecert with a ‘Subject Alternative Name’ field ?

enter image description here

You can add some fields eg, ‘Enhanced Key Usage’ with the -eku option and I’ve tried the -san option but makecert doesn’t like it.

This is a self-signed certificate so any method that uses IIS to create something to send off to a CA won’t be appropriate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:49:18+00:00Added an answer on May 26, 2026 at 5:49 am

    Makecert doesn’t appear to support SANs so I created a certificate with SANs for use with IIS using OpenSSL. Check out my blog post about it:

    IIS 7 provides some easy to use wizards to create SSL certificates,
    however not very powerful ones. What I needed to do was to create SSL
    certificates that included a x.509 V3 extension, namely subject
    alternative names, a.k.a SANs. What SANs do is allow the website
    certificate to validate incoming requests by more than one URL domain
    name. This is really important when the web server is running web
    services such as WCF services and when other web services connect to
    them over SSL connections as with service oriented architectures.
    Unless special code is added to the web services to override the
    default SSL validation handler routines, the common name (CN) of the
    certificate MUST match the incoming request URL domain. So if the
    request was made using an FQDN, the certificate must have the FQDN as
    a CN or a SAN, a IP address or just a hostname will cause an SSL
    validation error and the connection will fail.

    SANs to the rescue… SANs support, among other things, DNS names and IP
    addresses. So by creating the certificate with SANs of the server FQDN
    and IP address, it increases the ways that other web services can
    connect.

    There are a number of tools that can generate certificates:
    makecert.exe, keytool.exe (java), selfssl.exe and openssl.exe. In
    addition, starting with Windows Vista and Server 2008 Microsoft added
    the CertEnroll API which can also create certificates programmatically
    either through COM interfaces.

    OpenSSL ended up doing exactly what I needed it to do. The process was
    fairly straight forward.

    1. Construct an OpenSSL config file.

    [req] distinguished_name = req_distinguished_name x509_extensions =
    v3_req prompt = no [req_distinguished_name] C = US ST = VA L =
    Somewhere O = MyOrg OU = MyOU CN = MyServerName [v3_req] keyUsage =
    keyEncipherment, dataEncipherment extendedKeyUsage = serverAuth
    subjectAltName = @alt_names [alt_names] DNS.1 = MyServerName DNS.2 =
    10.0.1.34 IP.1 = 10.0.1.34 IP.2 = 192.167.20.1

    1. Create x509 request with OpenSSL

    openssl.exe req -x509 -nodes -days 730 -newkey rsa:2048 -keyout
    C:\cert.pem -out C:\cert.pem -config C:\PathToConfigFileAbove.txt

    1. Create a PFX containing the keypair

    openssl.exe pkcs12 -export -out C:\cert.pfx -in C:\cert.pem -name "My
    Cert" -passout pass:mypassword

    1. Import the PFX into IIS using the import link in the server
      certificates area.

    2. Bind the certificate to the IIS websites.

    And viola, we know have a SSL certificate for IIS with SANs so we can
    connect using multiple domain names without certificate validation
    errors.

    Source: Creating certificates with SANs using OpenSSL by Andy Arismeti, Thursday, September 1, 2011

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using DOMPDF to create a certificate so people can print it. Problem is
I can create the following and reference it using area[0].states[0] area[0].cities[0] var area =
I can create a sparse php array (or map) using the command: $myarray =
I can create a menu item in the Windows Explorer context menu by adding
I can create a literal long by appending an L to the value; why
I can create a contact that is not mail enabled, but how do I
How can create a view with mutiple images, something similiar to the photo app
One can create an anonymous object that is initialized through constructor parameters, such as
How can create a New user in ORACLE with full access (alter, delete, select,
I can create an array of buttons in Windows Form but how can i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.