aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libssh/libcrypto.h8
-rw-r--r--include/libssh/libgcrypt.h2
-rw-r--r--include/libssh/wrapper.h2
3 files changed, 12 insertions, 0 deletions
diff --git a/include/libssh/libcrypto.h b/include/libssh/libcrypto.h
index 8ddeac9..acfa109 100644
--- a/include/libssh/libcrypto.h
+++ b/include/libssh/libcrypto.h
@@ -31,6 +31,10 @@
#include <openssl/sha.h>
#include <openssl/md5.h>
#include <openssl/hmac.h>
+#ifdef HAVE_OPENSSL_ECC
+#include <openssl/evp.h>
+#endif
+
typedef SHA_CTX* SHACTX;
typedef SHA256_CTX* SHA256CTX;
typedef MD5_CTX* MD5CTX;
@@ -42,6 +46,10 @@ typedef HMAC_CTX* HMACCTX;
#endif
#define MD5_DIGEST_LEN MD5_DIGEST_LENGTH
+#ifdef HAVE_OPENSSL_ECC
+#define EVP_DIGEST_LEN EVP_MAX_MD_SIZE
+#endif
+
#include <openssl/bn.h>
#include <openssl/opensslv.h>
#define OPENSSL_0_9_7b 0x0090702fL
diff --git a/include/libssh/libgcrypt.h b/include/libssh/libgcrypt.h
index b8704d5..104fdee 100644
--- a/include/libssh/libgcrypt.h
+++ b/include/libssh/libgcrypt.h
@@ -41,6 +41,8 @@ typedef gcry_md_hd_t HMACCTX;
#define EVP_MAX_MD_SIZE 36
#endif
+#define EVP_DIGEST_LEN EVP_MAX_MD_SIZE
+
typedef gcry_mpi_t bignum;
/* missing gcrypt functions */
diff --git a/include/libssh/wrapper.h b/include/libssh/wrapper.h
index c08ab22..79d8745 100644
--- a/include/libssh/wrapper.h
+++ b/include/libssh/wrapper.h
@@ -48,6 +48,8 @@ void sha1_final(unsigned char *md,SHACTX c);
void sha1(unsigned char *digest,int len,unsigned char *hash);
void sha256(unsigned char *digest, int len, unsigned char *hash);
+void evp(int nid, unsigned char *digest, int len, unsigned char *hash, unsigned int *hlen);
+
ssh_mac_ctx ssh_mac_ctx_init(enum ssh_mac_e type);
void ssh_mac_update(ssh_mac_ctx ctx, const void *data, unsigned long len);
void ssh_mac_final(unsigned char *md, ssh_mac_ctx ctx);