platform_ssl.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php
  2. $platform_id = Dever::input('set')['platform_id'] ?? 0;
  3. if (!$platform_id) {
  4. $platform_id = Dever::input('field')['platform_id'] ?? 0;
  5. }
  6. return array
  7. (
  8. 'list' => array
  9. (
  10. 'where' => array('platform_id' => $platform_id),
  11. 'field' => array
  12. (
  13. 'id',
  14. 'name',
  15. 'type',
  16. 'cdate',
  17. ),
  18. 'data_button' => array
  19. (
  20. '编辑' => array('fastedit', array('platform_id' => $platform_id)),
  21. ),
  22. 'button' => array
  23. (
  24. '新增' => array('fastadd', array('platform_id' => $platform_id)),
  25. ),
  26. 'search' => array
  27. (
  28. 'platform_id' => 'hidden',
  29. 'name',
  30. ),
  31. ),
  32. 'update' => array
  33. (
  34. 'tab' => array
  35. (
  36. '基本设置' => 'name,type,cipher_algo,option,iv,tag_len,aad,after',
  37. '加密设置' => 'encrypt_cert_type,encrypt_cert,encrypt_cert_id',
  38. '解密设置' => 'decrypt_cert_type,decrypt_cert,decrypt_cert_id',
  39. ),
  40. 'field' => array
  41. (
  42. 'platform_id' => 'hidden',
  43. 'name',
  44. 'type' => 'radio',
  45. 'cipher_algo' => array
  46. (
  47. 'desc' => '直接填写密码学方式的值,如aes-256-cbc',
  48. ),
  49. 'option' => array
  50. (
  51. 'desc' => '直接输入填充模式的常量即可,如:OPENSSL_NO_PADDING'
  52. ),
  53. 'iv' => array
  54. (
  55. 'desc' => '可以直接使用平台设置中的参数名',
  56. ),
  57. 'tag' => array
  58. (
  59. 'desc' => '可以直接使用平台设置中的参数名',
  60. ),
  61. 'tag_len',
  62. 'aad' => array
  63. (
  64. 'desc' => '可以直接使用平台设置中的参数名',
  65. ),
  66. 'after' => 'radio',
  67. 'encrypt_cert_type' => 'radio',
  68. 'encrypt_cert' => array
  69. (
  70. 'type' => 'text',
  71. 'desc' => '可以直接使用平台设置中的参数名',
  72. ),
  73. 'encrypt_cert_id' => array
  74. (
  75. 'type' => 'select',
  76. 'option' => 'Dever::call("api/cert.list", array('.$platform_id.'))',
  77. ),
  78. 'decrypt_cert_type' => 'radio',
  79. 'decrypt_cert' => array
  80. (
  81. 'type' => 'text',
  82. 'desc' => '可以直接使用平台设置中的参数名',
  83. ),
  84. 'decrypt_cert_id' => array
  85. (
  86. 'type' => 'select',
  87. 'option' => 'Dever::call("api/cert.list", array('.$platform_id.'))',
  88. ),
  89. ),
  90. 'control' => array
  91. (
  92. 'cipher_algo' => array
  93. (
  94. 'type' => array(2,3)
  95. ),
  96. 'option' => array
  97. (
  98. 'type' => array(1,2)
  99. ),
  100. 'iv' => array
  101. (
  102. 'type' => 2,
  103. ),
  104. 'tag' => array
  105. (
  106. 'type' => 2,
  107. ),
  108. 'aad' => array
  109. (
  110. 'type' => 2,
  111. ),
  112. 'tag_len' => array
  113. (
  114. 'type' => 2,
  115. ),
  116. 'encrypt_cert' => array
  117. (
  118. 'encrypt_cert_type' => 3,
  119. ),
  120. 'encrypt_cert_id' => array
  121. (
  122. 'encrypt_cert_type' => array(1,2),
  123. ),
  124. 'decrypt_cert' => array
  125. (
  126. 'decrypt_cert_type' => 3,
  127. ),
  128. 'decrypt_cert_id' => array
  129. (
  130. 'decrypt_cert_type' => array(1,2),
  131. ),
  132. ),
  133. ),
  134. );