Troubleshooting SCARD_F_INTERNAL_ERROR


If you receive the SCARD_F_INTERNAL_ERROR error when enrolling a YubiKey, usually this means that the certificate object that is being written to the YubiKey is too large. For YubiKey 5 Series and YubiKey 4 Series devices the maximum object size is 3076 bytes; the YubiKey NEO  maximum is 2052 bytes. To confirm this is the issue, you can enable debug logging for the YubiKey Smart Card Minidriver, attempt the enrollment again, and then search the created log file for “cbInitialCreationSize” which will show the size of the object. Some factors that contribute to the size of the certificate object are:

  • Number of certificate authorities in the certificate chain
  • The names of the certificate authorities in the certificate chain
  • Certificate hash algorithm
  • Size of the private key