[SR-Users] Kamailio 5.5 STIR SHAKEN private key buffer size error

Maharaja Azhagiah er.maharaja at gmail.com
Mon Jun 27 23:05:24 CEST 2022


Hi,

I am trying STIR/SHAKEN using libstirshaken in Kamailio 5.5.

I used a self signed certificate as this is just a test in the local docker
environment. However, when I try to add identity with private key
(stirshaken_add_identity_with_key), I get "[error_code: 447] Buffer for key
from file /tmp/cert/private.pem too short (2000 <= 3247)"

I have tried using 2048 and 4096 size

root at 5907e44bd056:/tmp/cert# openssl rsa -in private.pem -text -noout |
grep "Private-Key"
RSA Private-Key: (4096 bit, 2 primes)

Could you tell me what is wrong with the certificate?

Kamailio version:

root at 5907e44bd056:/usr/local/kamailio/etc/kamailio# kamailio -v
version: kamailio 5.5.4 (x86_64/linux) 469465

Error:

 0(404) ERROR: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:761]: ki_stirshaken_add_identity_with_key(): Failed to
load private key
 0(404) DEBUG: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:117]: stirshaken_print_error_details(): failure details:
 0(404) DEBUG: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:118]: stirshaken_print_error_details(): failure reason
is: src/stir_shaken_ssl.c:2112: [error_code: 447] Buffer for key from file
/tmp/cert/private.pem too short (2000 <= 3247)
 0(404) DEBUG: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:119]: stirshaken_print_error_details(): failure error
code is: 447
 0(404) ERROR: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} <script>:
Failed

Regards

*Maharaja Azhagiah*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220627/bd9e932c/attachment.htm>


More information about the sr-users mailing list