RSA Keys don't load

I have an Asterisk instance of 20.6.0~dfsg+~cs6.13.40431414-2build5 as installed from the Ubuntu repos on 24.04.

I’m trying to load an RSA key. I created it with astgenkey -q -n phreaknetrsa and wound up with keys in /var/lib/asterisk/keys. But wait, Ubuntu’s package, in asterisk.conf, contains:

astkeydir => /var/lib/asterisk

so I added /keys on the end and did a full reload.

I checked that res_crypto was loaded, and did

module reload res_crypto
keys init
keys show

but no luck:

rthur*CLI> module reload res_crypto
arthur*CLI> keys init
Module 'res_crypto' reloaded successfully.
[May 19 18:43:24]     -- Reloading module 'res_crypto.so' (Cryptographic Digital Signatures)
arthur*CLI> keys show
Key Name           Type     Status           Sum                              
------------------ -------- ---------------- -------------------------------- 

0 known RSA keys.

My keys have the proper permissions:

root@arthur:/var/lib/asterisk# ls -l keys
total 8
-rw------- 1 asterisk asterisk 916 May 18 22:29 phreaknetrsa.key
-rw-r--r-- 1 root     root     272 May 18 22:29 phreaknetrsa.pub
root@arthur:/var/lib/asterisk# 

My server runs as the asterisk user, as it was provided. I haven’t messed with it.

I should point out that I looked at the keys, and they look good:

-----BEGIN PRIVATE KEY-----
the key itself
-----END PRIVATE KEY-----

and

-----BEGIN PUBLIC KEY-----
the key itself
-----END PUBLIC KEY-----

I’m stumped. Any idea why my keys won’t load?

Put them in /usr/share/asterisk/keys

Le 20/05/2025 à 03:17, edgreenberg via Asterisk Community a écrit :

[edgreenberg] edgreenberg https://community.asterisk.org/u/edgreenberg
May 20

I have an Asterisk instance of 20.6.0~dfsg+~cs6.13.40431414-2build5 as
installed from the Ubuntu repos on 24.04.

I’m trying to load an RSA key. I created it with |astgenkey -q -n
phreaknetrsa| and wound up with keys in |/var/lib/asterisk/keys|. But
wait, Ubuntu’s package, in asterisk.conf, contains:

|astkeydir => /var/lib/asterisk |

so I added /keys on the end and did a full reload.

I checked that res_crypto was loaded, and did

|module reload res_crypto keys init keys show |

but no luck:

|rthurCLI> module reload res_crypto arthurCLI> keys init Module
‘res_crypto’ reloaded successfully. [May 19 18:43:24] – Reloading
module ‘res_crypto.so’ (Cryptographic Digital Signatures) arthur*CLI>
keys show Key Name Type Status Sum ------------------ --------
---------------- -------------------------------- 0 known RSA keys. |

My keys have the proper permissions:

|root@arthur:/var/lib/asterisk# ls -l keys total 8 -rw------- 1
asterisk asterisk 916 May 18 22:29 phreaknetrsa.key -rw-r–r-- 1 root
root 272 May 18 22:29 phreaknetrsa.pub root@arthur:/var/lib/asterisk# |

My server runs as the asterisk user, as it was provided. I haven’t
messed with it.

I should point out that I looked at the keys, and they look good:

|-----BEGIN PRIVATE KEY----- the key itself -----END PRIVATE KEY----- |

and

|-----BEGIN PUBLIC KEY----- the key itself -----END PUBLIC KEY----- |

I’m stumped. Any idea why my keys won’t load?


Visit Topic
https://community.asterisk.org/t/rsa-keys-dont-load/108439/1 or
reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here
<>.


Daniel