Sort srv by priority and prepare for weight support
The external signing command uses -sha256
Support srv weight properly