[GH-ISSUE #245] How to change publisher info #158

Open
opened 2026-02-25 22:32:45 +03:00 by kerem · 1 comment
Owner

Originally created by @lasyka on GitHub (Mar 17, 2020).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/245

The default mkcert commad's cert info is:
Subject: /O=mkcert development certificate/OU=root@myosname
Issuer: mkcert root@myosname
How can i to chage the root@myosname info to www.myhost.com?

Originally created by @lasyka on GitHub (Mar 17, 2020). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/245 The default mkcert commad's cert info is: Subject: /O=mkcert development certificate/OU=root@myosname Issuer: mkcert root@myosname How can i to chage the root@myosname info to www.myhost.com?
Author
Owner

@ljluestc commented on GitHub (Dec 29, 2023):

#!/bin/bash

# Define the desired CN for the root certificate
custom_cn="www.myhost.com"

# Install mkcert if not already installed
if ! command -v mkcert &> /dev/null; then
  echo "mkcert is not installed. Installing..."
  brew install mkcert  # Assuming you have Homebrew on macOS
fi

mkcert -install
mkcert -key-file rootCA-key.pem -cert-file rootCA.pem "${custom_cn}"

domains=("www.myhost.com" "example.com" "anotherdomain.com")

for domain in "${domains[@]}"; do
  mkcert -key-file "${domain}-key.pem" -cert-file "${domain}-cert.pem" "${domain}"
done

echo "Certificates generated successfully."

<!-- gh-comment-id:1871719872 --> @ljluestc commented on GitHub (Dec 29, 2023): ``` #!/bin/bash # Define the desired CN for the root certificate custom_cn="www.myhost.com" # Install mkcert if not already installed if ! command -v mkcert &> /dev/null; then echo "mkcert is not installed. Installing..." brew install mkcert # Assuming you have Homebrew on macOS fi mkcert -install mkcert -key-file rootCA-key.pem -cert-file rootCA.pem "${custom_cn}" domains=("www.myhost.com" "example.com" "anotherdomain.com") for domain in "${domains[@]}"; do mkcert -key-file "${domain}-key.pem" -cert-file "${domain}-cert.pem" "${domain}" done echo "Certificates generated successfully." ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#158
No description provided.