Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-20 Thread Luis Rodriguez Gonzalez
 Looks like you will need to create a secondary merge proposal which updates
 the oauth module (which uses the hmac module that you're changing here).
I just created lp:~zorba-coders/zorba/bug-1188056-oauth to change that uri.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-20 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug-1188056 into 
lp:zorba/security-module has been updated.

Commit Message changed to:

Changes for Zorba 3.0 for security module.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-20 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-20 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug-1188056 into 
lp:zorba/security-module has been updated.

Description changed to:

https://code.launchpad.net/~zorba-coders/zorba/bug-1188056-oauth/+merge/186874

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-20 Thread Zorba Build Bot
Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056-oauth/+merge/186874

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-20 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug-1188056 into 
lp:zorba/security-module has been updated.

Status: Needs review = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-20 Thread Zorba Build Bot
Validation queue succeeded - proposal merged!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-19 Thread Luis Rodriguez Gonzalez
The proposal to merge lp:~zorba-coders/zorba/bug-1188056 into 
lp:zorba/security-module has been updated.

Commit Message changed to:

Changes for Zorba 3.0 for security internal module.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-16 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-16 Thread Zorba Build Bot
Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-16 Thread Zorba Build Bot
Validation queue result for 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790

Stage TestZorbaUbuntu failed.
1 tests failed (8492 total tests run).

Check test results at 
http://jenkins.lambda.nu/job/TestZorbaUbuntu/303/testReport/ to view the 
results.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-09-16 Thread Chris Hillery
Review: Needs Fixing

Looks like you will need to create a secondary merge proposal which updates the 
oauth module (which uses the hmac module that you're changing here).
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-08-29 Thread Luis Rodriguez Gonzalez
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-08-29 Thread Luis Rodriguez Gonzalez
 1. sha256 test failures.
 
 2. There are error codes thrown like hmac:unsupported-algorithm; they should
 be like hmac:UNSUPPORTED_ALGORITHM, and the XQDoc should be updated
 accordingly.

both errors are fixed now.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-08-28 Thread Chris Hillery
Chris Hillery has proposed merging lp:~zorba-coders/zorba/bug-1188056 into 
lp:zorba/security-module.

Requested reviews:
  Zorba Coders (zorba-coders)
Related bugs:
  Bug #1188056 in Zorba: Update non-core module security
  https://bugs.launchpad.net/zorba/+bug/1188056

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module.
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt	2012-07-20 16:13:37 +
+++ src/CMakeLists.txt	2013-08-29 00:28:25 +
@@ -13,14 +13,14 @@
 # limitations under the License.
 
 DECLARE_ZORBA_MODULE (
-  URI http://www.zorba-xquery.com/modules/cryptography/hmac;
-  VERSION 2.0
+  URI http://zorba.io/modules/hmac;
+  VERSION 1.0
   FILE hmac.xq
   LINK_LIBRARIES ${OPENSSL_LIBRARIES}
 )
 DECLARE_ZORBA_MODULE (
-  URI http://www.zorba-xquery.com/modules/cryptography/hash;
-  VERSION 2.0
+  URI http://zorba.io/modules/hash;
+  VERSION 1.0
   FILE hash.xq
   LINK_LIBRARIES ${OPENSSL_LIBRARIES}
 )

=== modified file 'src/hash.xq'
--- src/hash.xq	2013-08-09 09:37:05 +
+++ src/hash.xq	2013-08-29 00:28:25 +
@@ -1,4 +1,4 @@
-xquery version 1.0;
+xquery version 3.0;
 
 (:
  : Copyright 2006-2012 The FLWOR Foundation.
@@ -24,10 +24,10 @@
  : @author Gabriel Petrovay, Markus Pilman, Matthias Brantner
  : @project Zorba/Cryptography/Hash
  :)
-module namespace hash = http://www.zorba-xquery.com/modules/cryptography/hash;;
+module namespace hash = http://zorba.io/modules/hash;;
 
 declare namespace ver = http://zorba.io/options/versioning;;
-declare option ver:module-version 2.0;
+declare option ver:module-version 1.0;
 
 (:~
  : Computes the MD5 hash of the string provided as parameter.

=== modified file 'src/hash.xq.src/hash.h'
--- src/hash.xq.src/hash.h	2013-07-30 18:47:17 +
+++ src/hash.xq.src/hash.h	2013-08-29 00:28:25 +
@@ -49,7 +49,7 @@
 virtual ~HashModule();
 
 virtual String
-getURI() const { return http://www.zorba-xquery.com/modules/cryptography/hash;; }
+getURI() const { return http://zorba.io/modules/hash;; }
 
 virtual ExternalFunction*
 getExternalFunction(const String aLocalname);
@@ -120,16 +120,17 @@
   {
 if (aMessage.getTypeCode() == store::XS_BASE64BINARY)
 {
-  String lTmpDecodedBuf;
   size_t lLen;
   const char* lTmp = aMessage.getBase64BinaryValue(lLen);
+  char *lTmpDecodedBuf;
   if (aDecode)
   {
-String lTmpEncoded;
 // lTmpDecodedBuf is used to make sure lMsg is still alive during HMAC_Update
-base64::decode(lTmp, lLen, lTmpDecodedBuf);
-lTmp = lTmpDecodedBuf.c_str();
-lLen = lTmpDecodedBuf.size();
+lTmpDecodedBuf = (char *)malloc(lLen*sizeof(char)+1);
+base64::decode(lTmp, lLen, lTmpDecodedBuf);
+lTmp = lTmpDecodedBuf;
+lLen = strlen(lTmpDecodedBuf);
+free(lTmpDecodedBuf);
   }
   (*hash)(
 reinterpret_castconst unsigned char*(lTmp),

=== modified file 'src/hmac.xq'
--- src/hmac.xq	2013-08-09 09:37:05 +
+++ src/hmac.xq	2013-08-29 00:28:25 +
@@ -1,4 +1,4 @@
-xquery version 1.0;
+xquery version 3.0;
 
 (:
  : Copyright 2006-2012 The FLWOR Foundation.
@@ -28,10 +28,10 @@
  : @project Zorba/Cryptography/HMAC
  :
  :)
-module namespace hmac = http://www.zorba-xquery.com/modules/cryptography/hmac;;
+module namespace hmac = http://zorba.io/modules/hmac;;
 
 declare namespace ver = http://zorba.io/options/versioning;;
-declare option ver:module-version 2.0;
+declare option ver:module-version 1.0;
 
 (:~
  : Calculate the HMAC for the given message and secret-key involving

=== modified file 'src/hmac.xq.src/hmac.cpp'
--- src/hmac.xq.src/hmac.cpp	2013-07-30 18:36:20 +
+++ src/hmac.xq.src/hmac.cpp	2013-08-29 00:28:25 +
@@ -120,7 +120,7 @@
 lMsg  aAlg  : unsupported hash algorithm;
 throw USER_EXCEPTION(
 HMACModule::getItemFactory()-createQName(
-http://www.zorba-xquery.com/modules/cryptography/hmac;, unsupported-algorithm),
+http://zorba.io/modules/hmac;, unsupported-algorithm),
 lMsg.str());
   }
 }
@@ -213,16 +213,17 @@
   }
   else
   {
-String lTmpDecodedBuf;
 size_t lSize;
 const char* lMsg = lItem.getBase64BinaryValue(lSize);
+char *lTmpDecodedBuf;
 if (lItem.isEncoded())
 {
-  String lTmpEncoded;
   // lTmpDecodedBuf is used to make sure lMsg is still alive during HMAC_Update
-  base64::decode(lMsg, lSize, lTmpDecodedBuf);
-  lMsg = lTmpDecodedBuf.c_str();
-  lSize = lTmpDecodedBuf.size();
+  lTmpDecodedBuf = (char *)malloc(lSize*sizeof(char)+1);
+  base64::decode(lMsg, lSize, lTmpDecodedBuf);
+  lMsg = lTmpDecodedBuf;
+  lSize

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188056 into lp:zorba/security-module

2013-08-28 Thread Chris Hillery
Review: Needs Fixing

1. sha256 test failures.

2. There are error codes thrown like hmac:unsupported-algorithm; they should be 
like hmac:UNSUPPORTED_ALGORITHM, and the XQDoc should be updated accordingly.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1188056/+merge/182790
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp