Import of DKIM key file with CRLF end of line format fails: Unable to import key
search cancel

Import of DKIM key file with CRLF end of line format fails: Unable to import key

book

Article ID: 272564

calendar_today

Updated On:

Products

Messaging Gateway

Issue/Introduction

Attempting to import a DKIM / RSA key into Administration > Certificates > Domain Keys fails with the error Unable to import the key. Reviewing the key data in the file shows that it has the expected key boundaries:

-----BEGIN RSA PRIVATE KEY-----
[key data]

-----END RSA PRIVATE KEY-----

Environment

Release : 10.8.1

Cause

If the import data file uses the Microsoft CRFL end of line format i.e. the key data has been copied into notepad or some other Windows text editor and saved before attempting to import into SMG, the import will fail.

Resolution

This issue has been filed as a defect in Messaging Gateway 10.8.1 and will be addressed in a future release.

Workaround

Converting the import file from the Windows standard CRLF end of line to Linux standard LF end of line will allow the DKIM private key data to be imported into Messaging Gateway. The simplest means of converting the end of line is to

  1. Open the file in a text editor like Notepad++
  2. Used Edit > EOL Conversion > Linux LF to switch the end of line format
  3. Save the import file with the new end of line format
  4. Import the updated key data into Administration > Certificates  > Domain Keys