crypt: Rename to packet_crypt.
Этот коммит содержится в:
родитель
acfc8ea83f
Коммит
b785014a15
@ -22,6 +22,8 @@
|
|||||||
#ifndef PACKET_H_
|
#ifndef PACKET_H_
|
||||||
#define PACKET_H_
|
#define PACKET_H_
|
||||||
|
|
||||||
|
struct ssh_socket_struct;
|
||||||
|
|
||||||
/* this structure should go someday */
|
/* this structure should go someday */
|
||||||
typedef struct packet_struct {
|
typedef struct packet_struct {
|
||||||
int valid;
|
int valid;
|
||||||
@ -58,5 +60,19 @@ int ssh_packet_send_unimplemented(ssh_session session, uint32_t seqnum);
|
|||||||
int ssh_packet_parse_type(ssh_session session);
|
int ssh_packet_parse_type(ssh_session session);
|
||||||
//int packet_flush(ssh_session session, int enforce_blocking);
|
//int packet_flush(ssh_session session, int enforce_blocking);
|
||||||
|
|
||||||
|
int ssh_packet_socket_callback(const void *data, size_t len, void *user);
|
||||||
|
void ssh_packet_register_socket_callback(ssh_session session, struct ssh_socket_struct *s);
|
||||||
|
void ssh_packet_set_callbacks(ssh_session session, ssh_packet_callbacks callbacks);
|
||||||
|
void ssh_packet_set_default_callbacks(ssh_session session);
|
||||||
|
void ssh_packet_process(ssh_session session, uint8_t type);
|
||||||
|
|
||||||
|
/* PACKET CRYPT */
|
||||||
|
uint32_t packet_decrypt_len(ssh_session session, char *crypted);
|
||||||
|
int packet_decrypt(ssh_session session, void *packet, unsigned int len);
|
||||||
|
unsigned char *packet_encrypt(ssh_session session,
|
||||||
|
void *packet,
|
||||||
|
unsigned int len);
|
||||||
|
int packet_hmac_verify(ssh_session session,ssh_buffer buffer,
|
||||||
|
unsigned char *mac);
|
||||||
|
|
||||||
#endif /* PACKET_H_ */
|
#endif /* PACKET_H_ */
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#ifndef POLL_H_
|
#ifndef POLL_H_
|
||||||
#define POLL_H_
|
#define POLL_H_
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef HAVE_POLL
|
#ifdef HAVE_POLL
|
||||||
@ -135,6 +136,7 @@ typedef struct ssh_poll_handle_struct *ssh_poll_handle;
|
|||||||
typedef int (*ssh_poll_callback)(ssh_poll_handle p, socket_t fd, int revents,
|
typedef int (*ssh_poll_callback)(ssh_poll_handle p, socket_t fd, int revents,
|
||||||
void *userdata);
|
void *userdata);
|
||||||
|
|
||||||
|
struct ssh_socket_struct;
|
||||||
|
|
||||||
ssh_poll_handle ssh_poll_new(socket_t fd, short events, ssh_poll_callback cb,
|
ssh_poll_handle ssh_poll_new(socket_t fd, short events, ssh_poll_callback cb,
|
||||||
void *userdata);
|
void *userdata);
|
||||||
|
@ -184,22 +184,6 @@ SSH_PACKET_CALLBACK(ssh_packet_dh_reply);
|
|||||||
SSH_PACKET_CALLBACK(ssh_packet_newkeys);
|
SSH_PACKET_CALLBACK(ssh_packet_newkeys);
|
||||||
SSH_PACKET_CALLBACK(ssh_packet_service_accept);
|
SSH_PACKET_CALLBACK(ssh_packet_service_accept);
|
||||||
|
|
||||||
/* in crypt.c */
|
|
||||||
uint32_t packet_decrypt_len(ssh_session session,char *crypted);
|
|
||||||
int packet_decrypt(ssh_session session, void *packet,unsigned int len);
|
|
||||||
unsigned char *packet_encrypt(ssh_session session,void *packet,unsigned int len);
|
|
||||||
/* it returns the hmac buffer if exists*/
|
|
||||||
struct ssh_poll_handle_struct;
|
|
||||||
|
|
||||||
int packet_hmac_verify(ssh_session session,ssh_buffer buffer,unsigned char *mac);
|
|
||||||
|
|
||||||
struct ssh_socket_struct;
|
|
||||||
|
|
||||||
int ssh_packet_socket_callback(const void *data, size_t len, void *user);
|
|
||||||
void ssh_packet_register_socket_callback(ssh_session session, struct ssh_socket_struct *s);
|
|
||||||
void ssh_packet_set_callbacks(ssh_session session, ssh_packet_callbacks callbacks);
|
|
||||||
void ssh_packet_set_default_callbacks(ssh_session session);
|
|
||||||
void ssh_packet_process(ssh_session session, uint8_t type);
|
|
||||||
/* connect.c */
|
/* connect.c */
|
||||||
socket_t ssh_connect_host(ssh_session session, const char *host,const char
|
socket_t ssh_connect_host(ssh_session session, const char *host,const char
|
||||||
*bind_addr, int port, long timeout, long usec);
|
*bind_addr, int port, long timeout, long usec);
|
||||||
|
@ -82,7 +82,6 @@ set(libssh_SRCS
|
|||||||
client.c
|
client.c
|
||||||
config.c
|
config.c
|
||||||
connect.c
|
connect.c
|
||||||
crypt.c
|
|
||||||
dh.c
|
dh.c
|
||||||
ecdh.c
|
ecdh.c
|
||||||
error.c
|
error.c
|
||||||
@ -99,6 +98,7 @@ set(libssh_SRCS
|
|||||||
misc.c
|
misc.c
|
||||||
options.c
|
options.c
|
||||||
packet.c
|
packet.c
|
||||||
|
packet_crypt.c
|
||||||
pcap.c
|
pcap.c
|
||||||
pki.c
|
pki.c
|
||||||
poll.c
|
poll.c
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user