null alias passed to getCertificate

created certificate exactly mention in below article.…

which certificate format (.cer, .p7b or .pem) we need to share with client?
I tried all each time getting different errors. .cer is latest version

when trading partner uses they are getting
null alias passed to getCertificate
Verification of digital signature of inbound AS2 message failed Verification failed

Can some one please share link to store public and private key? What is certificate type need to share with trading partner and format?

Thank you in advance