mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
f0a29bf35b
The bundle package provides a utility to extract a private key from a file. If the private key is not included in a file, the method first assumes it's a file name and tries to open it. Based on the size of the key this could result in a os.PathError such as "file name too long". This fix changes the logic of how the private key/secret is extracted from the signing config by first performing a PEM decode on the input and then falling back on the exisiting mechanism. Fixes: #3766 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>