ncpsign_kernel.h 700 B

123456789101112131415161718192021222324252627
  1. /*
  2. * ncpsign_kernel.h
  3. *
  4. * Arne de Bruijn (arne@knoware.nl), 1997
  5. *
  6. */
  7. #ifndef _NCPSIGN_KERNEL_H
  8. #define _NCPSIGN_KERNEL_H
  9. #ifdef CONFIG_NCPFS_PACKET_SIGNING
  10. void __sign_packet(struct ncp_server *server, const char *data, size_t size, __u32 totalsize, void *sign_buff);
  11. int sign_verify_reply(struct ncp_server *server, const char *data, size_t size, __u32 totalsize, const void *sign_buff);
  12. #endif
  13. static inline size_t sign_packet(struct ncp_server *server, const char *data, size_t size, __u32 totalsize, void *sign_buff) {
  14. #ifdef CONFIG_NCPFS_PACKET_SIGNING
  15. if (server->sign_active) {
  16. __sign_packet(server, data, size, totalsize, sign_buff);
  17. return 8;
  18. }
  19. #endif
  20. return 0;
  21. }
  22. #endif