I was previously able to upload .p12 certificate files to an Azure Notification Hub.
Today I logged in to a dev hub that had previously accepted a certificate a few weeks ago and I deleted its certificate and then tried immediately to re-upload it [the same cert, the same file that previously worked] just to show a junior dev how the process worked and I got that same error.
I think Microsoft probably needs to push up a fix to this issue; the UI is always changing in Azure and this might just be a temporary regression in functionality. Either that or something has changed about what they accept but I don't see anything to indicate that.