2 Star 6 Fork 0

TheNorthMemory / wechatpay-php

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
TheNorthMemory 提交于 2021-09-16 12:18 . fix CI#285 and optim userAgent()
all: stats keygen x509crt test clean
keygen:
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out ./tests/fixtures/mock.pkcs8.key
openssl rsa -in ./tests/fixtures/mock.pkcs8.key -out ./tests/fixtures/mock.pkcs1.key
openssl rsa -in ./tests/fixtures/mock.pkcs8.key -pubout -out ./tests/fixtures/mock.spki.pem
openssl rsa -pubin -in ./tests/fixtures/mock.spki.pem -RSAPublicKey_out -out ./tests/fixtures/mock.pkcs1.pem
openssl rand -out ./tests/fixtures/mock.pwd.txt -hex 16
openssl pkcs8 -in ./tests/fixtures/mock.pkcs8.key -passout file:./tests/fixtures/mock.pwd.txt -topk8 -out ./tests/fixtures/mock.encrypted.pkcs8.key
x509crt:
fixtures="./tests/fixtures/" && serial=$$(openssl rand -hex 20 | \
awk '{ if (match($$0,/^00/)) s="01"substr($$0,3,length($$0)); else s=$$0; print toupper(s) }' | \
tee $${fixtures}mock.serial.txt) && \
MSYS_NO_PATHCONV=1 openssl req -new -sha256 -key $${fixtures}mock.pkcs8.key \
-subj "/C=CN/ST=Shanghai/O=WeChatPay Community/CN=WeChatPay Community CI" | \
openssl x509 -req -sha256 -days 1 -set_serial "0x$${serial}" \
-signkey $${fixtures}mock.pkcs8.key -clrext -out $${fixtures}mock.sha256.crt \
&& openssl x509 -in $${fixtures}mock.sha256.crt -noout -text
stats:
vendor/bin/phpstan analyse --no-progress --memory-limit 200M
test:
vendor/bin/phpunit
clean:
rm -rf ./tests/fixtures/mock.*
.PHONY: all
PHP
1
https://gitee.com/TheNorthMemory/wechatpay-php.git
git@gitee.com:TheNorthMemory/wechatpay-php.git
TheNorthMemory
wechatpay-php
wechatpay-php
main

搜索帮助