Skip to content

Commit

Permalink
Merge branch 'main' into fix/didexchange-1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
swcurran authored Mar 25, 2024
2 parents e0acb3f + a79c5c7 commit 275c3d1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
for i in *.md; do sed -e "s#docs/#./#g" $i >docs/$i; done
# Fix references in DevReadMe.md to moved files
sed -e "s#\.\./\.\./#../#" docs/features/DevReadMe.md >tmp.md; mv tmp.md docs/features/DevReadMe.md
# Fix image references in demo documents so they work in GitHub and mkdocs
for i in docs/demo/AriesOpenAPIDemo.md docs/demo/AliceGetsAPhone.md; do sed -e "s#src=.collateral#src=\"../collateral#" $i >$i.tmp; mv $i.tmp $i; done
# Populate overrides for the current version, and then remove to not apply if VERSION is main branch
OVERRIDE=overrides/main.html
echo -e "{% extends \"base.html\" %}\n\n{% block outdated %}\n You are viewing the documentation for ACA-Py Release $VERSION.\n{% endblock %}" >$OVERRIDE
Expand Down
9 changes: 9 additions & 0 deletions aries_cloudagent/anoncreds/issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,15 @@ async def create_and_register_credential_definition(
if not isinstance(max_cred_num, int):
raise ValueError("max_cred_num must be an integer")

# Don't allow revocable cred def to be created without tails server base url
if (
not self.profile.settings.get("tails_server_base_url")
and support_revocation
):
raise AnonCredsIssuerError(
"tails_server_base_url not configured. Can't create revocable credential definition." # noqa: E501
)

anoncreds_registry = self.profile.inject(AnonCredsRegistry)
schema_result = await anoncreds_registry.get_schema(self.profile, schema_id)

Expand Down
1 change: 1 addition & 0 deletions aries_cloudagent/anoncreds/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ class CredDefPostOptionsSchema(OpenAPISchema):
revocation_registry_size = fields.Int(
metadata={
"description": "Maximum number of credential revocations per registry",
"example": 1000,
},
required=False,
)
Expand Down
10 changes: 4 additions & 6 deletions aries_cloudagent/connections/base_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from ..utils.multiformats import multibase, multicodec
from ..wallet.base import BaseWallet
from ..wallet.crypto import create_keypair, seed_to_did
from ..wallet.did_info import DIDInfo, KeyInfo, INVITATION_REUSE_KEY
from ..wallet.did_info import INVITATION_REUSE_KEY, DIDInfo, KeyInfo
from ..wallet.did_method import PEER2, PEER4, SOV
from ..wallet.error import WalletNotFoundError
from ..wallet.key_type import ED25519
Expand Down Expand Up @@ -970,14 +970,12 @@ async def resolve_inbound_connection(
"""

receipt.sender_did = None
if receipt.sender_verkey:
try:
receipt.sender_did = await self.find_did_for_key(receipt.sender_verkey)
except StorageNotFoundError:
self._logger.warning(
"No corresponding DID found for sender verkey: %s",
receipt.sender_verkey,
)
pass

if receipt.recipient_verkey:
try:
Expand All @@ -996,7 +994,7 @@ async def resolve_inbound_connection(
receipt.recipient_verkey,
)
except WalletNotFoundError:
self._logger.warning(
self._logger.debug(
"No corresponding DID found for recipient verkey: %s",
receipt.recipient_verkey,
)
Expand Down
6 changes: 6 additions & 0 deletions aries_cloudagent/messaging/credential_definitions/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ async def credential_definitions_send_credential_definition(request: web.BaseReq
tag = body.get("tag")
rev_reg_size = body.get("revocation_registry_size")

# Don't allow revocable cred def to be created without tails server base url
if not profile.settings.get("tails_server_base_url") and support_revocation:
raise web.HTTPBadRequest(
reason="tails_server_base_url not configured. Can't create revocable credential definition." # noqa: E501
)

tag_query = {"schema_id": schema_id}
async with profile.session() as session:
storage = session.inject(BaseStorage)
Expand Down
3 changes: 2 additions & 1 deletion demo/features/steps/0586-sign-transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ def step_impl(context, agent_name, did_role):
)

# make the new did the wallet's public did
retries = 3
retries = 5
for retry in range(retries):
async_sleep(1.0)
published_did = agent_container_POST(
agent["agent"],
"/wallet/did/public",
Expand Down

0 comments on commit 275c3d1

Please sign in to comment.