Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Olm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
Olm
Commits
c2b51207
Commit
c2b51207
authored
8 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Fix error handling for group sessions
Fix a couple of places where we were using the wrong method to get the last error.
parent
617f9b16
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
javascript/olm_inbound_group_session.js
+2
-2
2 additions, 2 deletions
javascript/olm_inbound_group_session.js
javascript/olm_outbound_group_session.js
+1
-1
1 addition, 1 deletion
javascript/olm_outbound_group_session.js
with
3 additions
and
3 deletions
javascript/olm_inbound_group_session.js
+
2
−
2
View file @
c2b51207
...
...
@@ -66,14 +66,14 @@ InboundGroupSession.prototype['decrypt'] = restore_stack(function(
)
{
var
message_array
=
array_from_string
(
message
);
var
message_buffer
=
stack
(
message_array
);
var
max_plaintext_length
=
session_method
(
var
max_plaintext_length
=
inbound_group_
session_method
(
Module
[
'
_olm_group_decrypt_max_plaintext_length
'
]
)(
this
.
ptr
,
message_buffer
,
message_array
.
length
);
// caculating the length destroys the input buffer.
// So we copy the array to a new buffer
var
message_buffer
=
stack
(
message_array
);
var
plaintext_buffer
=
stack
(
max_plaintext_length
+
NULL_BYTE_PADDING_LENGTH
);
var
plaintext_length
=
session_method
(
Module
[
"
_olm_group_decrypt
"
])(
var
plaintext_length
=
inbound_group_
session_method
(
Module
[
"
_olm_group_decrypt
"
])(
this
.
ptr
,
message_buffer
,
message_array
.
length
,
plaintext_buffer
,
max_plaintext_length
...
...
This diff is collapsed.
Click to expand it.
javascript/olm_outbound_group_session.js
+
1
−
1
View file @
c2b51207
...
...
@@ -54,7 +54,7 @@ OutboundGroupSession.prototype['unpickle'] = restore_stack(function(key, pickle)
});
OutboundGroupSession
.
prototype
[
'
create
'
]
=
restore_stack
(
function
(
key
)
{
var
random_length
=
session_method
(
var
random_length
=
outbound_group_
session_method
(
Module
[
'
_olm_init_outbound_group_session_random_length
'
]
)(
this
.
ptr
);
var
random
=
random_stack
(
random_length
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment