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

Aws::Client::AWSAuthV4Signer::GenerateSignature declared but not defined #2599

Closed
vaci opened this issue Jul 30, 2023 · 3 comments
Closed

Aws::Client::AWSAuthV4Signer::GenerateSignature declared but not defined #2599

vaci opened this issue Jul 30, 2023 · 3 comments
Assignees

Comments

@vaci
Copy link

vaci commented Jul 30, 2023

Describe the bug

Class Aws::Client::AWSAuthV4Signer declares a public method:

https://github.com/aws/aws-sdk-cpp/blob/main/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthV4Signer.h#L168

Aws::String GenerateSignature(const Aws::Auth::AWSCredentials& credentials,
  const Aws::String& stringToSign, const Aws::String& simpleDate) const;

... but this method is not defined

The only overloads of GenerateSignature that are defined in the source code are both private methods of AWSAuthV4Signer:

https://github.com/aws/aws-sdk-cpp/blob/main/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthV4Signer.cpp#L469C1-L477C1

Aws::String AWSAuthV4Signer::GenerateSignature(const AWSCredentials& credentials, const Aws::String& stringToSign,
        const Aws::String& simpleDate, const Aws::String& region, const Aws::String& serviceName) const;

Aws::String AWSAuthV4Signer::GenerateSignature(const Aws::String& stringToSign, const ByteBuffer& key) const;

Expected Behavior

I expect to be able to link against the public method.

Current Behavior

Program fails to link against missing symbol.

s3-test.o: in function `S3Test_ListBuckets_Test::TestBody()':
    s3-test.cpp:307: undefined reference to `Aws::Client::AWSAuthV4Signer::GenerateSignature(Aws::Auth::AWSCredentials const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
    collect2: error: ld returned 1 exit status

Reproduction Steps

int main() {
Aws::SDKOptions awsOptions{};
Aws::InitAPI(awsOptions);

auto credsProvider = std::make_sharedAws::Auth::DefaultAWSCredentialsProviderChain();
auto creds = credsProvider->GetAWSCredentials();
auto signer = Aws::Client::AWSAuthV4Signer{credsProvider, "s3", "us-east-1"};
signer.GenerateSignature(creds, "", "");
}

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.37

Compiler and Version used

gcc (GCC) 12.2.0

Operating System and version

Linux 5.15.0-75

@vaci vaci added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 30, 2023
@sbiscigl
Copy link
Contributor

took a look this and was able to reproduce, will look into pushing out a fix asap

@sbiscigl sbiscigl added pending-release This issue will be fixed by an approved PR that hasn't been released yet. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 31, 2023
@sbiscigl sbiscigl self-assigned this Jul 31, 2023
@sbiscigl
Copy link
Contributor

merged, is available from HEAD and will be tagged in a release tomorrow. Resolving, give a shout if you have any questions.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@sbiscigl sbiscigl removed the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants