Commit c7b208ea authored by Yann Garcia's avatar Yann Garcia
Browse files

Finalyze Security TCs

parent 524df4ef
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ int security_services::do_sign(const OCTETSTRING& p_encoded_message, const OCTET
  to64 = converter::get_instance().buffer_to_base64(std::vector(static_cast<const unsigned char*>(to_be_signed), to_be_signed.lengthof() + static_cast<const unsigned char*>(to_be_signed)));
  loggers::get_instance().log("security_services::do_sign: Data to be signed/verified: '%s'", converter::get_instance().bytes_to_string(to64).c_str());

  // Retrive the private key
  // Retrieve the private key
  const EVP_PKEY* private_key;
  int ret = _certs_db->get_private_key(certificate_id, &private_key);
  if (ret == 1) {
@@ -183,7 +183,7 @@ int security_services::do_sign(const OCTETSTRING& p_encoded_message, const OCTET
  ::EVP_MD_CTX_free(ctx);

  // // Ensure that the signature round-trips
  // // Retrive the public key
  // // Retrieve the public key
  // const EVP_PKEY* public_key;
  // if (_certs_db->get_private_key(certificate_id, &public_key) == 1) {
  //   loggers::get_instance().warning("security_services::do_sign: Failed to retrieve private key");
@@ -309,7 +309,7 @@ bool security_services::do_sign_verify(const CHARSTRING& p_message, const OCTETS
  }
  loggers::get_instance().log("security_services::do_sign_verify: certificate dump: '%s'", _certs_db->cert_to_string(certificate_id).c_str());

  // Retrive the public key
  // Retrieve the public key
  const EVP_PKEY* public_key;
  int ret = _certs_db->get_public_keys(certificate_id, &public_key);
  if (ret == 1) {