Handle RSA_R_DATA_TOO_LARGE

BoringSSL has stopped returning RSA_R_DATA_TOO_LARGE_FOR_MODULUS and
started returning this new error code.  Add support for it in software
keymaster.  Note that this creates a problem because the new code is
also used for cases that uses to return
RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE.  Returning the same code for both of
those reasons means that we can't distinguish between them, and we have
been relying on that distinction.  Some adjustment at higher layers is
also going to be required.

Bug: 65214323
Test: runtest --path cts/tests/tests/keystore/src/android/keystore/cts
Change-Id: Ic6244000cbba9d6004e039893e9f32f9f3340f48
1 file changed
tree: 2d19b1257a08c8f3d6bf55e3d9974e0c35895b44
  1. include/
  2. .clang-format
  3. .gitignore
  4. ae.h
  5. aes_key.cpp
  6. aes_key.h
  7. aes_operation.cpp
  8. aes_operation.h
  9. Android.bp
  10. Android.mk
  11. android_keymaster.cpp
  12. android_keymaster_messages.cpp
  13. android_keymaster_messages_test.cpp
  14. android_keymaster_test.cpp
  15. android_keymaster_test_utils.cpp
  16. android_keymaster_test_utils.h
  17. android_keymaster_utils.cpp
  18. asymmetric_key.cpp
  19. asymmetric_key.h
  20. asymmetric_key_factory.cpp
  21. attestation_record.cpp
  22. attestation_record.h
  23. attestation_record_test.cpp
  24. auth_encrypted_key_blob.cpp
  25. auth_encrypted_key_blob.h
  26. authorization_set.cpp
  27. authorization_set_test.cpp
  28. ec_key.cpp
  29. ec_key.h
  30. ec_key_factory.cpp
  31. ec_keymaster0_key.cpp
  32. ec_keymaster0_key.h
  33. ec_keymaster1_key.cpp
  34. ec_keymaster1_key.h
  35. ec_privkey_pk8.der
  36. ecdsa_keymaster1_operation.cpp
  37. ecdsa_keymaster1_operation.h
  38. ecdsa_operation.cpp
  39. ecdsa_operation.h
  40. ecies_kem.cpp
  41. ecies_kem.h
  42. ecies_kem_test.cpp
  43. gtest_main.cpp
  44. hkdf.cpp
  45. hkdf.h
  46. hkdf_test.cpp
  47. hmac.cpp
  48. hmac.h
  49. hmac_key.cpp
  50. hmac_key.h
  51. hmac_operation.cpp
  52. hmac_operation.h
  53. hmac_test.cpp
  54. integrity_assured_key_blob.cpp
  55. integrity_assured_key_blob.h
  56. iso18033kdf.cpp
  57. iso18033kdf.h
  58. kdf.cpp
  59. kdf.h
  60. kdf1.h
  61. kdf1_test.cpp
  62. kdf2.h
  63. kdf2_test.cpp
  64. kdf_test.cpp
  65. kem.h
  66. key.cpp
  67. key.h
  68. key_blob_test.cpp
  69. key_exchange.h
  70. keymaster0_engine.cpp
  71. keymaster0_engine.h
  72. keymaster1_engine.cpp
  73. keymaster1_engine.h
  74. keymaster_configuration.cpp
  75. keymaster_configuration_test.cpp
  76. keymaster_enforcement.cpp
  77. keymaster_enforcement_test.cpp
  78. keymaster_stl.cpp
  79. keymaster_tags.cpp
  80. km0_sw_rsa_512.blob
  81. km1_sw_ecdsa_256.blob
  82. km1_sw_rsa_512.blob
  83. km1_sw_rsa_512_unversioned.blob
  84. List.h
  85. logger.cpp
  86. Makefile
  87. MODULE_LICENSE_APACHE2
  88. nist_curve_key_exchange.cpp
  89. nist_curve_key_exchange.h
  90. nist_curve_key_exchange_test.cpp
  91. NOTICE
  92. ocb.c
  93. ocb_utils.cpp
  94. ocb_utils.h
  95. openssl_err.cpp
  96. openssl_err.h
  97. openssl_utils.cpp
  98. openssl_utils.h
  99. operation.cpp
  100. operation.h
  101. operation_table.cpp
  102. operation_table.h
  103. OWNERS
  104. rsa_key.cpp
  105. rsa_key.h
  106. rsa_key_factory.cpp
  107. rsa_keymaster0_key.cpp
  108. rsa_keymaster0_key.h
  109. rsa_keymaster1_key.cpp
  110. rsa_keymaster1_key.h
  111. rsa_keymaster1_operation.cpp
  112. rsa_keymaster1_operation.h
  113. rsa_operation.cpp
  114. rsa_operation.h
  115. rsa_privkey_pk8.der
  116. serializable.cpp
  117. soft_keymaster_context.cpp
  118. soft_keymaster_device.cpp
  119. soft_keymaster_logger.cpp
  120. sw_rsa_attest_root.key.pem
  121. symmetric_key.cpp
  122. symmetric_key.h
  123. valgrind.supp