验证服务器端的应用内计费签名

发布于 2025-01-05 06:16:41 字数 113 浏览 4 评论 0原文

我正在研究应用程序中应用内计费的安全性。

我在服务器上进行验证,这是用 C++ 编写的。

在c++中可以通过哪些方式来验证它?

我可以使用 openssl 命令吗?

I'm working on the security of the in-app billing in my application.

I do the verification on the server, which is in c++.

which ways are possible to verify it in c++?

can I use openssl command?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

匿名。 2025-01-12 06:16:41

您可以使用 OpenSSL 库。您的应用程序从市场收到的响应是一串 JSON 数据和一个签名字符串,该字符串是使用开发人员配置文件中的公钥的私钥创建的。您应该将该公钥保留在您的服务器上,然后您的应用程序可以将 JSON 字符串和签名传递到您的服务器进行验证。

签名字符串是采用 PKCS#1 填充的 base-64 编码的 SHA1-with-RSA 签名。您应该能够使用 OpenSSL EVP_Verify... 函数在 C++ 程序中验证它:
http://www.openssl.org/docs/crypto/evp.html

You can use the OpenSSL library. The response that your app receives from the Market is a string of JSON data and a signature string which is created using the private key for the public key that is in your developer profile. You should keep that public key on your server, then your app can pass on the JSON string and signature to your server for verification.

The signature string is a base-64 encoded SHA1-with-RSA signature with PKCS#1 padding. You should be able to verify it in a C++ program using the OpenSSL EVP_Verify... functions:
http://www.openssl.org/docs/crypto/evp.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文