Skip to content

Commit

Permalink
Fix AddSignatureV0 under OpenSSL.
Browse files Browse the repository at this point in the history
For OpenSSL this didn't return anything.

PiperOrigin-RevId: 705543339
Change-Id: Icdce772d2ee61f69044e848f3f0bb386b3435ff9
  • Loading branch information
tholenst authored and copybara-github committed Dec 12, 2024
1 parent c9b005d commit 45e017e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
13 changes: 9 additions & 4 deletions tink/signature/internal/config_v0.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ util::Status AddSignatureV0(Configuration& config) {
}

// Tink implements PQC signatures with BoringSSL, not OpenSSL.
#ifdef OPENSSL_IS_BORINGSSL
#ifdef OPENSSL_IS_BORINGSSL
// SLH DSA
status = RegisterSlhDsaProtoSerialization();
if (!status.ok()) {
Expand Down Expand Up @@ -254,9 +254,14 @@ util::Status AddSignatureV0(Configuration& config) {
if (!status.ok()) {
return status;
}
return ConfigurationImpl::AddPrimitiveGetter<PublicKeyVerify, MlDsaPublicKey>(
NewMlDsaVerifyBoringSsl, config);
#endif
status =
ConfigurationImpl::AddPrimitiveGetter<PublicKeyVerify, MlDsaPublicKey>(
NewMlDsaVerifyBoringSsl, config);
if (!status.ok()) {
return status;
}
#endif
return util::OkStatus();
}

} // namespace internal
Expand Down
8 changes: 6 additions & 2 deletions tink/signature/internal/key_gen_config_v0.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ util::Status AddSignatureKeyGenV0(KeyGenConfiguration& config) {
if (!status.ok()) {
return status;
}
return KeyGenConfigurationImpl::AddKeyCreator<MlDsaParameters>(CreateMlDsaKey,
config);
status = KeyGenConfigurationImpl::AddKeyCreator<MlDsaParameters>(
CreateMlDsaKey, config);
if (!status.ok()) {
return status;
}
#endif
return util::OkStatus();
}

} // namespace internal
Expand Down

0 comments on commit 45e017e

Please sign in to comment.