You might want to have a look at the code in Zinc-AWS (group AWS in ConfigurationOfZincHTTPComponents), in particular ZnAWSS3Client and ZnAWSS3RequestSignatureTool - it is using similar request signing but does HMAC-SHA1.
>From a quick glance at the documentation, it seems you have to use Character lf (\r) else you'll get the wrong result.
Have you tried signing the examples (canonical strings) in the documentation and comparing with their result ?
If you really can't make it work, we can discuss further.