handshake.yaml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
  2. #
  3. # Author: Chuck Lever <chuck.lever@oracle.com>
  4. #
  5. # Copyright (c) 2023, Oracle and/or its affiliates.
  6. #
  7. name: handshake
  8. protocol: genetlink
  9. doc: Netlink protocol to request a transport layer security handshake.
  10. definitions:
  11. -
  12. type: enum
  13. name: handler-class
  14. value-start: 0
  15. entries: [ none, tlshd, max ]
  16. -
  17. type: enum
  18. name: msg-type
  19. value-start: 0
  20. entries: [ unspec, clienthello, serverhello ]
  21. -
  22. type: enum
  23. name: auth
  24. value-start: 0
  25. entries: [ unspec, unauth, psk, x509 ]
  26. attribute-sets:
  27. -
  28. name: x509
  29. attributes:
  30. -
  31. name: cert
  32. type: s32
  33. -
  34. name: privkey
  35. type: s32
  36. -
  37. name: accept
  38. attributes:
  39. -
  40. name: sockfd
  41. type: s32
  42. -
  43. name: handler-class
  44. type: u32
  45. enum: handler-class
  46. -
  47. name: message-type
  48. type: u32
  49. enum: msg-type
  50. -
  51. name: timeout
  52. type: u32
  53. -
  54. name: auth-mode
  55. type: u32
  56. enum: auth
  57. -
  58. name: peer-identity
  59. type: u32
  60. multi-attr: true
  61. -
  62. name: certificate
  63. type: nest
  64. nested-attributes: x509
  65. multi-attr: true
  66. -
  67. name: peername
  68. type: string
  69. -
  70. name: done
  71. attributes:
  72. -
  73. name: status
  74. type: u32
  75. -
  76. name: sockfd
  77. type: s32
  78. -
  79. name: remote-auth
  80. type: u32
  81. multi-attr: true
  82. operations:
  83. list:
  84. -
  85. name: ready
  86. doc: Notify handlers that a new handshake request is waiting
  87. notify: accept
  88. -
  89. name: accept
  90. doc: Handler retrieves next queued handshake request
  91. attribute-set: accept
  92. flags: [ admin-perm ]
  93. do:
  94. request:
  95. attributes:
  96. - handler-class
  97. reply:
  98. attributes:
  99. - sockfd
  100. - message-type
  101. - timeout
  102. - auth-mode
  103. - peer-identity
  104. - certificate
  105. - peername
  106. -
  107. name: done
  108. doc: Handler reports handshake completion
  109. attribute-set: done
  110. do:
  111. request:
  112. attributes:
  113. - status
  114. - sockfd
  115. - remote-auth
  116. mcast-groups:
  117. list:
  118. -
  119. name: none
  120. -
  121. name: tlshd