Skip to content

Commit

Permalink
Addressed feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
malachyb committed Sep 26, 2023
1 parent 0197e29 commit b3b88d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ public interface SigningService {
* primary identity, or previously generated via the freshKey method. If the {@link PublicKey} is actually
* a {@link CompositeKey}, the first leaf signing key hosted by the node is used.
* @param signatureSpec The {@link SignatureSpec} to use when producing this signature.
* @param context The execution context of the signing operation as a map of strings. Currently accepts the following parameters
* <ul>
* <li>category: the type of signing key requested for additional verification</li>
* </ul>
* @param context The execution context of the signing operation.
*
* @return A {@link DigitalSignature.WithKeyId} representing the signed data and the {@link PublicKey} that belongs to the
* same {@link KeyPair} as the {@link PrivateKey} that signed the data.
Expand All @@ -61,7 +58,7 @@ public interface SigningService {
*/
@Suspendable
@NotNull
DigitalSignature.WithKeyId sign(@NotNull byte[] bytes, @NotNull PublicKey publicKey, @NotNull SignatureSpec signatureSpec, @NotNull Map<String, String> context);
DigitalSignature.WithKeyId sign(@NotNull byte[] bytes, @NotNull PublicKey publicKey, @NotNull SignatureSpec signatureSpec, @NotNull SigningServiceSignContext context);

/**
* Looks into a set of signing keys to find keys owned by the caller. In case of {@link CompositeKey} it looks into
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.corda.v5.application.crypto;

import net.corda.v5.base.annotations.CordaSerializable;

/*
* Context attached to the sign operation of SigningService
*/
@CordaSerializable
public final class SigningServiceSignContext {
private final String keyCategory;

/**
* @param keyCategory the category of the key to be signed with
*/
public SigningServiceSignContext(String keyCategory) {
this.keyCategory = keyCategory;
}
}

0 comments on commit b3b88d0

Please sign in to comment.