amazon-kinesis-video-streams-producer-c icon indicating copy to clipboard operation
amazon-kinesis-video-streams-producer-c copied to clipboard

[QUESTION] SSL connect error : Failed - mbedTLS: ctr_drbg_init returned (-0x0034) CTR_DRBG - The entropy source failed

Open RTL8710 opened this issue 1 year ago • 3 comments
trafficstars

running error:

** Logging ** 2024-05-22 18:43:10.263 ERROR blockingCurlCall(): Curl perform failed for url https://cah7l82f9wtsm.credentials.iot.us-east-2.amazonaws.com/role-aliases/ipcamera_event_rule_alias/credentials with result SSL connect error : Failed - mbedTLS: ctr_drbg_init returned (-0x0034) CTR_DRBG - The entropy source failed

Failed with status 0x16000001

RTL8710 avatar May 23 '24 02:05 RTL8710

What platform and OS are you on?

hassanctech avatar May 24 '24 15:05 hassanctech

mips platform linux os

RTL8710 avatar Jun 03 '24 14:06 RTL8710

@RTL8710 ,

Some context: CTR_DRBG is a deterministic random bit generator based on the AES block cipher operating in counter mode. Entropy Source provides the randomness needed for cryptographic operations. Insecure or insufficient entropy can compromise security.

I think mbedtls uses /dev/urandom or /dev/random to gather the entropy. So could you run the following and report what happens?

  1. ls -l /dev/urandom and ls -l /dev/random
  2. cat /proc/sys/kernel/random/entropy_avail -> does this report anything?

You could also try to follow the instructions here: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c?tab=readme-ov-file#provide-hardware-entropy-source. This SDK does not have a custom config file for mbedtls and use the mbedtls default provided, but that is something you can try to set up? For your reference, check this config file in WebRTC C SDK: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/blob/master/configs/config_mbedtls.h

disa6302 avatar Jun 17 '24 18:06 disa6302

Closing due to staleness. Feel free to reopen if the issue persists

niyatim23 avatar Jul 30 '24 18:07 niyatim23