Browse Source

fix server basic256sha256

StalderT 7 years ago
parent
commit
19c5609a82
1 changed files with 1 additions and 3 deletions
  1. 1 3
      plugins/ua_securitypolicy_basic256sha256.c

+ 1 - 3
plugins/ua_securitypolicy_basic256sha256.c

@@ -200,7 +200,6 @@ asym_encrypt_sp_basic256sha256(const UA_SecurityPolicy *securityPolicy,
     size_t lenDataToEncrypt = data->length;
     size_t inOffset = 0;
     size_t offset = 0;
-    size_t outLength = 0;
     const unsigned char *label = NULL;
     Basic256Sha256_PolicyContext *pc = cc->policyContext;
     while(lenDataToEncrypt >= plainTextBlockSize) {
@@ -215,9 +214,8 @@ asym_encrypt_sp_basic256sha256(const UA_SecurityPolicy *securityPolicy,
             return retval;
         }
 
-        outLength += remoteRsaContext->len;
         inOffset += plainTextBlockSize;
-        offset += outLength;
+        offset += remoteRsaContext->len;
         lenDataToEncrypt -= plainTextBlockSize;
     }