diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-05-17 11:15:24 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2018-05-21 09:18:16 +0800 |
commit | 144bb1128909b953be7c76e2d022cc86d9fe1062 (patch) | |
tree | 82dfd86b40709162693e5f602fd55f5f2709f77d /src/protocol/internal/ssh_cipher.h | |
parent | aa6575788302729a321c9a14816dd267fbcb0899 (diff) | |
download | fqterm-144bb1128909b953be7c76e2d022cc86d9fe1062.tar.xz |
replace is_{en,de}crypt_ things with cipher->started
Diffstat (limited to 'src/protocol/internal/ssh_cipher.h')
-rw-r--r-- | src/protocol/internal/ssh_cipher.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/protocol/internal/ssh_cipher.h b/src/protocol/internal/ssh_cipher.h index 8b09057..f39eea2 100644 --- a/src/protocol/internal/ssh_cipher.h +++ b/src/protocol/internal/ssh_cipher.h @@ -3,6 +3,7 @@ #include <stdlib.h> #include <stdint.h> +#include <stdbool.h> #include <openssl/evp.h> #ifdef __cplusplus @@ -11,7 +12,7 @@ extern "C" { typedef struct ssh_cipher_t SSH_CIPHER; typedef int (*crypt_t)(SSH_CIPHER*, const uint8_t*, uint8_t*, size_t); - typedef int (*init_t)(SSH_CIPHER*); + typedef int (*init_t)(SSH_CIPHER*, const uint8_t*, const uint8_t*); typedef void (*cleanup_t)(SSH_CIPHER*); struct ssh_cipher_t @@ -25,15 +26,14 @@ extern "C" { * be set and then init function must be called */ const char *name; - unsigned char *IV; - unsigned char *key; - void *priv; + void *priv; /* IV and key should be placed in priv */ crypt_t crypt; init_t init; cleanup_t cleanup; size_t blkSize; size_t keySize; size_t IVSize; + bool started; }; typedef const EVP_CIPHER*(*SSH_EVP)(void); @@ -43,6 +43,7 @@ extern "C" { SSH_CIPHER* new_3des_ssh1(int); /* all_ciphers.c */ extern const char all_ciphers_list[]; + extern SSH_CIPHER ssh_cipher_dummy; NEW_CIPHER search_cipher(const char *s); #ifdef __cplusplus |