OPAL  Version 3.14.3
h235dh.h
Go to the documentation of this file.
1 /*
2  * h235du.h
3  *
4  * H.235 Diffie-Hellman key exchange PDU's
5  *
6  * Open H323 Library
7  *
8  * Copyright (c) 1998-2013 Vox Lucida Pty. Ltd.
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Open H323 Library.
21  *
22  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23  *
24  * Contributor(s): ______________________________________.
25  *
26  * $Revision: 30685 $
27  * $Author: rjongbloed $
28  * $Date: 2013-10-11 11:30:03 +1100 (Fri, 11 Oct 2013) $
29  */
30 
31 #ifndef OPAL_H323_H235DH_H
32 #define OPAL_H323_H235DH_H
33 
34 #ifdef P_USE_PRAGMA
35 #pragma interface
36 #endif
37 
38 #include <opal_config.h>
39 
40 #if OPAL_H235_6
41 
42 #include <ptclib/pssl.h>
43 
44 
45 class H225_ArrayOf_ClearToken;
47 
48 
51 class H235DiffieHellman : public PDictionary<PString, PSSLDiffieHellman>
52 {
53  typedef PDictionary<PString, PSSLDiffieHellman> BaseClass;
54  PCLASSINFO(H235DiffieHellman, BaseClass);
55  public:
56  H235DiffieHellman() : m_version3(true) { }
57 
58  virtual bool AddForAlgorithm(const OpalMediaCryptoSuite & cryptoSuite);
59  virtual PBYTEArray FindMasterKey(const OpalMediaCryptoSuite & cryptoSuite) const;
60 
61  virtual bool ToTokens(H225_ArrayOf_ClearToken & tokens) const;
62  virtual bool FromTokens(const H225_ArrayOf_ClearToken & tokens);
63 
64  bool IsVersion3() const { return m_version3; }
65 
66  protected:
67  bool m_version3;
68 };
69 
70 #endif // OPAL_H235_6
71 
72 #endif //OPAL_H323_H235AUTH_H
73 
74