rho-tau-extensions 5.5.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (661) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +2 -0
  3. data/LICENSE +21 -0
  4. data/README.md +6 -0
  5. data/Rakefile +90 -0
  6. data/libs/crosswalk.rb +2 -0
  7. data/libs/crosswalk/crosswalk.rb +2 -0
  8. data/libs/crosswalk/ext.yml +21 -0
  9. data/libs/crosswalk/ext/Crosswalk.xml +27 -0
  10. data/libs/crosswalk/ext/build +19 -0
  11. data/libs/crosswalk/ext/build.bat +29 -0
  12. data/libs/crosswalk/ext/platform/android/AndroidManifest.xml +9 -0
  13. data/libs/crosswalk/ext/platform/android/Rakefile +141 -0
  14. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkcore.so +0 -0
  15. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkdummy.so +0 -0
  16. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkcore.so +0 -0
  17. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkdummy.so +0 -0
  18. data/libs/crosswalk/ext/platform/android/adds/lib/xwalk_core_library_java.jar +0 -0
  19. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/bubble.9.png +0 -0
  20. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/bubble_arrow_up.png +0 -0
  21. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/color_picker_advanced_select_handle.png +0 -0
  22. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/crosswalk.png +0 -0
  23. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/dropdown_popup_background_down.9.png +0 -0
  24. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/dropdown_popup_background_up.9.png +0 -0
  25. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ic_menu_share_holo_light.png +0 -0
  26. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ic_search.png +0 -0
  27. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ic_warning.png +0 -0
  28. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ondemand_overlay.9.png +0 -0
  29. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/verify_checkmark.png +0 -0
  30. data/libs/crosswalk/ext/platform/android/adds/res/drawable-ldpi/crosswalk.png +0 -0
  31. data/libs/crosswalk/ext/platform/android/adds/res/drawable-mdpi/crosswalk.png +0 -0
  32. data/libs/crosswalk/ext/platform/android/adds/res/drawable-v21/button_borderless_compat.xml +10 -0
  33. data/libs/crosswalk/ext/platform/android/adds/res/drawable-v21/button_compat.xml +9 -0
  34. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/bubble.9.png +0 -0
  35. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/bubble_arrow_up.png +0 -0
  36. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/color_picker_advanced_select_handle.png +0 -0
  37. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/crosswalk.png +0 -0
  38. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/dropdown_popup_background_down.9.png +0 -0
  39. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/dropdown_popup_background_up.9.png +0 -0
  40. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ic_menu_share_holo_light.png +0 -0
  41. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ic_search.png +0 -0
  42. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ic_warning.png +0 -0
  43. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ondemand_overlay.9.png +0 -0
  44. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/verify_checkmark.png +0 -0
  45. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/ic_menu_share_holo_light.png +0 -0
  46. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/ic_search.png +0 -0
  47. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/ic_warning.png +0 -0
  48. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/verify_checkmark.png +0 -0
  49. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/ic_menu_share_holo_light.png +0 -0
  50. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/ic_search.png +0 -0
  51. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/ic_warning.png +0 -0
  52. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/verify_checkmark.png +0 -0
  53. data/libs/crosswalk/ext/platform/android/adds/res/drawable/autofill_chip_inset.xml +15 -0
  54. data/libs/crosswalk/ext/platform/android/adds/res/drawable/bubble.9.png +0 -0
  55. data/libs/crosswalk/ext/platform/android/adds/res/drawable/bubble_arrow_up.png +0 -0
  56. data/libs/crosswalk/ext/platform/android/adds/res/drawable/button_compat_shape.xml +9 -0
  57. data/libs/crosswalk/ext/platform/android/adds/res/drawable/color_button_background.xml +36 -0
  58. data/libs/crosswalk/ext/platform/android/adds/res/drawable/color_picker_advanced_select_handle.png +0 -0
  59. data/libs/crosswalk/ext/platform/android/adds/res/drawable/color_picker_border.xml +12 -0
  60. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_label_color.xml +11 -0
  61. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_popup_background.xml +13 -0
  62. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_popup_background_down.9.png +0 -0
  63. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_popup_background_up.9.png +0 -0
  64. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ic_menu_share_holo_light.png +0 -0
  65. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ic_search.png +0 -0
  66. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ic_warning.png +0 -0
  67. data/libs/crosswalk/ext/platform/android/adds/res/drawable/launchscreen_bg.xml +19 -0
  68. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ondemand_overlay.9.png +0 -0
  69. data/libs/crosswalk/ext/platform/android/adds/res/drawable/verify_checkmark.png +0 -0
  70. data/libs/crosswalk/ext/platform/android/adds/res/layout-land/date_time_picker_dialog.xml +42 -0
  71. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_keyboard_accessory_item.xml +40 -0
  72. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_suggestion_item.xml +18 -0
  73. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/color_picker_advanced_component.xml +46 -0
  74. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/color_picker_dialog_content.xml +51 -0
  75. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/color_picker_dialog_title.xml +41 -0
  76. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/date_time_suggestion.xml +35 -0
  77. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/dropdown_item.xml +58 -0
  78. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/multi_field_time_picker_dialog.xml +122 -0
  79. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/two_field_date_picker.xml +38 -0
  80. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/validation_message_bubble.xml +72 -0
  81. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_keyboard_accessory_icon.xml +13 -0
  82. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_keyboard_accessory_item.xml +17 -0
  83. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_suggestion_item.xml +7 -0
  84. data/libs/crosswalk/ext/platform/android/adds/res/layout/color_picker_advanced_component.xml +30 -0
  85. data/libs/crosswalk/ext/platform/android/adds/res/layout/color_picker_dialog_content.xml +36 -0
  86. data/libs/crosswalk/ext/platform/android/adds/res/layout/color_picker_dialog_title.xml +25 -0
  87. data/libs/crosswalk/ext/platform/android/adds/res/layout/date_time_picker_dialog.xml +42 -0
  88. data/libs/crosswalk/ext/platform/android/adds/res/layout/date_time_suggestion.xml +16 -0
  89. data/libs/crosswalk/ext/platform/android/adds/res/layout/dropdown_item.xml +34 -0
  90. data/libs/crosswalk/ext/platform/android/adds/res/layout/multi_field_time_picker_dialog.xml +50 -0
  91. data/libs/crosswalk/ext/platform/android/adds/res/layout/two_field_date_picker.xml +26 -0
  92. data/libs/crosswalk/ext/platform/android/adds/res/layout/validation_message_bubble.xml +47 -0
  93. data/libs/crosswalk/ext/platform/android/adds/res/menu/select_action_menu.xml +54 -0
  94. data/libs/crosswalk/ext/platform/android/adds/res/raw/contacts_api.js +206 -0
  95. data/libs/crosswalk/ext/platform/android/adds/res/raw/device_capabilities_api.js +231 -0
  96. data/libs/crosswalk/ext/platform/android/adds/res/raw/empty.wav +0 -0
  97. data/libs/crosswalk/ext/platform/android/adds/res/raw/icudtl.dat +0 -0
  98. data/libs/crosswalk/ext/platform/android/adds/res/raw/launch_screen_api.js +9 -0
  99. data/libs/crosswalk/ext/platform/android/adds/res/raw/messaging_api.js +359 -0
  100. data/libs/crosswalk/ext/platform/android/adds/res/raw/presentation_api.js +144 -0
  101. data/libs/crosswalk/ext/platform/android/adds/res/raw/wifidirect_api.js +227 -0
  102. data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk.pak +0 -0
  103. data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_content_strings.xml +15 -0
  104. data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_ui_strings.xml +47 -0
  105. data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_content_strings.xml +15 -0
  106. data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_ui_strings.xml +47 -0
  107. data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_content_strings.xml +15 -0
  108. data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_ui_strings.xml +47 -0
  109. data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_content_strings.xml +15 -0
  110. data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_ui_strings.xml +47 -0
  111. data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_content_strings.xml +15 -0
  112. data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_ui_strings.xml +47 -0
  113. data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_content_strings.xml +15 -0
  114. data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_ui_strings.xml +47 -0
  115. data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_content_strings.xml +15 -0
  116. data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_ui_strings.xml +47 -0
  117. data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_content_strings.xml +15 -0
  118. data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_ui_strings.xml +47 -0
  119. data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_content_strings.xml +15 -0
  120. data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_ui_strings.xml +47 -0
  121. data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_content_strings.xml +15 -0
  122. data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_ui_strings.xml +47 -0
  123. data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_content_strings.xml +15 -0
  124. data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_ui_strings.xml +47 -0
  125. data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_content_strings.xml +15 -0
  126. data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_ui_strings.xml +47 -0
  127. data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_content_strings.xml +15 -0
  128. data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_ui_strings.xml +47 -0
  129. data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_content_strings.xml +15 -0
  130. data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_ui_strings.xml +47 -0
  131. data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_content_strings.xml +15 -0
  132. data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_ui_strings.xml +47 -0
  133. data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_content_strings.xml +15 -0
  134. data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_ui_strings.xml +47 -0
  135. data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_content_strings.xml +15 -0
  136. data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_ui_strings.xml +47 -0
  137. data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_content_strings.xml +15 -0
  138. data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_ui_strings.xml +47 -0
  139. data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_content_strings.xml +15 -0
  140. data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_ui_strings.xml +47 -0
  141. data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_content_strings.xml +15 -0
  142. data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_ui_strings.xml +47 -0
  143. data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_content_strings.xml +15 -0
  144. data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_ui_strings.xml +47 -0
  145. data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_content_strings.xml +15 -0
  146. data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_ui_strings.xml +47 -0
  147. data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_content_strings.xml +15 -0
  148. data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_ui_strings.xml +47 -0
  149. data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_content_strings.xml +15 -0
  150. data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_ui_strings.xml +47 -0
  151. data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_content_strings.xml +15 -0
  152. data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_ui_strings.xml +47 -0
  153. data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_content_strings.xml +15 -0
  154. data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_ui_strings.xml +47 -0
  155. data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_content_strings.xml +15 -0
  156. data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_ui_strings.xml +47 -0
  157. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_content_strings.xml +15 -0
  158. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_ui_strings.xml +47 -0
  159. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_content_strings.xml +15 -0
  160. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_ui_strings.xml +47 -0
  161. data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_content_strings.xml +15 -0
  162. data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_ui_strings.xml +47 -0
  163. data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_content_strings.xml +15 -0
  164. data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_ui_strings.xml +47 -0
  165. data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_content_strings.xml +15 -0
  166. data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_ui_strings.xml +47 -0
  167. data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_content_strings.xml +15 -0
  168. data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_ui_strings.xml +47 -0
  169. data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_content_strings.xml +15 -0
  170. data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_ui_strings.xml +47 -0
  171. data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_content_strings.xml +15 -0
  172. data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_ui_strings.xml +47 -0
  173. data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_content_strings.xml +15 -0
  174. data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_ui_strings.xml +47 -0
  175. data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_content_strings.xml +15 -0
  176. data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_ui_strings.xml +47 -0
  177. data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_content_strings.xml +15 -0
  178. data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_ui_strings.xml +47 -0
  179. data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_content_strings.xml +15 -0
  180. data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_ui_strings.xml +47 -0
  181. data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_content_strings.xml +15 -0
  182. data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_ui_strings.xml +47 -0
  183. data/libs/crosswalk/ext/platform/android/adds/res/values-v14/theme.xml +16 -0
  184. data/libs/crosswalk/ext/platform/android/adds/res/values-v17/styles.xml +19 -0
  185. data/libs/crosswalk/ext/platform/android/adds/res/values-v17/ui_java_styles.xml +41 -0
  186. data/libs/crosswalk/ext/platform/android/adds/res/values-v21/styles.xml +14 -0
  187. data/libs/crosswalk/ext/platform/android/adds/res/values-v21/ui_java_styles.xml +14 -0
  188. data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_content_strings.xml +15 -0
  189. data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_ui_strings.xml +47 -0
  190. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_content_strings.xml +15 -0
  191. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_ui_strings.xml +47 -0
  192. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_content_strings.xml +15 -0
  193. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_ui_strings.xml +47 -0
  194. data/libs/crosswalk/ext/platform/android/adds/res/values/android_content_strings.xml +15 -0
  195. data/libs/crosswalk/ext/platform/android/adds/res/values/android_ui_strings.xml +47 -0
  196. data/libs/crosswalk/ext/platform/android/adds/res/values/android_xwalk_strings.xml +17 -0
  197. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_attrs.xml +9 -0
  198. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_dimens.xml +31 -0
  199. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_strings.xml +16 -0
  200. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_styles.xml +101 -0
  201. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_app_strings.xml +28 -0
  202. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_attrs.xml +11 -0
  203. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_colors.xml +13 -0
  204. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_core_internal_java_strings.xml +16 -0
  205. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_core_java_strings.xml +16 -0
  206. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_dimens.xml +11 -0
  207. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_resources_list.xml +7 -0
  208. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_styles.xml +40 -0
  209. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_values.xml +10 -0
  210. data/libs/crosswalk/ext/platform/android/ext_java.files +14 -0
  211. data/libs/crosswalk/ext/platform/android/ext_native.files +7 -0
  212. data/libs/crosswalk/ext/platform/android/jni/Crosswalk_impl.cpp +61 -0
  213. data/libs/crosswalk/ext/platform/android/src/com/rho/crosswalk/Crosswalk.java +14 -0
  214. data/libs/crosswalk/ext/platform/android/src/com/rho/crosswalk/CrosswalkFactory.java +18 -0
  215. data/libs/crosswalk/ext/platform/android/src/com/rho/crosswalk/CrosswalkSingleton.java +24 -0
  216. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/CrosswalkExtension.java +16 -0
  217. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/RhodesListener.java +18 -0
  218. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWResourceClient.java +182 -0
  219. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWUIClient.java +125 -0
  220. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWalkWebView.java +368 -0
  221. data/libs/crosswalk/ext/platform/iphone/Crosswalk.xcodeproj/project.pbxproj +368 -0
  222. data/libs/crosswalk/ext/platform/iphone/Crosswalk_Prefix.pch +7 -0
  223. data/libs/crosswalk/ext/platform/iphone/Rakefile +73 -0
  224. data/libs/crosswalk/ext/platform/iphone/impl/Crosswalk.h +14 -0
  225. data/libs/crosswalk/ext/platform/iphone/impl/Crosswalk.m +24 -0
  226. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkFactorySingleton.m +16 -0
  227. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkSetup.m +9 -0
  228. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkSingleton.h +17 -0
  229. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkSingleton.m +23 -0
  230. data/libs/crosswalk/ext/platform/iphone/impl/readme.txt +7 -0
  231. data/libs/crosswalk/ext/platform/qt/Crosswalk.pro +66 -0
  232. data/libs/crosswalk/ext/platform/qt/Rakefile +35 -0
  233. data/libs/crosswalk/ext/platform/qt/src/Crosswalk_impl.cpp +77 -0
  234. data/libs/crosswalk/ext/platform/wm/Crosswalk.sln +52 -0
  235. data/libs/crosswalk/ext/platform/wm/Crosswalk.vcproj +714 -0
  236. data/libs/crosswalk/ext/platform/wm/Crosswalk.vsprops +15 -0
  237. data/libs/crosswalk/ext/platform/wm/src/Crosswalk_impl.cpp +77 -0
  238. data/libs/crosswalk/ext/platform/wp8/Crosswalk.props +18 -0
  239. data/libs/crosswalk/ext/platform/wp8/Crosswalk.vcxproj +170 -0
  240. data/libs/crosswalk/ext/platform/wp8/Crosswalk.vcxproj.filters +50 -0
  241. data/libs/crosswalk/ext/platform/wp8/CrosswalkImpl.csproj +119 -0
  242. data/libs/crosswalk/ext/platform/wp8/CrosswalkImpl.props +8 -0
  243. data/libs/crosswalk/ext/platform/wp8/CrosswalkImpl.targets +7 -0
  244. data/libs/crosswalk/ext/platform/wp8/CrosswalkLib.props +18 -0
  245. data/libs/crosswalk/ext/platform/wp8/CrosswalkLib.vcxproj +185 -0
  246. data/libs/crosswalk/ext/platform/wp8/CrosswalkLib.vcxproj.filters +58 -0
  247. data/libs/crosswalk/ext/platform/wp8/src/Crosswalk_impl.cpp +76 -0
  248. data/libs/crosswalk/ext/platform/wp8/src/Crosswalk_impl.cs +69 -0
  249. data/libs/crosswalk/ext/platform/wp8/src/Properties/AssemblyInfo.cs +37 -0
  250. data/libs/enterprise-barcode/ext.yml +13 -0
  251. data/libs/enterprise-barcode/ext/barcode.xml +2144 -0
  252. data/libs/enterprise-barcode/ext/build +17 -0
  253. data/libs/enterprise-barcode/ext/build.bat +29 -0
  254. data/libs/enterprise-barcode/ext/platform/android/AndroidManifest.xml +31 -0
  255. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/AUTHORS +58 -0
  256. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/CHANGES +266 -0
  257. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/COPYING +201 -0
  258. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/README +11 -0
  259. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable-hdpi/cancel_icon.png +0 -0
  260. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable-hdpi/ok_icon.png +0 -0
  261. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable-hdpi/retake_icon.png +0 -0
  262. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable/cancel_icon.png +0 -0
  263. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable/ok_icon.png +0 -0
  264. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable/retake_icon.png +0 -0
  265. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/layout/capture.xml +122 -0
  266. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/raw/beep.ogg +0 -0
  267. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/values/attrs.xml +20 -0
  268. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/values/colors.xml +42 -0
  269. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/values/ids.xml +31 -0
  270. data/libs/enterprise-barcode/ext/platform/android/adds/lib/armeabi/liballbarcode.a +0 -0
  271. data/libs/enterprise-barcode/ext/platform/android/adds/lib/x86/liballbarcode.a +0 -0
  272. data/libs/enterprise-barcode/ext/platform/android/allbarcode.jar +0 -0
  273. data/libs/enterprise-barcode/ext/platform/iphone/Barcode.xcodeproj/project.pbxproj +524 -0
  274. data/libs/enterprise-barcode/ext/platform/iphone/Barcode_Prefix.pch +7 -0
  275. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeCallbackHelper.h +27 -0
  276. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeCallbackHelper.mm +231 -0
  277. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewController.h +95 -0
  278. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewController.m +1017 -0
  279. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewFactory.h +7 -0
  280. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewFactory.mm +58 -0
  281. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewFactoryRegister.mm +18 -0
  282. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewManager.h +16 -0
  283. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewManager.mm +32 -0
  284. data/libs/enterprise-barcode/ext/platform/iphone/Classes/ImageProvider.cpp +25 -0
  285. data/libs/enterprise-barcode/ext/platform/iphone/Classes/ImageProvider.h +15 -0
  286. data/libs/enterprise-barcode/ext/platform/iphone/Classes/ImageProvider.mm +159 -0
  287. data/libs/enterprise-barcode/ext/platform/iphone/Classes/barcode.m +123 -0
  288. data/libs/enterprise-barcode/ext/platform/iphone/Rakefile +69 -0
  289. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/COPYING +27 -0
  290. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h +45 -0
  291. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h +111 -0
  292. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h +60 -0
  293. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImage.h +69 -0
  294. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h +51 -0
  295. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h +142 -0
  296. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h +135 -0
  297. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h +130 -0
  298. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h +34 -0
  299. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h +71 -0
  300. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar.h +1497 -0
  301. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h +202 -0
  302. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h +187 -0
  303. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Image.h +321 -0
  304. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h +130 -0
  305. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Processor.h +223 -0
  306. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h +162 -0
  307. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h +528 -0
  308. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Video.h +170 -0
  309. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Window.h +136 -0
  310. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/LICENSE +504 -0
  311. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/README +59 -0
  312. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-back.png +0 -0
  313. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-help.html +88 -0
  314. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-helpicons.png +0 -0
  315. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-samples.png +0 -0
  316. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/libzbar.a +0 -0
  317. data/libs/enterprise-barcode/ext/platform/iphone/impl/Barcode.h +21 -0
  318. data/libs/enterprise-barcode/ext/platform/iphone/impl/Barcode.m +132 -0
  319. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeFactory.h +10 -0
  320. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeFactory.m +16 -0
  321. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeFactorySingleton.m +16 -0
  322. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeSetup.m +8 -0
  323. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeSingleton.h +17 -0
  324. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeSingleton.m +22 -0
  325. data/libs/enterprise-barcode/ext/platform/iphone/impl/readme.txt +7 -0
  326. data/libs/enterprise-barcode/ext/platform/wm/Barcode.sln +44 -0
  327. data/libs/enterprise-barcode/ext/platform/wm/Barcode.vcproj +836 -0
  328. data/libs/enterprise-barcode/ext/platform/wm/Barcode.vsprops +15 -0
  329. data/libs/enterprise-barcode/ext/platform/wm/readme.txt +0 -0
  330. data/libs/enterprise-barcode/ext/platform/wm/src/Barcode_impl.cpp +376 -0
  331. data/libs/enterprise-barcode/ext/platform/wm/src/DecodeNotifier.cpp +173 -0
  332. data/libs/enterprise-barcode/ext/platform/wm/src/DecodeNotifier.h +149 -0
  333. data/libs/enterprise-barcode/ext/platform/wm/src/EMDKInterfaceAbstraction.cpp +476 -0
  334. data/libs/enterprise-barcode/ext/platform/wm/src/GetDecoderProperties.cpp +1195 -0
  335. data/libs/enterprise-barcode/ext/platform/wm/src/GetScannerProperties.cpp +553 -0
  336. data/libs/enterprise-barcode/ext/platform/wm/src/KeyInjector.cpp +177 -0
  337. data/libs/enterprise-barcode/ext/platform/wm/src/KeyInjector.h +40 -0
  338. data/libs/enterprise-barcode/ext/platform/wm/src/NotificationLoader.cpp +76 -0
  339. data/libs/enterprise-barcode/ext/platform/wm/src/NotificationLoader.h +44 -0
  340. data/libs/enterprise-barcode/ext/platform/wm/src/RSM.cpp +1211 -0
  341. data/libs/enterprise-barcode/ext/platform/wm/src/Scanner.cpp +2609 -0
  342. data/libs/enterprise-barcode/ext/platform/wm/src/Scanner.h +1099 -0
  343. data/libs/enterprise-barcode/ext/platform/wm/src/ScannerDefines.h +322 -0
  344. data/libs/enterprise-barcode/ext/platform/wm/src/SetDecoderProperties.cpp +2106 -0
  345. data/libs/enterprise-barcode/ext/platform/wm/src/SetScannerProperties.cpp +1060 -0
  346. data/libs/enterprise-barcode/ext/platform/wm/src/Utilities.cpp +184 -0
  347. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeImpl.csproj +119 -0
  348. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeImpl.props +8 -0
  349. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeImpl.targets +35 -0
  350. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeLib.props +18 -0
  351. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeLib.vcxproj +185 -0
  352. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeLib.vcxproj.filters +58 -0
  353. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.Graphics.Imaging.dll +0 -0
  354. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.Graphics.Imaging.winmd +0 -0
  355. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.Graphics.Imaging.xml +4813 -0
  356. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.InteropServices.WindowsRuntime.dll +0 -0
  357. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.InteropServices.WindowsRuntime.winmd +0 -0
  358. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.InteropServices.WindowsRuntime.xml +41 -0
  359. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/OpticalReaderLib.dll +0 -0
  360. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib.XML +68 -0
  361. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib.dll +0 -0
  362. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/BarcodeReaderLib.csproj +120 -0
  363. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/BarcodeReaderLib.sln +34 -0
  364. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/CameraNavigatePage.xaml +32 -0
  365. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/CameraNavigatePage.xaml.cs +235 -0
  366. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/OpticalReaderTask.cs +182 -0
  367. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/Properties/AssemblyInfo.cs +37 -0
  368. data/libs/enterprise-barcode/ext/platform/wp8/lib/Nokia.Graphics.Imaging.Managed.dll +0 -0
  369. data/libs/enterprise-barcode/ext/platform/wp8/lib/Nokia.Graphics.Imaging.Managed.xml +341 -0
  370. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.Graphics.Imaging.dll +0 -0
  371. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.Graphics.Imaging.winmd +0 -0
  372. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.Graphics.Imaging.xml +4813 -0
  373. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.InteropServices.WindowsRuntime.dll +0 -0
  374. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.InteropServices.WindowsRuntime.winmd +0 -0
  375. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.InteropServices.WindowsRuntime.xml +41 -0
  376. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/OpticalReaderLib.dll +0 -0
  377. data/libs/enterprise-barcode/ext/platform/wp8/lib/zxing.wp8.0.XML +10324 -0
  378. data/libs/enterprise-barcode/ext/platform/wp8/lib/zxing.wp8.0.dll +0 -0
  379. data/libs/enterprise-barcode/ext/platform/wp8/src/Barcode_impl.cs +630 -0
  380. data/libs/enterprise-barcode/ext/platform/wp8/src/Properties/AssemblyInfo.cs +37 -0
  381. data/libs/enterprise-barcode/public/api/generated/Rho.Barcode.js +772 -0
  382. data/libs/ie/rhobrowser.dll +0 -0
  383. data/libs/nodejs.rb +2 -0
  384. data/libs/nodejs/ext.yml +25 -0
  385. data/libs/nodejs/ext/Nodejs.xml +37 -0
  386. data/libs/nodejs/ext/build +19 -0
  387. data/libs/nodejs/ext/build.bat +29 -0
  388. data/libs/nodejs/ext/platform/android/Rakefile +161 -0
  389. data/libs/nodejs/ext/platform/android/ext_native.files +8 -0
  390. data/libs/nodejs/ext/platform/android/jxCore/jx.h +134 -0
  391. data/libs/nodejs/ext/platform/android/jxCore/jx_result.h +221 -0
  392. data/libs/nodejs/ext/platform/android/jxCore/libcares_arm.a +0 -0
  393. data/libs/nodejs/ext/platform/android/jxCore/libcares_ia32.a +0 -0
  394. data/libs/nodejs/ext/platform/android/jxCore/libcares_x64.a +0 -0
  395. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_arm.a +0 -0
  396. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_ia32.a +0 -0
  397. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_x64.a +0 -0
  398. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_arm.a +0 -0
  399. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_ia32.a +0 -0
  400. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_x64.a +0 -0
  401. data/libs/nodejs/ext/platform/android/jxCore/libjx_arm.a +0 -0
  402. data/libs/nodejs/ext/platform/android/jxCore/libjx_ia32.a +0 -0
  403. data/libs/nodejs/ext/platform/android/jxCore/libjx_x64.a +0 -0
  404. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_arm.a +0 -0
  405. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_ia32.a +0 -0
  406. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_x64.a +0 -0
  407. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_arm.a +0 -0
  408. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_ia32.a +0 -0
  409. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_x64.a +0 -0
  410. data/libs/nodejs/ext/platform/android/jxCore/libuv_arm.a +0 -0
  411. data/libs/nodejs/ext/platform/android/jxCore/libuv_ia32.a +0 -0
  412. data/libs/nodejs/ext/platform/android/jxCore/libuv_x64.a +0 -0
  413. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_arm.a +0 -0
  414. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_ia32.a +0 -0
  415. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_x64.a +0 -0
  416. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_arm.a +0 -0
  417. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_ia32.a +0 -0
  418. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_x64.a +0 -0
  419. data/libs/nodejs/ext/platform/iphone/Nodejs.xcodeproj/project.pbxproj +350 -0
  420. data/libs/nodejs/ext/platform/iphone/Nodejs_Prefix.pch +7 -0
  421. data/libs/nodejs/ext/platform/iphone/Rakefile +73 -0
  422. data/libs/nodejs/ext/platform/iphone/jxCore/jx.h +134 -0
  423. data/libs/nodejs/ext/platform/iphone/jxCore/jx_result.h +221 -0
  424. data/libs/nodejs/ext/platform/iphone/jxCore/libcares.a +0 -0
  425. data/libs/nodejs/ext/platform/iphone/jxCore/libchrome_zlib.a +0 -0
  426. data/libs/nodejs/ext/platform/iphone/jxCore/libhttp_parser.a +0 -0
  427. data/libs/nodejs/ext/platform/iphone/jxCore/libjx.a +0 -0
  428. data/libs/nodejs/ext/platform/iphone/jxCore/libmozjs.a +0 -0
  429. data/libs/nodejs/ext/platform/iphone/jxCore/libopenssl.a +0 -0
  430. data/libs/nodejs/ext/platform/iphone/jxCore/libsqlite3.a +0 -0
  431. data/libs/nodejs/ext/platform/iphone/jxCore/libuv.a +0 -0
  432. data/libs/nodejs/ext/shared/jxcore/jx.h +134 -0
  433. data/libs/nodejs/ext/shared/jxcore/jx_result.h +221 -0
  434. data/libs/nodejs/ext/shared/jxcoretau.cpp +454 -0
  435. data/libs/nodejs/ext/shared/jxcoretau.h +20 -0
  436. data/libs/nodejs/ext/shared/nodejs_impl.cpp +106 -0
  437. data/libs/nodejs/nodejs.rb +2 -0
  438. data/libs/openssl-edge.rb +2 -0
  439. data/libs/openssl-edge/ext.yml +4 -0
  440. data/libs/openssl-edge/ext/Rakefile +145 -0
  441. data/libs/openssl-edge/ext/android/Rakefile +107 -0
  442. data/libs/openssl-edge/ext/android/ext_native.files +32 -0
  443. data/libs/openssl-edge/ext/android/extconf.h +91 -0
  444. data/libs/openssl-edge/ext/build +12 -0
  445. data/libs/openssl-edge/ext/build.bat +5 -0
  446. data/libs/openssl-edge/ext/extconf.rb +141 -0
  447. data/libs/openssl-edge/ext/openssl.pro +109 -0
  448. data/libs/openssl-edge/ext/openssl.sln +52 -0
  449. data/libs/openssl-edge/ext/openssl.vcproj +1010 -0
  450. data/libs/openssl-edge/ext/openssl_missing.c +1163 -0
  451. data/libs/openssl-edge/ext/openssl_missing.h +537 -0
  452. data/libs/openssl-edge/ext/ossl.c +1203 -0
  453. data/libs/openssl-edge/ext/ossl.h +242 -0
  454. data/libs/openssl-edge/ext/ossl_asn1.c +2008 -0
  455. data/libs/openssl-edge/ext/ossl_asn1.h +66 -0
  456. data/libs/openssl-edge/ext/ossl_bio.c +118 -0
  457. data/libs/openssl-edge/ext/ossl_bio.h +19 -0
  458. data/libs/openssl-edge/ext/ossl_bn.c +1153 -0
  459. data/libs/openssl-edge/ext/ossl_bn.h +23 -0
  460. data/libs/openssl-edge/ext/ossl_cipher.c +1085 -0
  461. data/libs/openssl-edge/ext/ossl_cipher.h +20 -0
  462. data/libs/openssl-edge/ext/ossl_config.c +89 -0
  463. data/libs/openssl-edge/ext/ossl_config.h +19 -0
  464. data/libs/openssl-edge/ext/ossl_digest.c +453 -0
  465. data/libs/openssl-edge/ext/ossl_digest.h +20 -0
  466. data/libs/openssl-edge/ext/ossl_engine.c +580 -0
  467. data/libs/openssl-edge/ext/ossl_engine.h +19 -0
  468. data/libs/openssl-edge/ext/ossl_hmac.c +398 -0
  469. data/libs/openssl-edge/ext/ossl_hmac.h +18 -0
  470. data/libs/openssl-edge/ext/ossl_ns_spki.c +406 -0
  471. data/libs/openssl-edge/ext/ossl_ns_spki.h +19 -0
  472. data/libs/openssl-edge/ext/ossl_ocsp.c +2013 -0
  473. data/libs/openssl-edge/ext/ossl_ocsp.h +23 -0
  474. data/libs/openssl-edge/ext/ossl_pkcs12.c +261 -0
  475. data/libs/openssl-edge/ext/ossl_pkcs12.h +13 -0
  476. data/libs/openssl-edge/ext/ossl_pkcs5.c +180 -0
  477. data/libs/openssl-edge/ext/ossl_pkcs5.h +6 -0
  478. data/libs/openssl-edge/ext/ossl_pkcs7.c +1157 -0
  479. data/libs/openssl-edge/ext/ossl_pkcs7.h +20 -0
  480. data/libs/openssl-edge/ext/ossl_pkey.c +469 -0
  481. data/libs/openssl-edge/ext/ossl_pkey.h +245 -0
  482. data/libs/openssl-edge/ext/ossl_pkey_dh.c +650 -0
  483. data/libs/openssl-edge/ext/ossl_pkey_dsa.c +672 -0
  484. data/libs/openssl-edge/ext/ossl_pkey_ec.c +1806 -0
  485. data/libs/openssl-edge/ext/ossl_pkey_rsa.c +768 -0
  486. data/libs/openssl-edge/ext/ossl_rand.c +238 -0
  487. data/libs/openssl-edge/ext/ossl_rand.h +18 -0
  488. data/libs/openssl-edge/ext/ossl_ssl.c +2724 -0
  489. data/libs/openssl-edge/ext/ossl_ssl.h +41 -0
  490. data/libs/openssl-edge/ext/ossl_ssl_session.c +352 -0
  491. data/libs/openssl-edge/ext/ossl_version.h +15 -0
  492. data/libs/openssl-edge/ext/ossl_x509.c +186 -0
  493. data/libs/openssl-edge/ext/ossl_x509.h +119 -0
  494. data/libs/openssl-edge/ext/ossl_x509attr.c +328 -0
  495. data/libs/openssl-edge/ext/ossl_x509cert.c +863 -0
  496. data/libs/openssl-edge/ext/ossl_x509crl.c +565 -0
  497. data/libs/openssl-edge/ext/ossl_x509ext.c +480 -0
  498. data/libs/openssl-edge/ext/ossl_x509name.c +547 -0
  499. data/libs/openssl-edge/ext/ossl_x509req.c +492 -0
  500. data/libs/openssl-edge/ext/ossl_x509revoked.c +279 -0
  501. data/libs/openssl-edge/ext/ossl_x509store.c +846 -0
  502. data/libs/openssl-edge/ext/ruby_missing.h +32 -0
  503. data/libs/openssl-edge/openssl-edge.rb +2 -0
  504. data/libs/openssl-edge/openssl.rb +24 -0
  505. data/libs/openssl-edge/openssl/bn.rb +35 -0
  506. data/libs/openssl-edge/openssl/buffering.rb +341 -0
  507. data/libs/openssl-edge/openssl/cipher.rb +65 -0
  508. data/libs/openssl-edge/openssl/digest.rb +61 -0
  509. data/libs/openssl-edge/openssl/ssl-internal.rb +180 -0
  510. data/libs/openssl-edge/openssl/ssl.rb +1 -0
  511. data/libs/openssl-edge/openssl/x509-internal.rb +153 -0
  512. data/libs/openssl-edge/openssl/x509.rb +1 -0
  513. data/libs/openssl.so-edge.rb +2 -0
  514. data/libs/openssl.so-edge/ext.yml +8 -0
  515. data/libs/openssl.so-edge/ext/Rakefile +140 -0
  516. data/libs/openssl.so-edge/ext/android/armeabi/libcrypto.a +0 -0
  517. data/libs/openssl.so-edge/ext/android/armeabi/libssl.a +0 -0
  518. data/libs/openssl.so-edge/ext/android/x86/libcrypto.a +0 -0
  519. data/libs/openssl.so-edge/ext/android/x86/libssl.a +0 -0
  520. data/libs/openssl.so-edge/ext/build +12 -0
  521. data/libs/openssl.so-edge/ext/build.bat +1 -0
  522. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/dh/dh_locl.h +56 -0
  523. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/dsa/dsa_locl.h +76 -0
  524. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/evp/evp_locl.h +66 -0
  525. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/hmac/hmac_lcl.h +33 -0
  526. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/asn1_int.h +94 -0
  527. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/async.h +14 -0
  528. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_conf.h +28 -0
  529. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_dh.h +17 -0
  530. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_int.h +82 -0
  531. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_srp.h +32 -0
  532. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/chacha.h +49 -0
  533. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/cryptlib.h +81 -0
  534. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/cryptlib_int.h +31 -0
  535. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/dso_conf.h +16 -0
  536. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/engine.h +20 -0
  537. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/err_int.h +17 -0
  538. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/evp_int.h +382 -0
  539. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/md32_common.h +383 -0
  540. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/objects.h +12 -0
  541. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/poly1305.h +19 -0
  542. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/rand.h +20 -0
  543. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/x509_int.h +267 -0
  544. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/ocsp/ocsp_lcl.h +216 -0
  545. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/rsa/rsa_locl.h +96 -0
  546. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/x509/x509_lcl.h +142 -0
  547. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/e_os.h +520 -0
  548. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/bio.h +26 -0
  549. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/comp.h +12 -0
  550. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/conf.h +32 -0
  551. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/constant_time_locl.h +185 -0
  552. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dane.h +103 -0
  553. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dso.h +216 -0
  554. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/err.h +15 -0
  555. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/numbers.h +68 -0
  556. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/o_dir.h +63 -0
  557. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/o_str.h +17 -0
  558. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/thread_once.h +42 -0
  559. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/__DECC_INCLUDE_EPILOGUE.H +16 -0
  560. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/__DECC_INCLUDE_PROLOGUE.H +20 -0
  561. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/aes.h +92 -0
  562. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1.h +1096 -0
  563. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1_mac.h +10 -0
  564. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1t.h +924 -0
  565. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/async.h +98 -0
  566. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bio.h +854 -0
  567. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/blowfish.h +61 -0
  568. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bn.h +575 -0
  569. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/buffer.h +76 -0
  570. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/camellia.h +83 -0
  571. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/cast.h +53 -0
  572. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/cmac.h +41 -0
  573. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/cms.h +512 -0
  574. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/comp.h +72 -0
  575. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf.h +216 -0
  576. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf_api.h +40 -0
  577. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/crypto.h +463 -0
  578. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ct.h +518 -0
  579. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/des.h +174 -0
  580. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dh.h +343 -0
  581. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dsa.h +282 -0
  582. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dtls1.h +56 -0
  583. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/e_os2.h +311 -0
  584. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ebcdic.h +33 -0
  585. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ec.h +1581 -0
  586. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ecdh.h +10 -0
  587. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ecdsa.h +10 -0
  588. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/engine.h +842 -0
  589. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/err.h +259 -0
  590. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/evp.h +1586 -0
  591. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/hmac.h +49 -0
  592. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/idea.h +64 -0
  593. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/kdf.h +75 -0
  594. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/lhash.h +204 -0
  595. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/md2.h +44 -0
  596. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/md4.h +51 -0
  597. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/md5.h +50 -0
  598. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/mdc2.h +42 -0
  599. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/modes.h +203 -0
  600. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/obj_mac.h +4577 -0
  601. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/objects.h +1097 -0
  602. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ocsp.h +409 -0
  603. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h +169 -0
  604. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h.in +141 -0
  605. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslv.h +105 -0
  606. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ossl_typ.h +190 -0
  607. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pem.h +501 -0
  608. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pem2.h +20 -0
  609. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pkcs12.h +282 -0
  610. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pkcs7.h +404 -0
  611. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rand.h +89 -0
  612. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rc2.h +51 -0
  613. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rc4.h +36 -0
  614. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rc5.h +63 -0
  615. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ripemd.h +47 -0
  616. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rsa.h +588 -0
  617. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/safestack.h +164 -0
  618. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/seed.h +98 -0
  619. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/sha.h +119 -0
  620. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srp.h +131 -0
  621. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srtp.h +50 -0
  622. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl.h +2527 -0
  623. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl2.h +24 -0
  624. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl3.h +307 -0
  625. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/stack.h +78 -0
  626. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/symhacks.h +52 -0
  627. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/tls1.h +972 -0
  628. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ts.h +643 -0
  629. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/txt_db.h +57 -0
  630. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ui.h +368 -0
  631. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/whrlpool.h +48 -0
  632. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509.h +1123 -0
  633. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509_vfy.h +539 -0
  634. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509v3.h +1005 -0
  635. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/packet_locl.h +555 -0
  636. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/record/record.h +240 -0
  637. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/record/record_locl.h +114 -0
  638. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/ssl_locl.h +2127 -0
  639. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/statem/statem.h +123 -0
  640. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/statem/statem_locl.h +124 -0
  641. data/libs/openssl.so-edge/openssl.so.rb +2 -0
  642. data/libs/webkit.rb +2 -0
  643. data/libs/webkit/ext.yml +4 -0
  644. data/libs/webkit/ext/build +12 -0
  645. data/libs/webkit/ext/build.bat +7 -0
  646. data/libs/webkit/ext/wm/Rakefile +61 -0
  647. data/libs/webkit/ext/wm/RhoMsgs.cpp +17 -0
  648. data/libs/webkit/ext/wm/RhoMsgs.h +14 -0
  649. data/libs/webkit/ext/wm/RhoWKBrowserEngine.cpp +736 -0
  650. data/libs/webkit/ext/wm/RhoWKBrowserEngine.h +105 -0
  651. data/libs/webkit/ext/wm/lib/npapi/rhobridge.dll +0 -0
  652. data/libs/webkit/ext/wm/lib/rhoengine_defs.h +80 -0
  653. data/libs/webkit/ext/wm/lib/rhowebkit.dll +0 -0
  654. data/libs/webkit/ext/wm/webkit.sln +36 -0
  655. data/libs/webkit/ext/wm/webkit.suo +0 -0
  656. data/libs/webkit/ext/wm/webkit.vcproj +800 -0
  657. data/libs/webkit/ext/wm/webkit.vsprops +20 -0
  658. data/libs/webkit/webkit.rb +2 -0
  659. data/rho-tau-extensions.gemspec +23 -0
  660. data/version +1 -0
  661. metadata +705 -0
@@ -0,0 +1,1163 @@
1
+ /*
2
+ * 'OpenSSL for Ruby' project
3
+ * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
4
+ * All rights reserved.
5
+ */
6
+ /*
7
+ * This program is licensed under the same licence as Ruby.
8
+ * (See the file 'LICENCE'.)
9
+ */
10
+
11
+ //TAU
12
+ #if defined(WIN32) || defined (WINCE)
13
+ #include "windows/extconf.h"
14
+ #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
15
+
16
+ #include <TargetConditionals.h>
17
+
18
+ #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
19
+
20
+ #include "iphone/extconf.h"
21
+
22
+ #else
23
+ #include "macosx/extconf.h"
24
+ #endif
25
+
26
+ #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
27
+ #elif defined(ANDROID)
28
+ #include "android/extconf.h"
29
+ #endif
30
+ //TAU
31
+
32
+ #include <string.h> /* memcpy() */
33
+ #if !defined(OPENSSL_NO_ENGINE)
34
+ # include <openssl/engine.h>
35
+ #endif
36
+ #if !defined(OPENSSL_NO_HMAC)
37
+ # include <openssl/hmac.h>
38
+ #endif
39
+ #include <openssl/x509_vfy.h>
40
+
41
+ #include "ossl.h"
42
+
43
+ #include "openssl_missing.h"
44
+
45
+
46
+ //TAU
47
+
48
+ //TAU
49
+ //array.c
50
+ # define ARY_SHARED_P(ary) \
51
+ (assert(!FL_TEST(ary, ELTS_SHARED) || !FL_TEST(ary, RARRAY_EMBED_FLAG)), \
52
+ FL_TEST(ary,ELTS_SHARED)!=0)
53
+
54
+ # define ARY_EMBED_P(ary) \
55
+ (assert(!FL_TEST(ary, ELTS_SHARED) || !FL_TEST(ary, RARRAY_EMBED_FLAG)), \
56
+ FL_TEST(ary, RARRAY_EMBED_FLAG)!=0)
57
+
58
+
59
+ #define ARY_SET_PTR(ary, p) do { \
60
+ assert(!ARY_EMBED_P(ary)); \
61
+ assert(!OBJ_FROZEN(ary)); \
62
+ RARRAY(ary)->as.heap.ptr = (p); \
63
+ } while (0)
64
+ #define ARY_SET_EMBED_LEN(ary, n) do { \
65
+ long tmp_n = n; \
66
+ assert(ARY_EMBED_P(ary)); \
67
+ assert(!OBJ_FROZEN(ary)); \
68
+ RBASIC(ary)->flags &= ~RARRAY_EMBED_LEN_MASK; \
69
+ RBASIC(ary)->flags |= (tmp_n) << RARRAY_EMBED_LEN_SHIFT; \
70
+ } while (0)
71
+ #define ARY_SET_HEAP_LEN(ary, n) do { \
72
+ assert(!ARY_EMBED_P(ary)); \
73
+ RARRAY(ary)->as.heap.len = n; \
74
+ } while (0)
75
+
76
+
77
+
78
+ #define ARY_SET_PTR(ary, p) do { \
79
+ assert(!ARY_EMBED_P(ary)); \
80
+ assert(!OBJ_FROZEN(ary)); \
81
+ RARRAY(ary)->as.heap.ptr = (p); \
82
+ } while (0)
83
+
84
+ #define ARY_SET_LEN(ary, n) do { \
85
+ if (ARY_EMBED_P(ary)) { \
86
+ ARY_SET_EMBED_LEN(ary, n); \
87
+ } \
88
+ else { \
89
+ ARY_SET_HEAP_LEN(ary, n); \
90
+ } \
91
+ assert(RARRAY_LEN(ary) == n); \
92
+ } while (0)
93
+
94
+ #define ARY_SET(a, i, v) RARRAY_ASET((assert(!ARY_SHARED_P(a)), (a)), (i), (v))
95
+
96
+ VALUE
97
+ (rb_ary_new_from_args)(long n, ...)
98
+ {
99
+ va_list ar;
100
+ VALUE ary;
101
+ long i;
102
+
103
+ ary = rb_ary_new2(n);
104
+
105
+ va_start(ar, n);
106
+ for (i=0; i<n; i++) {
107
+ ARY_SET(ary, i, va_arg(ar, VALUE));
108
+ }
109
+ va_end(ar);
110
+
111
+ ARY_SET_LEN(ary, n);
112
+ return ary;
113
+ }
114
+
115
+ //bignum.c
116
+
117
+ #define BDIGITS(x) (RBIGNUM_DIGITS(x))
118
+ #define BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG)
119
+ #define BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1)))
120
+
121
+
122
+ #ifndef SIZEOF_BDIGIT_DBL
123
+ # if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
124
+ # define SIZEOF_BDIGIT_DBL SIZEOF_LONG_LONG
125
+ # else
126
+ # define SIZEOF_BDIGIT_DBL SIZEOF_LONG
127
+ # endif
128
+ #endif
129
+
130
+ //TAU
131
+ #ifndef swap16
132
+ # ifdef HAVE_BUILTIN___BUILTIN_BSWAP16
133
+ # define swap16(x) __builtin_bswap16(x)
134
+ # endif
135
+ #endif
136
+
137
+ #ifndef swap16
138
+ # define swap16(x) ((uint16_t)((((x)&0xFF)<<8) | (((x)>>8)&0xFF)))
139
+ #endif
140
+
141
+ #ifndef swap32
142
+ # ifdef HAVE_BUILTIN___BUILTIN_BSWAP32
143
+ # define swap32(x) __builtin_bswap32(x)
144
+ # endif
145
+ #endif
146
+
147
+ #ifndef swap32
148
+ # define swap32(x) ((uint32_t)((((x)&0xFF)<<24) \
149
+ |(((x)>>24)&0xFF) \
150
+ |(((x)&0x0000FF00)<<8) \
151
+ |(((x)&0x00FF0000)>>8) ))
152
+ #endif
153
+
154
+ #ifndef swap64
155
+ # ifdef HAVE_BUILTIN___BUILTIN_BSWAP64
156
+ # define swap64(x) __builtin_bswap64(x)
157
+ # endif
158
+ #endif
159
+
160
+ #ifndef swap64
161
+ # ifdef HAVE_INT64_T
162
+ # define byte_in_64bit(n) ((uint64_t)0xff << (n))
163
+ # define swap64(x) ((uint64_t)((((x)&byte_in_64bit(0))<<56) \
164
+ |(((x)>>56)&0xFF) \
165
+ |(((x)&byte_in_64bit(8))<<40) \
166
+ |(((x)&byte_in_64bit(48))>>40) \
167
+ |(((x)&byte_in_64bit(16))<<24) \
168
+ |(((x)&byte_in_64bit(40))>>24) \
169
+ |(((x)&byte_in_64bit(24))<<8) \
170
+ |(((x)&byte_in_64bit(32))>>8)))
171
+ # endif
172
+ #endif
173
+
174
+ #if SIZEOF_BDIGIT == 2
175
+ # define swap_bdigit(x) swap16(x)
176
+ #elif SIZEOF_BDIGIT == 4
177
+ # define swap_bdigit(x) swap32(x)
178
+ #elif SIZEOF_BDIGIT == 8
179
+ # define swap_bdigit(x) swap64(x)
180
+ #endif
181
+
182
+
183
+ #define roomof(x, y) (((x) + (y) - 1) / (y))
184
+ #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
185
+
186
+
187
+ #define bdigit_roomof(n) roomof(n, SIZEOF_BDIGIT)
188
+
189
+ #define ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2))
190
+
191
+ #define LSHIFTABLE(d, n) ((n) < sizeof(d) * CHAR_BIT)
192
+ #define LSHIFTX(d, n) (!LSHIFTABLE(d, n) ? 0 : ((d) << (!LSHIFTABLE(d, n) ? 0 : (n))))
193
+ #define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits)))
194
+ #define FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1))
195
+ #define POW2_P(x) (((x)&((x)-1))==0)
196
+
197
+ #define BDIGITS_ZERO(ptr, n) do { \
198
+ BDIGIT *bdigitz_zero_ptr = (ptr); \
199
+ size_t bdigitz_zero_n = (n); \
200
+ while (bdigitz_zero_n) { \
201
+ *bdigitz_zero_ptr++ = 0; \
202
+ bdigitz_zero_n--; \
203
+ } \
204
+ } while (0)
205
+
206
+
207
+
208
+ #ifdef WORDS_BIGENDIAN
209
+ # define HOST_BIGENDIAN_P 1
210
+ #else
211
+ # define HOST_BIGENDIAN_P 0
212
+ #endif
213
+
214
+
215
+ #define INTEGER_PACK_WORDORDER_MASK \
216
+ (INTEGER_PACK_MSWORD_FIRST | \
217
+ INTEGER_PACK_LSWORD_FIRST)
218
+ #define INTEGER_PACK_BYTEORDER_MASK \
219
+ (INTEGER_PACK_MSBYTE_FIRST | \
220
+ INTEGER_PACK_LSBYTE_FIRST | \
221
+ INTEGER_PACK_NATIVE_BYTE_ORDER)
222
+
223
+ static void
224
+ integer_pack_loop_setup(
225
+ size_t numwords, size_t wordsize, size_t nails, int flags,
226
+ size_t *word_num_fullbytes_ret,
227
+ int *word_num_partialbits_ret,
228
+ size_t *word_start_ret,
229
+ ssize_t *word_step_ret,
230
+ size_t *word_last_ret,
231
+ size_t *byte_start_ret,
232
+ int *byte_step_ret)
233
+ {
234
+ int wordorder_bits = flags & INTEGER_PACK_WORDORDER_MASK;
235
+ int byteorder_bits = flags & INTEGER_PACK_BYTEORDER_MASK;
236
+ size_t word_num_fullbytes;
237
+ int word_num_partialbits;
238
+ size_t word_start;
239
+ ssize_t word_step;
240
+ size_t word_last;
241
+ size_t byte_start;
242
+ int byte_step;
243
+
244
+ word_num_partialbits = CHAR_BIT - (int)(nails % CHAR_BIT);
245
+ if (word_num_partialbits == CHAR_BIT)
246
+ word_num_partialbits = 0;
247
+ word_num_fullbytes = wordsize - (nails / CHAR_BIT);
248
+ if (word_num_partialbits != 0) {
249
+ word_num_fullbytes--;
250
+ }
251
+
252
+ if (wordorder_bits == INTEGER_PACK_MSWORD_FIRST) {
253
+ word_start = wordsize*(numwords-1);
254
+ word_step = -(ssize_t)wordsize;
255
+ word_last = 0;
256
+ }
257
+ else {
258
+ word_start = 0;
259
+ word_step = wordsize;
260
+ word_last = wordsize*(numwords-1);
261
+ }
262
+
263
+ if (byteorder_bits == INTEGER_PACK_NATIVE_BYTE_ORDER) {
264
+ #ifdef WORDS_BIGENDIAN
265
+ byteorder_bits = INTEGER_PACK_MSBYTE_FIRST;
266
+ #else
267
+ byteorder_bits = INTEGER_PACK_LSBYTE_FIRST;
268
+ #endif
269
+ }
270
+ if (byteorder_bits == INTEGER_PACK_MSBYTE_FIRST) {
271
+ byte_start = wordsize-1;
272
+ byte_step = -1;
273
+ }
274
+ else {
275
+ byte_start = 0;
276
+ byte_step = 1;
277
+ }
278
+
279
+ *word_num_partialbits_ret = word_num_partialbits;
280
+ *word_num_fullbytes_ret = word_num_fullbytes;
281
+ *word_start_ret = word_start;
282
+ *word_step_ret = word_step;
283
+ *word_last_ret = word_last;
284
+ *byte_start_ret = byte_start;
285
+ *byte_step_ret = byte_step;
286
+ }
287
+
288
+ #define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT)
289
+
290
+
291
+ static inline void
292
+ integer_pack_fill_dd(BDIGIT **dpp, BDIGIT **dep, BDIGIT_DBL *ddp, int *numbits_in_dd_p)
293
+ {
294
+ if (*dpp < *dep && BITSPERDIG <= (int)sizeof(*ddp) * CHAR_BIT - *numbits_in_dd_p) {
295
+ *ddp |= (BDIGIT_DBL)(*(*dpp)++) << *numbits_in_dd_p;
296
+ *numbits_in_dd_p += BITSPERDIG;
297
+ }
298
+ else if (*dpp == *dep) {
299
+ /* higher bits are infinity zeros */
300
+ *numbits_in_dd_p = (int)sizeof(*ddp) * CHAR_BIT;
301
+ }
302
+ }
303
+
304
+ static inline BDIGIT_DBL
305
+ integer_pack_take_lowbits(int n, BDIGIT_DBL *ddp, int *numbits_in_dd_p)
306
+ {
307
+ BDIGIT_DBL ret;
308
+ ret = (*ddp) & (((BDIGIT_DBL)1 << n) - 1);
309
+ *ddp >>= n;
310
+ *numbits_in_dd_p -= n;
311
+ return ret;
312
+ }
313
+
314
+
315
+ static void
316
+ validate_integer_pack_format(size_t numwords, size_t wordsize, size_t nails, int flags, int supported_flags)
317
+ {
318
+ int wordorder_bits = flags & INTEGER_PACK_WORDORDER_MASK;
319
+ int byteorder_bits = flags & INTEGER_PACK_BYTEORDER_MASK;
320
+
321
+ if (flags & ~supported_flags) {
322
+ rb_raise(rb_eArgError, "unsupported flags specified");
323
+ }
324
+ if (wordorder_bits == 0) {
325
+ if (1 < numwords)
326
+ rb_raise(rb_eArgError, "word order not specified");
327
+ }
328
+ else if (wordorder_bits != INTEGER_PACK_MSWORD_FIRST &&
329
+ wordorder_bits != INTEGER_PACK_LSWORD_FIRST)
330
+ rb_raise(rb_eArgError, "unexpected word order");
331
+ if (byteorder_bits == 0) {
332
+ rb_raise(rb_eArgError, "byte order not specified");
333
+ }
334
+ else if (byteorder_bits != INTEGER_PACK_MSBYTE_FIRST &&
335
+ byteorder_bits != INTEGER_PACK_LSBYTE_FIRST &&
336
+ byteorder_bits != INTEGER_PACK_NATIVE_BYTE_ORDER)
337
+ rb_raise(rb_eArgError, "unexpected byte order");
338
+ if (wordsize == 0)
339
+ rb_raise(rb_eArgError, "invalid wordsize: %"PRI_SIZE_PREFIX"u", wordsize);
340
+ if (SSIZE_MAX < wordsize)
341
+ rb_raise(rb_eArgError, "too big wordsize: %"PRI_SIZE_PREFIX"u", wordsize);
342
+ if (wordsize <= nails / CHAR_BIT)
343
+ rb_raise(rb_eArgError, "too big nails: %"PRI_SIZE_PREFIX"u", nails);
344
+ if (SIZE_MAX / wordsize < numwords)
345
+ rb_raise(rb_eArgError, "too big numwords * wordsize: %"PRI_SIZE_PREFIX"u * %"PRI_SIZE_PREFIX"u", numwords, wordsize);
346
+ }
347
+
348
+ #if !defined(WORDS_BIGENDIAN)
349
+ static int
350
+ bytes_2comp(unsigned char *buf, size_t len)
351
+ {
352
+ size_t i;
353
+ for (i = 0; i < len; i++)
354
+ buf[i] = ~buf[i];
355
+ for (i = 0; i < len; i++) {
356
+ buf[i]++;
357
+ if (buf[i] != 0)
358
+ return 0;
359
+ }
360
+ return 1;
361
+ }
362
+ #endif
363
+
364
+ static int
365
+ bary_2comp(BDIGIT *ds, size_t n)
366
+ {
367
+ size_t i;
368
+ i = 0;
369
+ for (i = 0; i < n; i++) {
370
+ if (ds[i] != 0) {
371
+ goto non_zero;
372
+ }
373
+ }
374
+ return 1;
375
+
376
+ non_zero:
377
+ ds[i] = BIGLO(~ds[i] + 1);
378
+ i++;
379
+ for (; i < n; i++) {
380
+ ds[i] = BIGLO(~ds[i]);
381
+ }
382
+ return 0;
383
+ }
384
+
385
+ static void
386
+ bary_swap(BDIGIT *ds, size_t num_bdigits)
387
+ {
388
+ BDIGIT *p1 = ds;
389
+ BDIGIT *p2 = ds + num_bdigits - 1;
390
+ for (; p1 < p2; p1++, p2--) {
391
+ BDIGIT tmp = *p1;
392
+ *p1 = *p2;
393
+ *p2 = tmp;
394
+ }
395
+ }
396
+
397
+
398
+
399
+ static int
400
+ bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
401
+ {
402
+ BDIGIT *dp, *de;
403
+ unsigned char *buf, *bufend;
404
+
405
+ dp = ds;
406
+ de = ds + num_bdigits;
407
+
408
+ validate_integer_pack_format(numwords, wordsize, nails, flags,
409
+ INTEGER_PACK_MSWORD_FIRST|
410
+ INTEGER_PACK_LSWORD_FIRST|
411
+ INTEGER_PACK_MSBYTE_FIRST|
412
+ INTEGER_PACK_LSBYTE_FIRST|
413
+ INTEGER_PACK_NATIVE_BYTE_ORDER|
414
+ INTEGER_PACK_2COMP|
415
+ INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION);
416
+
417
+ while (dp < de && de[-1] == 0)
418
+ de--;
419
+ if (dp == de) {
420
+ sign = 0;
421
+ }
422
+
423
+ if (!(flags & INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION)) {
424
+ if (sign == 0) {
425
+ MEMZERO(words, unsigned char, numwords * wordsize);
426
+ return 0;
427
+ }
428
+ if (nails == 0 && numwords == 1) {
429
+ int need_swap = wordsize != 1 &&
430
+ (flags & INTEGER_PACK_BYTEORDER_MASK) != INTEGER_PACK_NATIVE_BYTE_ORDER &&
431
+ ((flags & INTEGER_PACK_MSBYTE_FIRST) ? !HOST_BIGENDIAN_P : HOST_BIGENDIAN_P);
432
+ if (0 < sign || !(flags & INTEGER_PACK_2COMP)) {
433
+ BDIGIT d;
434
+ if (wordsize == 1) {
435
+ *((unsigned char *)words) = (unsigned char)(d = dp[0]);
436
+ return ((1 < de - dp || CLEAR_LOWBITS(d, 8) != 0) ? 2 : 1) * sign;
437
+ }
438
+ #if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGIT
439
+ if (wordsize == 2 && (uintptr_t)words % ALIGNOF(uint16_t) == 0) {
440
+ uint16_t u = (uint16_t)(d = dp[0]);
441
+ if (need_swap) u = swap16(u);
442
+ *((uint16_t *)words) = u;
443
+ return ((1 < de - dp || CLEAR_LOWBITS(d, 16) != 0) ? 2 : 1) * sign;
444
+ }
445
+ #endif
446
+ #if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGIT
447
+ if (wordsize == 4 && (uintptr_t)words % ALIGNOF(uint32_t) == 0) {
448
+ uint32_t u = (uint32_t)(d = dp[0]);
449
+ if (need_swap) u = swap32(u);
450
+ *((uint32_t *)words) = u;
451
+ return ((1 < de - dp || CLEAR_LOWBITS(d, 32) != 0) ? 2 : 1) * sign;
452
+ }
453
+ #endif
454
+ #if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGIT
455
+ if (wordsize == 8 && (uintptr_t)words % ALIGNOF(uint64_t) == 0) {
456
+ uint64_t u = (uint64_t)(d = dp[0]);
457
+ if (need_swap) u = swap64(u);
458
+ *((uint64_t *)words) = u;
459
+ return ((1 < de - dp || CLEAR_LOWBITS(d, 64) != 0) ? 2 : 1) * sign;
460
+ }
461
+ #endif
462
+ }
463
+ else { /* sign < 0 && (flags & INTEGER_PACK_2COMP) */
464
+ BDIGIT_DBL_SIGNED d;
465
+ if (wordsize == 1) {
466
+ *((unsigned char *)words) = (unsigned char)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
467
+ return (1 < de - dp || FILL_LOWBITS(d, 8) != -1) ? -2 : -1;
468
+ }
469
+ #if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGIT
470
+ if (wordsize == 2 && (uintptr_t)words % ALIGNOF(uint16_t) == 0) {
471
+ uint16_t u = (uint16_t)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
472
+ if (need_swap) u = swap16(u);
473
+ *((uint16_t *)words) = u;
474
+ return (wordsize == SIZEOF_BDIGIT && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
475
+ (1 < de - dp || FILL_LOWBITS(d, 16) != -1) ? -2 : -1;
476
+ }
477
+ #endif
478
+ #if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGIT
479
+ if (wordsize == 4 && (uintptr_t)words % ALIGNOF(uint32_t) == 0) {
480
+ uint32_t u = (uint32_t)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
481
+ if (need_swap) u = swap32(u);
482
+ *((uint32_t *)words) = u;
483
+ return (wordsize == SIZEOF_BDIGIT && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
484
+ (1 < de - dp || FILL_LOWBITS(d, 32) != -1) ? -2 : -1;
485
+ }
486
+ #endif
487
+ #if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGIT
488
+ if (wordsize == 8 && (uintptr_t)words % ALIGNOF(uint64_t) == 0) {
489
+ uint64_t u = (uint64_t)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
490
+ if (need_swap) u = swap64(u);
491
+ *((uint64_t *)words) = u;
492
+ return (wordsize == SIZEOF_BDIGIT && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
493
+ (1 < de - dp || FILL_LOWBITS(d, 64) != -1) ? -2 : -1;
494
+ }
495
+ #endif
496
+ }
497
+ }
498
+ #if !defined(WORDS_BIGENDIAN)
499
+ if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) &&
500
+ (flags & INTEGER_PACK_WORDORDER_MASK) == INTEGER_PACK_LSWORD_FIRST &&
501
+ (flags & INTEGER_PACK_BYTEORDER_MASK) != INTEGER_PACK_MSBYTE_FIRST) {
502
+ size_t src_size = (de - dp) * SIZEOF_BDIGIT;
503
+ size_t dst_size = numwords * wordsize;
504
+ int overflow = 0;
505
+ while (0 < src_size && ((unsigned char *)ds)[src_size-1] == 0)
506
+ src_size--;
507
+ if (src_size <= dst_size) {
508
+ MEMCPY(words, dp, char, src_size);
509
+ MEMZERO((char*)words + src_size, char, dst_size - src_size);
510
+ }
511
+ else {
512
+ MEMCPY(words, dp, char, dst_size);
513
+ overflow = 1;
514
+ }
515
+ if (sign < 0 && (flags & INTEGER_PACK_2COMP)) {
516
+ int zero_p = bytes_2comp(words, dst_size);
517
+ if (zero_p && overflow) {
518
+ unsigned char *p = (unsigned char *)dp;
519
+ if (dst_size == src_size-1 &&
520
+ p[dst_size] == 1) {
521
+ overflow = 0;
522
+ }
523
+ }
524
+ }
525
+ if (overflow)
526
+ sign *= 2;
527
+ return sign;
528
+ }
529
+ #endif
530
+ if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) &&
531
+ wordsize % SIZEOF_BDIGIT == 0 && (uintptr_t)words % ALIGNOF(BDIGIT) == 0) {
532
+ size_t bdigits_per_word = wordsize / SIZEOF_BDIGIT;
533
+ size_t src_num_bdigits = de - dp;
534
+ size_t dst_num_bdigits = numwords * bdigits_per_word;
535
+ int overflow = 0;
536
+ int mswordfirst_p = (flags & INTEGER_PACK_MSWORD_FIRST) != 0;
537
+ int msbytefirst_p = (flags & INTEGER_PACK_NATIVE_BYTE_ORDER) ? HOST_BIGENDIAN_P :
538
+ (flags & INTEGER_PACK_MSBYTE_FIRST) != 0;
539
+ if (src_num_bdigits <= dst_num_bdigits) {
540
+ MEMCPY(words, dp, BDIGIT, src_num_bdigits);
541
+ BDIGITS_ZERO((BDIGIT*)words + src_num_bdigits, dst_num_bdigits - src_num_bdigits);
542
+ }
543
+ else {
544
+ MEMCPY(words, dp, BDIGIT, dst_num_bdigits);
545
+ overflow = 1;
546
+ }
547
+ if (sign < 0 && (flags & INTEGER_PACK_2COMP)) {
548
+ int zero_p = bary_2comp(words, dst_num_bdigits);
549
+ if (zero_p && overflow &&
550
+ dst_num_bdigits == src_num_bdigits-1 &&
551
+ dp[dst_num_bdigits] == 1)
552
+ overflow = 0;
553
+ }
554
+ if (msbytefirst_p != HOST_BIGENDIAN_P) {
555
+ size_t i;
556
+ for (i = 0; i < dst_num_bdigits; i++) {
557
+ BDIGIT d = ((BDIGIT*)words)[i];
558
+ ((BDIGIT*)words)[i] = swap_bdigit(d);
559
+ }
560
+ }
561
+ if (mswordfirst_p ? !msbytefirst_p : msbytefirst_p) {
562
+ size_t i;
563
+ BDIGIT *p = words;
564
+ for (i = 0; i < numwords; i++) {
565
+ bary_swap(p, bdigits_per_word);
566
+ p += bdigits_per_word;
567
+ }
568
+ }
569
+ if (mswordfirst_p) {
570
+ bary_swap(words, dst_num_bdigits);
571
+ }
572
+ if (overflow)
573
+ sign *= 2;
574
+ return sign;
575
+ }
576
+ }
577
+
578
+ buf = words;
579
+ bufend = buf + numwords * wordsize;
580
+
581
+ if (buf == bufend) {
582
+ /* overflow if non-zero*/
583
+ if (!(flags & INTEGER_PACK_2COMP) || 0 <= sign)
584
+ sign *= 2;
585
+ else {
586
+ if (de - dp == 1 && dp[0] == 1)
587
+ sign = -1; /* val == -1 == -2**(numwords*(wordsize*CHAR_BIT-nails)) */
588
+ else
589
+ sign = -2; /* val < -1 == -2**(numwords*(wordsize*CHAR_BIT-nails)) */
590
+ }
591
+ }
592
+ else if (dp == de) {
593
+ memset(buf, '\0', bufend - buf);
594
+ }
595
+ else if (dp < de && buf < bufend) {
596
+ int word_num_partialbits;
597
+ size_t word_num_fullbytes;
598
+
599
+ ssize_t word_step;
600
+ size_t byte_start;
601
+ int byte_step;
602
+
603
+ size_t word_start, word_last;
604
+ unsigned char *wordp, *last_wordp;
605
+ BDIGIT_DBL dd;
606
+ int numbits_in_dd;
607
+
608
+ integer_pack_loop_setup(numwords, wordsize, nails, flags,
609
+ &word_num_fullbytes, &word_num_partialbits,
610
+ &word_start, &word_step, &word_last, &byte_start, &byte_step);
611
+
612
+ wordp = buf + word_start;
613
+ last_wordp = buf + word_last;
614
+
615
+ dd = 0;
616
+ numbits_in_dd = 0;
617
+
618
+ #define FILL_DD \
619
+ integer_pack_fill_dd(&dp, &de, &dd, &numbits_in_dd)
620
+ #define TAKE_LOWBITS(n) \
621
+ integer_pack_take_lowbits(n, &dd, &numbits_in_dd)
622
+
623
+ while (1) {
624
+ size_t index_in_word = 0;
625
+ unsigned char *bytep = wordp + byte_start;
626
+ while (index_in_word < word_num_fullbytes) {
627
+ FILL_DD;
628
+ *bytep = TAKE_LOWBITS(CHAR_BIT);
629
+ bytep += byte_step;
630
+ index_in_word++;
631
+ }
632
+ if (word_num_partialbits) {
633
+ FILL_DD;
634
+ *bytep = TAKE_LOWBITS(word_num_partialbits);
635
+ bytep += byte_step;
636
+ index_in_word++;
637
+ }
638
+ while (index_in_word < wordsize) {
639
+ *bytep = 0;
640
+ bytep += byte_step;
641
+ index_in_word++;
642
+ }
643
+
644
+ if (wordp == last_wordp)
645
+ break;
646
+
647
+ wordp += word_step;
648
+ }
649
+ FILL_DD;
650
+ /* overflow tests */
651
+ if (dp != de || 1 < dd) {
652
+ /* 2**(numwords*(wordsize*CHAR_BIT-nails)+1) <= abs(val) */
653
+ sign *= 2;
654
+ }
655
+ else if (dd == 1) {
656
+ /* 2**(numwords*(wordsize*CHAR_BIT-nails)) <= abs(val) < 2**(numwords*(wordsize*CHAR_BIT-nails)+1) */
657
+ if (!(flags & INTEGER_PACK_2COMP) || 0 <= sign)
658
+ sign *= 2;
659
+ else { /* overflow_2comp && sign == -1 */
660
+ /* test lower bits are all zero. */
661
+ dp = ds;
662
+ while (dp < de && *dp == 0)
663
+ dp++;
664
+ if (de - dp == 1 && /* only one non-zero word. */
665
+ POW2_P(*dp)) /* *dp contains only one bit set. */
666
+ sign = -1; /* val == -2**(numwords*(wordsize*CHAR_BIT-nails)) */
667
+ else
668
+ sign = -2; /* val < -2**(numwords*(wordsize*CHAR_BIT-nails)) */
669
+ }
670
+ }
671
+ }
672
+
673
+ if ((flags & INTEGER_PACK_2COMP) && (sign < 0 && numwords != 0)) {
674
+ unsigned char *buf;
675
+
676
+ int word_num_partialbits;
677
+ size_t word_num_fullbytes;
678
+
679
+ ssize_t word_step;
680
+ size_t byte_start;
681
+ int byte_step;
682
+
683
+ size_t word_start, word_last;
684
+ unsigned char *wordp, *last_wordp;
685
+
686
+ unsigned int partialbits_mask;
687
+ int carry;
688
+
689
+ integer_pack_loop_setup(numwords, wordsize, nails, flags,
690
+ &word_num_fullbytes, &word_num_partialbits,
691
+ &word_start, &word_step, &word_last, &byte_start, &byte_step);
692
+
693
+ partialbits_mask = (1 << word_num_partialbits) - 1;
694
+
695
+ buf = words;
696
+ wordp = buf + word_start;
697
+ last_wordp = buf + word_last;
698
+
699
+ carry = 1;
700
+ while (1) {
701
+ size_t index_in_word = 0;
702
+ unsigned char *bytep = wordp + byte_start;
703
+ while (index_in_word < word_num_fullbytes) {
704
+ carry += (unsigned char)~*bytep;
705
+ *bytep = (unsigned char)carry;
706
+ carry >>= CHAR_BIT;
707
+ bytep += byte_step;
708
+ index_in_word++;
709
+ }
710
+ if (word_num_partialbits) {
711
+ carry += (*bytep & partialbits_mask) ^ partialbits_mask;
712
+ *bytep = carry & partialbits_mask;
713
+ carry >>= word_num_partialbits;
714
+ bytep += byte_step;
715
+ index_in_word++;
716
+ }
717
+
718
+ if (wordp == last_wordp)
719
+ break;
720
+
721
+ wordp += word_step;
722
+ }
723
+ }
724
+
725
+ return sign;
726
+ #undef FILL_DD
727
+ #undef TAKE_LOWBITS
728
+ }
729
+
730
+ static int
731
+ nlz(BDIGIT x)
732
+ {
733
+ BDIGIT y;
734
+ int n = BITSPERDIG;
735
+ #if BITSPERDIG > 64
736
+ y = x >> 64; if (y) {n -= 64; x = y;}
737
+ #endif
738
+ #if BITSPERDIG > 32
739
+ y = x >> 32; if (y) {n -= 32; x = y;}
740
+ #endif
741
+ #if BITSPERDIG > 16
742
+ y = x >> 16; if (y) {n -= 16; x = y;}
743
+ #endif
744
+ y = x >> 8; if (y) {n -= 8; x = y;}
745
+ y = x >> 4; if (y) {n -= 4; x = y;}
746
+ y = x >> 2; if (y) {n -= 2; x = y;}
747
+ y = x >> 1; if (y) {return n - 2;}
748
+ return n - x;
749
+ }
750
+
751
+
752
+ /*
753
+ * Calculate the number of bytes to be required to represent
754
+ * the absolute value of the integer given as _val_.
755
+ *
756
+ * [val] an integer.
757
+ * [nlz_bits_ret] number of leading zero bits in the most significant byte is returned if not NULL.
758
+ *
759
+ * This function returns ((val_numbits * CHAR_BIT + CHAR_BIT - 1) / CHAR_BIT)
760
+ * where val_numbits is the number of bits of abs(val).
761
+ * This function should not overflow.
762
+ *
763
+ * If nlz_bits_ret is not NULL,
764
+ * (return_value * CHAR_BIT - val_numbits) is stored in *nlz_bits_ret.
765
+ * In this case, 0 <= *nlz_bits_ret < CHAR_BIT.
766
+ *
767
+ */
768
+ size_t
769
+ rb_absint_size(VALUE val, int *nlz_bits_ret)
770
+ {
771
+ BDIGIT *dp;
772
+ BDIGIT *de;
773
+ BDIGIT fixbuf[bdigit_roomof(sizeof(long))];
774
+
775
+ int num_leading_zeros;
776
+
777
+ val = rb_to_int(val);
778
+
779
+ if (FIXNUM_P(val)) {
780
+ long v = FIX2LONG(val);
781
+ if (v < 0) {
782
+ v = -v;
783
+ }
784
+ #if SIZEOF_BDIGIT >= SIZEOF_LONG
785
+ fixbuf[0] = v;
786
+ #else
787
+ {
788
+ int i;
789
+ for (i = 0; i < numberof(fixbuf); i++) {
790
+ fixbuf[i] = BIGLO(v);
791
+ v = BIGDN(v);
792
+ }
793
+ }
794
+ #endif
795
+ dp = fixbuf;
796
+ de = fixbuf + numberof(fixbuf);
797
+ }
798
+ else {
799
+ dp = BDIGITS(val);
800
+ de = dp + BIGNUM_LEN(val);
801
+ }
802
+ while (dp < de && de[-1] == 0)
803
+ de--;
804
+ if (dp == de) {
805
+ if (nlz_bits_ret)
806
+ *nlz_bits_ret = 0;
807
+ return 0;
808
+ }
809
+ num_leading_zeros = nlz(de[-1]);
810
+ if (nlz_bits_ret)
811
+ *nlz_bits_ret = num_leading_zeros % CHAR_BIT;
812
+ return (de - dp) * SIZEOF_BDIGIT - num_leading_zeros / CHAR_BIT;
813
+ }
814
+
815
+ /*
816
+ * Export an integer into a buffer.
817
+ *
818
+ * This function fills the buffer specified by _words_ and _numwords_ as
819
+ * val in the format specified by _wordsize_, _nails_ and _flags_.
820
+ *
821
+ * [val] Fixnum, Bignum or another integer like object which has to_int method.
822
+ * [words] buffer to export abs(val).
823
+ * [numwords] the size of given buffer as number of words.
824
+ * [wordsize] the size of word as number of bytes.
825
+ * [nails] number of padding bits in a word.
826
+ * Most significant nails bits of each word are filled by zero.
827
+ * [flags] bitwise or of constants which name starts "INTEGER_PACK_".
828
+ *
829
+ * flags:
830
+ * [INTEGER_PACK_MSWORD_FIRST] Store the most significant word as the first word.
831
+ * [INTEGER_PACK_LSWORD_FIRST] Store the least significant word as the first word.
832
+ * [INTEGER_PACK_MSBYTE_FIRST] Store the most significant byte in a word as the first byte in the word.
833
+ * [INTEGER_PACK_LSBYTE_FIRST] Store the least significant byte in a word as the first byte in the word.
834
+ * [INTEGER_PACK_NATIVE_BYTE_ORDER] INTEGER_PACK_MSBYTE_FIRST or INTEGER_PACK_LSBYTE_FIRST corresponding to the host's endian.
835
+ * [INTEGER_PACK_2COMP] Use 2's complement representation.
836
+ * [INTEGER_PACK_LITTLE_ENDIAN] Same as INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_LSBYTE_FIRST
837
+ * [INTEGER_PACK_BIG_ENDIAN] Same as INTEGER_PACK_MSWORD_FIRST|INTEGER_PACK_MSBYTE_FIRST
838
+ * [INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION] Use generic implementation (for test and debug).
839
+ *
840
+ * This function fills the buffer specified by _words_
841
+ * as abs(val) if INTEGER_PACK_2COMP is not specified in _flags_.
842
+ * If INTEGER_PACK_2COMP is specified, 2's complement representation of val is
843
+ * filled in the buffer.
844
+ *
845
+ * This function returns the signedness and overflow condition.
846
+ * The overflow condition depends on INTEGER_PACK_2COMP.
847
+ *
848
+ * INTEGER_PACK_2COMP is not specified:
849
+ * -2 : negative overflow. val <= -2**(numwords*(wordsize*CHAR_BIT-nails))
850
+ * -1 : negative without overflow. -2**(numwords*(wordsize*CHAR_BIT-nails)) < val < 0
851
+ * 0 : zero. val == 0
852
+ * 1 : positive without overflow. 0 < val < 2**(numwords*(wordsize*CHAR_BIT-nails))
853
+ * 2 : positive overflow. 2**(numwords*(wordsize*CHAR_BIT-nails)) <= val
854
+ *
855
+ * INTEGER_PACK_2COMP is specified:
856
+ * -2 : negative overflow. val < -2**(numwords*(wordsize*CHAR_BIT-nails))
857
+ * -1 : negative without overflow. -2**(numwords*(wordsize*CHAR_BIT-nails)) <= val < 0
858
+ * 0 : zero. val == 0
859
+ * 1 : positive without overflow. 0 < val < 2**(numwords*(wordsize*CHAR_BIT-nails))
860
+ * 2 : positive overflow. 2**(numwords*(wordsize*CHAR_BIT-nails)) <= val
861
+ *
862
+ * The value, -2**(numwords*(wordsize*CHAR_BIT-nails)), is representable
863
+ * in 2's complement representation but not representable in absolute value.
864
+ * So -1 is returned for the value if INTEGER_PACK_2COMP is specified
865
+ * but returns -2 if INTEGER_PACK_2COMP is not specified.
866
+ *
867
+ * The least significant words are filled in the buffer when overflow occur.
868
+ */
869
+
870
+ int
871
+ rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
872
+ {
873
+ int sign;
874
+ BDIGIT *ds;
875
+ size_t num_bdigits;
876
+ BDIGIT fixbuf[bdigit_roomof(sizeof(long))];
877
+
878
+ RB_GC_GUARD(val) = rb_to_int(val);
879
+
880
+ if (FIXNUM_P(val)) {
881
+ long v = FIX2LONG(val);
882
+ if (v < 0) {
883
+ sign = -1;
884
+ v = -v;
885
+ }
886
+ else {
887
+ sign = 1;
888
+ }
889
+ #if SIZEOF_BDIGIT >= SIZEOF_LONG
890
+ fixbuf[0] = v;
891
+ #else
892
+ {
893
+ int i;
894
+ for (i = 0; i < numberof(fixbuf); i++) {
895
+ fixbuf[i] = BIGLO(v);
896
+ v = BIGDN(v);
897
+ }
898
+ }
899
+ #endif
900
+ ds = fixbuf;
901
+ num_bdigits = numberof(fixbuf);
902
+ }
903
+ else {
904
+ sign = BIGNUM_POSITIVE_P(val) ? 1 : -1;
905
+ ds = BDIGITS(val);
906
+ num_bdigits = BIGNUM_LEN(val);
907
+ }
908
+
909
+ return bary_pack(sign, ds, num_bdigits, words, numwords, wordsize, nails, flags);
910
+ }
911
+
912
+ //gc.c
913
+ //TAU
914
+ # define ATOMIC_EXCHANGE(var, val) ruby_atomic_exchange(&(var), (val))
915
+
916
+ # ifndef ATOMIC_VALUE_EXCHANGE
917
+ # define ATOMIC_VALUE_EXCHANGE(var, val) ATOMIC_EXCHANGE(var, val)
918
+ # endif
919
+
920
+ # ifndef ATOMIC_PTR_EXCHANGE
921
+ # define ATOMIC_PTR_EXCHANGE(var, val) ATOMIC_EXCHANGE(var, val)
922
+ # endif
923
+
924
+
925
+ void
926
+ rb_free_tmp_buffer(volatile VALUE *store)
927
+ {
928
+ VALUE s = ATOMIC_VALUE_EXCHANGE(*store, 0);
929
+ if (s) {
930
+ void *ptr = ATOMIC_PTR_EXCHANGE(RNODE(s)->u1.node, 0);
931
+ RNODE(s)->u3.cnt = 0;
932
+ ruby_xfree(ptr);
933
+ }
934
+ }
935
+
936
+ void
937
+ ruby_malloc_size_overflow(size_t count, size_t elsize)
938
+ {
939
+ rb_raise(rb_eArgError,
940
+ "malloc: possible integer overflow (%"PRIdSIZE"*%"PRIdSIZE")",
941
+ count, elsize);
942
+ }
943
+
944
+ static void *
945
+ ruby_xmalloc0(size_t size)
946
+ {
947
+ //TAU
948
+ return ruby_xmalloc(size);
949
+ //return objspace_xmalloc0(&rb_objspace, size);
950
+ }
951
+
952
+
953
+ void *
954
+ rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t size, size_t cnt)
955
+ {
956
+ NODE *s;
957
+ void *ptr;
958
+
959
+ s = rb_node_newnode(NODE_ALLOCA, 0, 0, 0);
960
+ ptr = ruby_xmalloc0(size);
961
+ s->u1.value = (VALUE)ptr;
962
+ s->u3.cnt = cnt;
963
+ *store = (VALUE)s;
964
+ return ptr;
965
+ }
966
+
967
+ //hash.c
968
+ //TAU
969
+ VALUE
970
+ rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
971
+ {
972
+ RB_OBJ_WRITE(hash, (&RHASH(hash)->ifnone), ifnone);
973
+ return hash;
974
+ }
975
+ //
976
+
977
+ //signal.c
978
+ //TAU
979
+ #ifdef _WIN32
980
+ typedef LONG rb_atomic_t;
981
+
982
+ # define ATOMIC_TEST(var) InterlockedExchange(&(var), 0)
983
+ # define ATOMIC_SET(var, val) InterlockedExchange(&(var), (val))
984
+ # define ATOMIC_INC(var) InterlockedIncrement(&(var))
985
+ # define ATOMIC_DEC(var) InterlockedDecrement(&(var))
986
+
987
+ #else
988
+ typedef int rb_atomic_t;
989
+
990
+ # define ATOMIC_TEST(var) ((var) ? ((var) = 0, 1) : 0)
991
+ # define ATOMIC_SET(var, val) ((var) = (val))
992
+ # define ATOMIC_INC(var) (++(var))
993
+ # define ATOMIC_DEC(var) (--(var))
994
+ #endif
995
+
996
+ rb_atomic_t
997
+ ruby_atomic_exchange(rb_atomic_t *ptr, rb_atomic_t val)
998
+ {
999
+ rb_atomic_t old = *ptr;
1000
+ *ptr = val;
1001
+ return old;
1002
+ }
1003
+ //TAU
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+ /* added in 0.9.8X */
1014
+ #if !defined(HAVE_EVP_CIPHER_CTX_NEW)
1015
+ EVP_CIPHER_CTX *
1016
+ EVP_CIPHER_CTX_new(void)
1017
+ {
1018
+ EVP_CIPHER_CTX *ctx = OPENSSL_malloc(sizeof(EVP_CIPHER_CTX));
1019
+ if (!ctx)
1020
+ return NULL;
1021
+ EVP_CIPHER_CTX_init(ctx);
1022
+ return ctx;
1023
+ }
1024
+ #endif
1025
+
1026
+ #if !defined(HAVE_EVP_CIPHER_CTX_FREE)
1027
+ void
1028
+ EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
1029
+ {
1030
+ if (ctx) {
1031
+ EVP_CIPHER_CTX_cleanup(ctx);
1032
+ OPENSSL_free(ctx);
1033
+ }
1034
+ }
1035
+ #endif
1036
+
1037
+ /* added in 1.0.0 */
1038
+ #if !defined(HAVE_EVP_CIPHER_CTX_COPY)
1039
+ /*
1040
+ * this function does not exist in OpenSSL yet... or ever?.
1041
+ * a future version may break this function.
1042
+ * tested on 0.9.7d.
1043
+ */
1044
+ int
1045
+ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
1046
+ {
1047
+ memcpy(out, in, sizeof(EVP_CIPHER_CTX));
1048
+
1049
+ #if !defined(OPENSSL_NO_ENGINE)
1050
+ if (in->engine) ENGINE_add(out->engine);
1051
+ if (in->cipher_data) {
1052
+ out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size);
1053
+ memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size);
1054
+ }
1055
+ #endif
1056
+
1057
+ return 1;
1058
+ }
1059
+ #endif
1060
+
1061
+ #if !defined(OPENSSL_NO_HMAC)
1062
+ #if !defined(HAVE_HMAC_CTX_COPY)
1063
+ int
1064
+ HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in)
1065
+ {
1066
+ if (!out || !in)
1067
+ return 0;
1068
+
1069
+ memcpy(out, in, sizeof(HMAC_CTX));
1070
+
1071
+ EVP_MD_CTX_copy(&out->md_ctx, &in->md_ctx);
1072
+ EVP_MD_CTX_copy(&out->i_ctx, &in->i_ctx);
1073
+ EVP_MD_CTX_copy(&out->o_ctx, &in->o_ctx);
1074
+
1075
+ return 1;
1076
+ }
1077
+ #endif /* HAVE_HMAC_CTX_COPY */
1078
+ #endif /* NO_HMAC */
1079
+
1080
+ /* added in 1.0.2 */
1081
+ #if !defined(OPENSSL_NO_EC)
1082
+ #if !defined(HAVE_EC_CURVE_NIST2NID)
1083
+ static struct {
1084
+ const char *name;
1085
+ int nid;
1086
+ } nist_curves[] = {
1087
+ {"B-163", NID_sect163r2},
1088
+ {"B-233", NID_sect233r1},
1089
+ {"B-283", NID_sect283r1},
1090
+ {"B-409", NID_sect409r1},
1091
+ {"B-571", NID_sect571r1},
1092
+ {"K-163", NID_sect163k1},
1093
+ {"K-233", NID_sect233k1},
1094
+ {"K-283", NID_sect283k1},
1095
+ {"K-409", NID_sect409k1},
1096
+ {"K-571", NID_sect571k1},
1097
+ {"P-192", NID_X9_62_prime192v1},
1098
+ {"P-224", NID_secp224r1},
1099
+ {"P-256", NID_X9_62_prime256v1},
1100
+ {"P-384", NID_secp384r1},
1101
+ {"P-521", NID_secp521r1}
1102
+ };
1103
+
1104
+ int
1105
+ EC_curve_nist2nid(const char *name)
1106
+ {
1107
+ size_t i;
1108
+ for (i = 0; i < (sizeof(nist_curves) / sizeof(nist_curves[0])); i++) {
1109
+ if (!strcmp(nist_curves[i].name, name))
1110
+ return nist_curves[i].nid;
1111
+ }
1112
+ return NID_undef;
1113
+ }
1114
+ #endif
1115
+ #endif
1116
+
1117
+ /*** added in 1.1.0 ***/
1118
+ #if !defined(HAVE_HMAC_CTX_NEW)
1119
+ HMAC_CTX *
1120
+ HMAC_CTX_new(void)
1121
+ {
1122
+ HMAC_CTX *ctx = OPENSSL_malloc(sizeof(HMAC_CTX));
1123
+ if (!ctx)
1124
+ return NULL;
1125
+ HMAC_CTX_init(ctx);
1126
+ return ctx;
1127
+ }
1128
+ #endif
1129
+
1130
+ #if !defined(HAVE_HMAC_CTX_FREE)
1131
+ void
1132
+ HMAC_CTX_free(HMAC_CTX *ctx)
1133
+ {
1134
+ if (ctx) {
1135
+ HMAC_CTX_cleanup(ctx);
1136
+ OPENSSL_free(ctx);
1137
+ }
1138
+ }
1139
+ #endif
1140
+
1141
+ #if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
1142
+ void
1143
+ X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
1144
+ const X509_ALGOR **palg)
1145
+ {
1146
+ if (psig != NULL)
1147
+ *psig = crl->signature;
1148
+ if (palg != NULL)
1149
+ *palg = crl->sig_alg;
1150
+ }
1151
+ #endif
1152
+
1153
+ #if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
1154
+ void
1155
+ X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
1156
+ const X509_ALGOR **palg)
1157
+ {
1158
+ if (psig != NULL)
1159
+ *psig = req->signature;
1160
+ if (palg != NULL)
1161
+ *palg = req->sig_alg;
1162
+ }
1163
+ #endif