Skip to main content
FortiKoala
Staff
Staff
Sep 27, 2018 3:15 PM UTC

Technical Tip: Convert SSL private key to RSA format

  • Apr 16, 2026 1:22 PM UTC
  • 1 reply
  • 9405 views
  • Translate All

Description

 

This article describes how to convert SSL private keys to RSA format.


Scope

 

FortiNAC CentOS Version: v8.x and v9.x.


Solution

 

Private keys must be in RSA format and unencrypted.  Otherwise, errors will be generated when attempting to install the certificates and key in the Administration UI.


To review the private key file in Linux, type:

 

cat <filename>

 

If the key header looks like this:


-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC2jNIpG/iak9WT
QvhfPZHNp1jKbmlEf4KnV27i4nbIYp6kWYUegH/I64G3Q8AnP1IBP4KQruPmhxZs


The key is not in the correct format and needs to be converted.

 

Convert the file to RSA format by running the following command (on a Linux server):

 

openssl rsa -in <old_file_name> -out  <new_file>

The header should now look like this:


-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAtozSKRv4mpPVk0L4Xz2RzadYym5pRH+Cp1du4uJ2yGKepFmF

 

Complete SSL Certificate upload using the newly converted private key file.

Related article:

Technical Tip: 'One or more certificates are invalid' error

1 reply

NoushinTaheri
Staff
Staff
Mar 19, 2026 6:45 PM UTC

If this command doesn't work:

openssl rsa -in <old_file_name> -out  <new_file>

use this one:

openssl rsa -in <old_file_name> -out <new_file> -traditional

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024