platform_ssl.php 3.2 KB

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