Fix several warnings that appear in gcc 4.3.2.
[wvstreams.git] / include / wvdiffiehellman.h
blobaf75ffa988598e0969227436a8b05bc41961b8be
1 /* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 2003 Net Integration Technologies, Inc.
5 * Diffie-Hellman shared secret creation.
6 */
8 #ifndef __WVDIFFIEHELLMAN_H
9 #define __WVDIFFIEHELLMAN_H
11 #include <openssl/dh.h>
13 #include "wvstream.h"
14 #include "wvlog.h"
16 class WvDiffieHellman
18 public:
19 WvDiffieHellman(const unsigned char *_key, int _keylen,
20 BN_ULONG _generator);
21 ~WvDiffieHellman() { DH_free(info); }
23 void get_created_secret(WvBuf &outbuf, size_t len);
24 int get_public_value(WvBuf &outbuf, int len);
26 int pub_key_len();
27 bool create_secret(WvBuf &inbuf, size_t in_len, WvBuf& outbuf);
29 protected:
30 struct dh_st *info;
31 BN_ULONG generator;
33 private:
35 WvLog log;
38 #endif /* __WVDIFFIEHELLMAN_H */