--- title: "Generate a Self-Signed Certificate" slug: "generate-a-self-signed-certificate" updated: 2026-10-23T02:58:46Z published: 2026-10-23T02:58:46Z canonical: "docs.crossworkassurance.cisco.com/generate-a-self-signed-certificate" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.crossworkassurance.cisco.com/llms.txt > Use this file to discover all available pages before exploring further. # Generate a Self-Signed Certificate To generate a self-signed certificate on MacOS using OpenSSL version 3.5, you can follow these example commands. **Note** Depending on your system, some minor variations may apply. ``` # generate CA DER certificate and private key openssl req -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -outform DER -days 365 -nodes # generate TLS private key openssl genpkey -algorithm RSA -outform DER -out tls.key -pkeyopt rsa_keygen_bits:2048 # generate certificate request for TLS certificates openssl req -new -key tls.key -out ca.csr -outform DER # sign TLS certificate with CA certificate openssl x509 -req -inform DER -in ca.csr -CA ca.crt -CAform DER -CAkey ca.key -CAcreateserial -out tls.crt -days 365 -outform DER # convert certificates to PEM format needed to add to other systems trusted certificate store openssl x509 -in ca.crt -inform DER -out ca.pem -outform PEM openssl x509 -in tls.crt -inform DER -out tls.pem -outform PEM ``` **© 2026 Cisco and/or its affiliates. All rights reserved.** For more information about trademarks, please visit: [Cisco trademarks](https://www.cisco.com/c/en/us/about/legal/trademarks.html)[](https://www.cisco.com/c/en/us/about/legal/trademarks.html) For more information about legal terms, please visit: [Cisco legal terms](https://www.cisco.com/c/en/us/about/legal/terms-conditions.html)