TABLE OF CONTENTS
Generating and importing user certificates as a .pfx file
In environments where the user certificates cannot be generated on the YubiKey, they can be generated on a Windows PC as a .pfx file and imported to a YubiKey for use.
To use an enrollment agent to generate a .pfx file for import
Right-click the Windows Start button and select Run.
In the window that appears, type mmc and press Enter.
Add a Certificates snap-in for My User account: in the console tree, expand the Personal store, and then click Certificates.
On the Action menu, point to All Tasks, point to Advanced Operations, and then click Enroll on behalf of to open the Certificate Enrollment wizard. Click Next.
Browse to the Enrollment Agent certificate that you will use to sign the certificate request that you are processing. Click Next.
Select the type of certificate that you want to enroll for and click Enroll.
After the Certificate Enrollment Wizard has successfully finished, click Close.
Exporting a certificate with Private Key
On the workstation where you enrolled the smart card certificates, choose Start, choose Run, and then in the Open box, type MMC. Choose OK.
On the Console page, on the File menu, select Add/Remove Snap in.
On the Add/Remove Snap-in dialog box, choose Add. The Add Standalone Snap-in page appears. Select Certificates and then choose Add.
On the Certificates snap-in page, select My user account, and then choose Finish. On the Add or Remove Snap-in page, choose Close, and then on the Add/Remove Snap-in page, choose OK.
On the Console page, in the navigation pane, expand Certificates - Current User and then expand Personal. In the navigation pane, select Certificates.
In the details pane, locate the certification authority certificate that was issued for the Smart Card template. This file should have the name of your Smart card user. Right-click this certificate, select All Tasks, and then choose Export.
The Welcome to the Certificate Wizard dialog box appears. Choose Next to continue.
On the Export Private Key page, select Yes, export the private key. Choose Next.
On the Export File Format page, make sure that you select Personal Information Exchange – PKCS #12(.PFX). Make sure that you select the Enable strong protection box. Choose Next.
On the Password page, supply a password, and then choose Next.
On the File to Export page, type the path and filename of the .pfx file. For example, C:\usercert.pfx. Choose Next.
Choose Finish. On the Certificate Export Wizard page, choose OK to confirm that the export was successful.
Repeat steps 7 through 12. For each user certificate to export.
Importing a .pfx file using CertUtil
On the workstation where you enrolled the smart card certificates, choose Start, choose Run, and then in the Open box, type CMD. Choose OK.
On the Command Line Interface, enter the command:
certutil -csp “Microsoft Base Smart Card Crypto Provider” -importpfx certname.pfx
Where certname.pfx is the name of the .pfx file to import.
Repeat step 2 for each .pfx file to import.
Importing a .pfx file using the YubiKey Manager
Open YubiKey Manager and click Applications, Select PIV, Select Configure Certificates.
Select the Slot you wish to import the certificate to in this case it's Authentication (9a)
To import an existing certificate, click Import.
Browse to the .pfx file you want to import (created in steps 7-12 of the previous section), and click Open.
To confirm the password that was set for the certificate, type the password and click OK. (see step 10 of the previous section)