Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE-9975: Revert "CORE-9975: Add support for key category parameter to signing API" #1252

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,6 @@ public interface SigningService {
@NotNull
DigitalSignature.WithKeyId sign(@NotNull byte[] bytes, @NotNull PublicKey publicKey, @NotNull SignatureSpec signatureSpec);

/**
* Using the provided signing {@link PublicKey}, internally looks up the matching {@link PrivateKey} and signs the data.
*
* @param bytes The data to sign over using the chosen key.
* @param publicKey The {@link PublicKey} partner to an internally held {@link PrivateKey}, either derived from the node's
* 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>
*
* @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.
*
* @throws CordaRuntimeException If the input key is not a member of {@code keys}.
*/
@Suspendable
@NotNull
DigitalSignature.WithKeyId sign(@NotNull byte[] bytes, @NotNull PublicKey publicKey, @NotNull SignatureSpec signatureSpec, @NotNull Map<String, String> context);

/**
* Looks into a set of signing keys to find keys owned by the caller. In case of {@link CompositeKey} it looks into
* the composite key leaves and returns the firstly found owned composite key leaf.
Expand Down