Automating certificate management in Firefox Browser through programming

Hello developer,

When it comes to managing certificates in the Firefox browser, the “view certificates” option can be found in the “Privacy and security” setting of Chrome. By opening the certificate manager, various operations related to certificate management can be performed manually,

For example:

option1: viewing certificate details and certificate chain details;

option2: importing and deleting certificates;

option3: checking certificate status,

and so on.

May I ask how to achieve automation of these operations through programming, including loading certificates, parsing certificates, building certificate chain, verifying certificates, obtaining verification results, and deleting certificates, replacing manual operations (options 1, 2, 3)?

In other words, how can all the available functions in the certificate manager be implemented through programming and run automatically through the program to replace laborious manual operations?

Thank you.