Skip to content

Instantly share code, notes, and snippets.

@zhiguangwang
Last active September 7, 2018 17:42
Show Gist options
  • Save zhiguangwang/fd3b88b188d7018326ff to your computer and use it in GitHub Desktop.
Save zhiguangwang/fd3b88b188d7018326ff to your computer and use it in GitHub Desktop.
Manage SSL Certificates for Mono with Certificate Manager.

Manage SSL Certificates for Mono with Certificate Manager

For more details, see certmgr.

Note for commands to work, certificate must be in DER format.

Valid certificate store names are:

  • Trust (ROOT CA)
  • CA (Intermediate CA)
  • AddressBook (Server Certificates)

And certificate stores are kept under:

~/.config/.mono/certs/

List certificates in a certificate store

certmgr -list -c $STORE

Add a certificate to a store

certmgr -add -c $STORE $CERT_DER_FILE

Remove a certificate from a store

certmgr -del -c $STORE $CERT_UNIQUE_HASH

The $CERT_UNIQUE_HASH can be found by list a store. Example:

$ certmgr -list -c Trust
Mono Certificate Manager - version 4.0.2.0
Manage X.509 certificates and CRL from stores.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.

Self-signed X.509 v3 Certificate
  Serial Number: 4AC79159C96A75A1B146429056E03B08
  Issuer Name:   C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA
  Subject Name:  C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA
  Valid From:    11/10/2006 12:00:00 AM
  Valid Until:   11/10/2031 12:00:00 AM
  Unique Hash:   B34DDD372ED92E8F2ABFBB9E20A9D31F204F194B
@nddipiazza
Copy link

what is store?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment