How to specify the internet certificate for encryption programmatically?

Hi , How to specify the internet certificate for encryption programmatically using C API?

When I import a certificate using pkcs12_ImportFileToIDFile, it becomes the default for signing  but not for encryption. I think, first I need to import the certificate to Domino Directory. In that case, is there any API available to import the certificate from pkcs12 file to Domino directory?

Or, is there a way to edit person record in domino directory using C API?

If it is not possible to do these things programmatically, I would appreciate if somebody can confirm that.

Thanks,

Rama.