Branch oldpackages for 14.07
[14.07/packages.git] / libs / libcrypto++ / patches / 004-gcc4.7.0.patch
1 diff -rupN libcrypto++-5.6.0.orig/algebra.cpp libcrypto++-5.6.0/algebra.cpp\r
2 --- libcrypto++-5.6.0.orig/algebra.cpp  Sun Mar  1 20:44:04 2009\r
3 +++ libcrypto++-5.6.0/algebra.cpp       Fri Oct 12 20:18:44 2012\r
4 @@ -58,7 +58,7 @@ template <class T> const T& AbstractEucl\r
5         Element g[3]={b, a};\r
6         unsigned int i0=0, i1=1, i2=2;\r
7  \r
8 -       while (!Equal(g[i1], this->Identity()))\r
9 +       while (!this->Equal(g[i1], this->Identity()))\r
10         {\r
11                 g[i2] = Mod(g[i0], g[i1]);\r
12                 unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;\r
13 diff -rupN libcrypto++-5.6.0.orig/eccrypto.cpp libcrypto++-5.6.0/eccrypto.cpp\r
14 --- libcrypto++-5.6.0.orig/eccrypto.cpp Sun Mar 15 03:48:02 2009\r
15 +++ libcrypto++-5.6.0/eccrypto.cpp      Fri Oct 12 20:17:08 2012\r
16 @@ -435,7 +435,7 @@ template <class EC> void DL_GroupParamet\r
17         StringSource ssG(param.g, true, new HexDecoder);\r
18         Element G;\r
19         bool result = GetCurve().DecodePoint(G, ssG, (size_t)ssG.MaxRetrievable());\r
20 -       SetSubgroupGenerator(G);\r
21 +       this->SetSubgroupGenerator(G);\r
22         assert(result);\r
23  \r
24         StringSource ssN(param.n, true, new HexDecoder);\r
25 @@ -591,7 +591,7 @@ bool DL_GroupParameters_EC<EC>::Validate\r
26         if (level >= 2 && pass)\r
27         {\r
28                 const Integer &q = GetSubgroupOrder();\r
29 -               Element gq = gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : ExponentiateElement(g, q);\r
30 +               Element gq = gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : this->ExponentiateElement(g, q);\r
31                 pass = pass && IsIdentity(gq);\r
32         }\r
33         return pass;\r
34 @@ -629,7 +629,7 @@ void DL_PublicKey_EC<EC>::BERDecodePubli\r
35         typename EC::Point P;\r
36         if (!this->GetGroupParameters().GetCurve().DecodePoint(P, bt, size))\r
37                 BERDecodeError();\r
38 -       SetPublicElement(P);\r
39 +       this->SetPublicElement(P);\r
40  }\r
41  \r
42  template <class EC>\r
43 diff -rupN libcrypto++-5.6.0.orig/eccrypto.h libcrypto++-5.6.0/eccrypto.h\r
44 --- libcrypto++-5.6.0.orig/eccrypto.h   Sun Mar  1 20:44:02 2009\r
45 +++ libcrypto++-5.6.0/eccrypto.h        Fri Oct 12 20:17:30 2012\r
46 @@ -43,7 +43,7 @@ public:\r
47         void Initialize(const EllipticCurve &ec, const Point &G, const Integer &n, const Integer &k = Integer::Zero())\r
48         {\r
49                 this->m_groupPrecomputation.SetCurve(ec);\r
50 -               SetSubgroupGenerator(G);\r
51 +               this->SetSubgroupGenerator(G);\r
52                 m_n = n;\r
53                 m_k = k;\r
54         }\r
55 @@ -145,9 +145,9 @@ public:\r
56         typedef typename EC::Point Element;\r
57  \r
58         void Initialize(const DL_GroupParameters_EC<EC> &params, const Element &Q)\r
59 -               {this->AccessGroupParameters() = params; SetPublicElement(Q);}\r
60 +               {this->AccessGroupParameters() = params; this->SetPublicElement(Q);}\r
61         void Initialize(const EC &ec, const Element &G, const Integer &n, const Element &Q)\r
62 -               {this->AccessGroupParameters().Initialize(ec, G, n); SetPublicElement(Q);}\r
63 +               {this->AccessGroupParameters().Initialize(ec, G, n); this->SetPublicElement(Q);}\r
64  \r
65         // X509PublicKey\r
66         void BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size);\r
67 @@ -166,9 +166,9 @@ public:\r
68         void Initialize(const EC &ec, const Element &G, const Integer &n, const Integer &x)\r
69                 {this->AccessGroupParameters().Initialize(ec, G, n); this->SetPrivateExponent(x);}\r
70         void Initialize(RandomNumberGenerator &rng, const DL_GroupParameters_EC<EC> &params)\r
71 -               {GenerateRandom(rng, params);}\r
72 +               {this->GenerateRandom(rng, params);}\r
73         void Initialize(RandomNumberGenerator &rng, const EC &ec, const Element &G, const Integer &n)\r
74 -               {GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}\r
75 +               {this->GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}\r
76  \r
77         // PKCS8PrivateKey\r
78         void BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size);\r
79 diff -rupN libcrypto++-5.6.0.orig/panama.cpp libcrypto++-5.6.0/panama.cpp\r
80 --- libcrypto++-5.6.0.orig/panama.cpp   Sun Mar  1 20:44:00 2009\r
81 +++ libcrypto++-5.6.0/panama.cpp        Fri Oct 12 20:19:27 2012\r
82 @@ -420,7 +420,7 @@ void PanamaHash<B>::TruncatedFinal(byte \r
83  {\r
84         this->ThrowIfInvalidTruncatedSize(size);\r
85  \r
86 -       PadLastBlock(this->BLOCKSIZE, 0x01);\r
87 +       this->PadLastBlock(this->BLOCKSIZE, 0x01);\r
88         \r
89         HashEndianCorrectedBlock(this->m_data);\r
90  \r
91 diff -rupN libcrypto++-5.6.0.orig/secblock.h libcrypto++-5.6.0/secblock.h\r
92 --- libcrypto++-5.6.0.orig/secblock.h   Sun Mar 15 03:48:02 2009\r
93 +++ libcrypto++-5.6.0/secblock.h        Fri Oct 12 20:13:31 2012\r
94 @@ -94,7 +94,7 @@ public:\r
95  \r
96         pointer allocate(size_type n, const void * = NULL)\r
97         {\r
98 -               CheckSize(n);\r
99 +               this->CheckSize(n);\r
100                 if (n == 0)\r
101                         return NULL;\r
102  \r