Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change publisher info #245

Open
lasyka opened this issue Mar 17, 2020 · 1 comment
Open

How to change publisher info #245

lasyka opened this issue Mar 17, 2020 · 1 comment

Comments

@lasyka
Copy link

lasyka commented Mar 17, 2020

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?

@ljluestc
Copy link

#!/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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants