So since the Mavericks upgrade curl has more issues with certificates.
When trying to curl a file from my web server with it's self-signed certificate it was getting the error "SSL Certificate: Invalid certificate chain".
This was corrected by adding the certificate to my system keychain and setting it to always allow SSL, information I found here and here.
This works fine and when I curl a file it downloads properly.
However if I run curl with sudo before (e.g I have a script which needs to be run with sudo and does a curl in it) then I'm back to the same error message.
I'm guessing that root doesn't read from the system keychain perhaps?
Does anyone know a way to fix this?