RSA Security Home Security System 4.3 Instrukcja Użytkownika Strona 14

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 38
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 13
Hardware Errors
10 RSA BSAFE Crypto-C Intel Hardware User’s Guide
Hardware Errors
If the hardware fails, Crypto-C will return an error of BE_HARDWARE or
BE_NOT_SUPPORTED. BE_HARDWARE indicates that the Intel primitive has returned an
error. This error can be retrieved using
B_GetExtendedErrorInfo (described in the
Crypto-C Library Reference Manual), as shown below. In this example,
randomAlgorithm
is an algorithm that has been created to retrieve a seed from the Intel Random
Number Generator. The data returned in the data field of
errorData
is a structure
of type
A_RSA_EXTENDED_ERROR (see A_RSA_EXTENDED_ERROR on page 11). The third
parameter will return a pointer to the algorithm method that was in use when the
error was encountered:
For information about the Intel error codes returned by
B_GetExtendedErrorInfo,
consult Appendix B.
An error of
BE_NOT_SUPPORTED may mean that there is a problem accessing the BHAPI
driver. See Appendix A for more information.
ITEM errorData;
POINTER am;
B_GetExtendedErrorInfo(randomAlgorithm, &errorData, &am);
/* Print out the error information. */
if (am == &HW_INTEL_RANDOM) {
printf ("[Seed] Code: %d\n",
((A_RSA_EXTENDED_ERROR *)errorData.data)->errorCode);
printf ("[Seed] Message: %s",
((A_RSA_EXTENDED_ERROR *)errorData.data)->errorMsg);
}
Przeglądanie stron 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 37 38

Komentarze do niniejszej Instrukcji

Brak uwag