Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
hive
beem
Commits
a442f03a
Commit
a442f03a
authored
4 years ago
by
Martin Lees
Browse files
Options
Downloads
Patches
Plain Diff
Fix signature + extension
parent
27175eec
No related branches found
No related tags found
1 merge request
!2
Feature/update proposal extensions
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
beembase/objects.py
+1
-1
1 addition, 1 deletion
beembase/objects.py
beemgraphenebase/ecdsasig.py
+7
-1
7 additions, 1 deletion
beemgraphenebase/ecdsasig.py
with
8 additions
and
2 deletions
beembase/objects.py
+
1
−
1
View file @
a442f03a
...
@@ -326,7 +326,7 @@ class UpdateProposalEndDate(GrapheneObject):
...
@@ -326,7 +326,7 @@ class UpdateProposalEndDate(GrapheneObject):
super
(
UpdateProposalEndDate
,
self
).
__init__
(
super
(
UpdateProposalEndDate
,
self
).
__init__
(
OrderedDict
([
OrderedDict
([
(
'
end_date
'
,
PointInTime
(
kwargs
[
"
end_date
"
])),
(
'
end_date
'
,
PointInTime
(
kwargs
[
'
update_proposal_
end_date
'
])),
]))
]))
...
...
This diff is collapsed.
Click to expand it.
beemgraphenebase/ecdsasig.py
+
7
−
1
View file @
a442f03a
...
@@ -103,7 +103,13 @@ def recover_public_key(digest, signature, i, message=None):
...
@@ -103,7 +103,13 @@ def recover_public_key(digest, signature, i, message=None):
if
not
isinstance
(
message
,
bytes_types
):
if
not
isinstance
(
message
,
bytes_types
):
message
=
py23_bytes
(
message
,
"
utf-8
"
)
message
=
py23_bytes
(
message
,
"
utf-8
"
)
sigder
=
encode_dss_signature
(
r
,
s
)
sigder
=
encode_dss_signature
(
r
,
s
)
public_key
=
ec
.
EllipticCurvePublicNumbers
(
Q
.
_Point__x
,
Q
.
_Point__y
,
ec
.
SECP256K1
()).
public_key
(
default_backend
())
try
:
public_key
=
ec
.
EllipticCurvePublicNumbers
(
Q
.
_Point__x
,
Q
.
_Point__y
,
ec
.
SECP256K1
()).
public_key
(
default_backend
())
except
:
Q_point
=
Q
.
to_affine
()
public_key
=
ec
.
EllipticCurvePublicNumbers
(
int
(
Q_point
.
x
()),
int
(
Q_point
.
y
()),
ec
.
SECP256K1
()).
public_key
(
default_backend
())
public_key
.
verify
(
sigder
,
message
,
ec
.
ECDSA
(
hashes
.
SHA256
()))
public_key
.
verify
(
sigder
,
message
,
ec
.
ECDSA
(
hashes
.
SHA256
()))
return
public_key
return
public_key
else
:
else
:
...
...
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