5.0.0 & 5.0.1 contained a bunch of certs issues - I would say go straight to 5.0.7
Do note this which is fixed in 5.0.8:
[SOLVED] 5.0.7 Upgrade Failure - when hostname of server does not match cert
Do you have any LDAP replicas? (then you should definitely step through 4.5.11 first)