Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

menuecho avatar image
menuecho asked

All Certificates Combine to form a chain. need a code for Node js

Requirement as a Web Service from the https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/developing-an-alexa-skill-as-a-web-service [b] "All certificates in the chain combine to create a chain of trust to a trusted root CA certificate". [/b] Im using [b]node js[/b] is there any way this can be done. Im not sure how to do this. Any libraries or any code that can do this. Any other language is also helpful. Also for the signature its mentioned SHA-1 . What if that changes where will we be informed.
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Nick Gardner avatar image
Nick Gardner answered
I don't think there's a full code example anywhere, but you should be able to use the getPeerCertificate() method in node.js to do this: https://nodejs.org/api/tls.html#tls_tlssocket_getpeercertificate_detailed. That method will give you the SHA-1 hash of the full chain if you call it with the detailed parameter as true. From the request, you can grab the official Alexa signature, hash each part of the chain, and then compare those values to the peer ones. Let me know if this method works or if you run into any issues with it. -Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.