Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/a285033184553995_asymmetric_encr…
Browse files Browse the repository at this point in the history
…yption'
  • Loading branch information
kroman0 committed Jun 30, 2017
2 parents 8617ba0 + 0c95ffd commit 0bed851
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/openprocurement/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from couchdb import Server as CouchdbServer, Session
from couchdb.http import Unauthorized, extract_credentials
from libnacl.sign import Signer, Verifier
from libnacl.public import SecretKey, PublicKey
from logging import getLogger
from openprocurement.api.auth import AuthenticationPolicy, authenticated_role, check_accreditation
from openprocurement.api.design import sync_design
Expand Down Expand Up @@ -170,6 +171,10 @@ def main(global_config, **settings):
for key in dockeys.split('\0'):
keyring[key[:8]] = Verifier(key)

# Archive keys
arch_pubkey = settings.get('arch_pubkey', None)
config.registry.arch_pubkey = PublicKey(arch_pubkey.decode('hex') if arch_pubkey else SecretKey().pk)

# migrate data
if not os.environ.get('MIGRATION_SKIP'):
for entry_point in iter_entry_points('openprocurement.api.migrations'):
Expand Down

0 comments on commit 0bed851

Please sign in to comment.