使用curl和openssl实现阿里STS授权访问OSS
官方文档 https://help.aliyun.com/document_detail/100624.html?spm=a2c4g.11186623.6.622.50f27e0f66h6C2
阿里控制台 -> 访问控制 -> 用户管理 -> 新建用户 -> 创建AccessKey
将AccessKey ID, AccessKey Secret保存下来
由服务器创建STS令牌, 然后传给客户端, 客户端再调用阿里的STS文件上传接口.
STS信息中包含以下信息
String keyId;
String keySecret;
String securityToken;
由于设备开发人员死活编译不过阿里的C语言版OSS库, 因此本人使用libcurl
编写了一个简单的上传接口
难点在于计算Authorization
https://help.aliyun.com/document_detail/31951.html?spm=a2c4g.11186623.2.13.61aa292dSKfAkT#concept-aml-vv2-xdb