Upload PFX failed, wrong password

Fabio7586 16 Reputation points
2022-02-07T15:37:27.707+00:00

Hello, i'm having problem with uploading pfx; everytime i try to upload, it give me wrong password. No way to understand what is problem;
I have tried several way:

first i created a domain and verified with cname way, then

1) I tried to create self signed then with the following commands:
openssl genrsa 2048 > private.pem
openssl req -x509 -new -key private.pem -out public.pem
openssl pkcs12 -export -in public.pem -inkey private.pem -out mycert.pfx

with a lot of different password, from complex to simple.

2) I generated a certificate with certbot tool from letsenencrypt and then with openssl i generated a pfx with following command:

openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -certfile cert.pem -out mycert.pfx

I have tried forcing encrypt adding -descert to command because i read somewhere that azure support only tripledes encrypt and -descert add tripledes to pkcs12.

No Way, it give me every time same error. Wrong password or invalid format. I also have followed youtube tutorial.
and i set my user as global admin plus app admin and subscription admin.
what do i wrong? Please help me

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,956 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Fabio7586 16 Reputation points
    2022-02-08T15:26:33.083+00:00

    Ok, found solution from myself;
    I have imported certificate in windows with following:

    Import-PfxCertificate -FilePath "pfx file path" -CertStoreLocation Cert:\LocalMachine\My -Password (ConvertTo-SecureString -String 'MyPwD' -AsPlainText -Force) -Exportable

    and then i exported from windows with:

    Export-PfxCertificate -Cert Microsoft.PowerShell.Security\Certificate::LocalMachine\My\6DD3D0243A87C4BC5010238AEB0DFB9FFB1E387B(this is certificate thumbprint) -FilePath 'export pfx file path' -Password (ConvertTo-SecureString -String 'MyPwD' -AsPlainText -Force)

    and importing in azure works flawlessy.

    This is my solutions.

    Thanks

    2 people found this answer helpful.