PeculiarVentures / fortify-tools

Fortify enables web applications to use smart cards, local certificate stores and do certificate enrollment. This is the "Tool" application used in the Fortify desktop application.
https://tools.fortifyapp.com
MIT License
15 stars 7 forks source link

Add certificate import logic #133

Closed OleksandrSPV closed 3 months ago

OleksandrSPV commented 5 months ago

@donskov Do you plan to have a method for import certificate in @peculiar/fortify-client-core? Or is there way to import certificate with creation methods. Could you help please?

donskov commented 4 months ago

@OleksandrSPV I don't think we need it in this particular library. It was created just to make working with Fortify and the web-component a little easier. You will need to do the import yourself. To do this you need:

  1. Find current provider (https://github.com/PeculiarVentures/fortify-webcomponents/blob/master/packages/client-core/src/fortify_api.ts#L726).
  2. Import certificate to provider using provider.certStorage.importCert method.
OleksandrSPV commented 4 months ago

@donskov Thanks, I'ii check

OleksandrSPV commented 4 months ago

@donskov I tried this method and it seemed to work. I did it in this branch https://github.com/PeculiarVentures/fortify-tools/tree/aslobodian/v2-certificate-import-logic-1, but I don’t want to open a PR now, because we should merge this https://github.com/PeculiarVentures/fortify-tools/pull/150 first, thanks