Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZKAPAuthorizer
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
ZKAPAuthorizer
Commits
bbc1fcf4
Commit
bbc1fcf4
authored
5 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
This stuff can all be private
parent
bc913de3
No related branches found
Branches containing commit
No related tags found
1 merge request
!43
Add some more docs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/_zkapauthorizer/foolscap.py
+5
-5
5 additions, 5 deletions
src/_zkapauthorizer/foolscap.py
with
5 additions
and
5 deletions
src/_zkapauthorizer/foolscap.py
+
5
−
5
View file @
bbc1fcf4
...
...
@@ -27,18 +27,18 @@ from allmydata.interfaces import (
# picking a small number here and expect to have to raise. However, ideally,
# a client could accomplish a lot with a few passes while also not wasting a
# lot of value.
MAXIMUM_PASSES_PER_CALL
=
10
_
MAXIMUM_PASSES_PER_CALL
=
10
# This is the length of a serialized Ristretto-flavored PrivacyPass pass The
# pass is a combination of token preimages and unblinded token signatures,
# each base64-encoded.
PASS_LENGTH
=
177
_
PASS_LENGTH
=
177
# Take those values and turn them into the appropriate Foolscap constraint
# objects. Foolscap seems to have a convention of representing these as
# CamelCase module-level values so I replicate that here.
Pass
=
ByteStringConstraint
(
maxLength
=
PASS_LENGTH
,
minLength
=
PASS_LENGTH
)
PassList
=
ListOf
(
Pass
,
maxLength
=
MAXIMUM_PASSES_PER_CALL
)
_
Pass
=
ByteStringConstraint
(
maxLength
=
_
PASS_LENGTH
,
minLength
=
_
PASS_LENGTH
)
_
PassList
=
ListOf
(
_
Pass
,
maxLength
=
_
MAXIMUM_PASSES_PER_CALL
)
def
add_passes
(
schema
):
...
...
@@ -51,7 +51,7 @@ def add_passes(schema):
:return foolscap.remoteinterface.RemoteMethodSchema: A schema like
``schema`` but with one additional required argument.
"""
return
add_arguments
(
schema
,
[(
b
"
passes
"
,
PassList
)])
return
add_arguments
(
schema
,
[(
b
"
passes
"
,
_
PassList
)])
def
add_arguments
(
schema
,
kwargs
):
...
...
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