Cannot deploy on iPhone 5S

Cannot deploy our app on my Iphone 5S, IOS 10. It has earlier been functional but ceased to start due to out for date certificates (presumably). I have added a new development certificate, using the original file to create it but on a new mac, and a new profile. They were marked OK in Unreal4.14 (and 12, 13) but the deployment fails. It seems that part of the certificate is not valid (se log file). What could be wrong?
Thanks