Finally I found out the reason.
I used .cer certificate but it did not work.
I converted it to .pem file beginning with "BEGIN CERTIFICATE" and ending with "END CERTIFICATE".
It also did not work.
I used the same pem but added at the beginning the bag attributes.
Bag Attributes
localKeyID: ...
subject=...
issuer=...
subject=...
issuer=...
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Bag Attributes: <Empty Attributes>
subject=...
issuer=...
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
and it worked fine.