import sha512 to make sha512 ssl certs work

This tiny PR makes Docker work with private registries which use SSL certs which use sha512 for hashing.

Fixes #5173.