Instructions for generating signed URLs are incorrect. #3567
Labels
documentation
This is a problem with documentation.
module/sdk-custom
needs-review
p3
This is a minor priority issue
Hi
Following the guide of this url:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-trusted-signers.html
The generated private key did not work for me using
AmazonCloudFrontUrlSigner.GetCannedSignedURL(url, privateKeyReader, keyPair, expiresOn);
throw a exception Invalid Key
The solution is to add the -traditional parameter to the creation, it would look like this:
openssl genrsa -out private_key.pem -traditional 2048
So it works correctly in c#
If you already have the generated private key you can transform it to the correct format using:
openssl rsa -in private_key.pem -out private_key_traditional.pem -traditional
The step of generating the public key has worked correctly for me and the generated urls work correctly.
I use, on ubuntu in wsl
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
Originally posted by @ferminolr in #3221 (comment)
The text was updated successfully, but these errors were encountered: