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

fix: 更换过期的单元测试用的微信支付平台证书 #235

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ class RSACertificateHandlerTest {
void testValidateCertPath() {
String validCertificate =
"-----BEGIN CERTIFICATE-----\n"
+ "MIID8TCCAtmgAwIBAgIUIrqFSZtm0AdWLS62jy3IyrpN7a0wDQYJKoZIhvcNAQEL\n"
+ "MIIEFDCCAvygAwIBAgIUXeoQ71WHfjz2wzJVwufe//fkJ+wwDQYJKoZIhvcNAQEL\n"
+ "BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT\n"
+ "FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg\n"
+ "Q0EwHhcNMTgxMDA5MTM0ODQ0WhcNMjMxMDA4MTM0ODQ0WjCBgjEYMBYGA1UEAwwP\n"
+ "VGVucGF5LmNvbSBzaWduMRMwEQYDVQQKDApUZW5wYXkuY29tMR0wGwYDVQQLDBRU\n"
+ "ZW5wYXkuY29tIENBIENlbnRlcjELMAkGA1UEBgwCQ04xEjAQBgNVBAgMCUd1YW5n\n"
+ "RG9uZzERMA8GA1UEBwwIU2hlblpoZW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw\n"
+ "ggEKAoIBAQCsZQyHPpnVpWFKy1KIaZMH/GlmGTEZVlPoyBeqGgEoygCf+poL17t+\n"
+ "xzJwQyxfcaAG1hG3gLcrB4zQbfkKj8GmnLG8EUUyDw+wQRUvJ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2TS0OI95Z6UbnHuHWP60yvPMs\n"
+ "ck9llwSj1J9zyEWrG9TCtwdr38U8VmwIz6RQ9k6CK3Yq8tw/a5pYQQ==\n"
+ "-----END CERTIFICATE-----";
X509Certificate certificate = PemUtil.loadX509FromString(validCertificate);

Expand Down
19 changes: 8 additions & 11 deletions core/src/test/java/com/wechat/pay/java/core/model/TestConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,21 @@ public class TestConfig {
"{\n"
+ " \"data\": [\n"
+ " {\n"
+ " \"serial_no\": \"19FBBF2A24A3F3C97F5925FA855A850D6E4624AF\",\n"
+ " \"effective_time \": \"2018-10-09T21:48:14+08:00\",\n"
+ " \"expire_time \": \"2023-10-08T21:48:14+08:00\",\n"
+ " \"effective_time\": \"2023-09-19T23:15:58+08:00\",\n"
+ " \"encrypt_certificate\": {\n"
+ " \"algorithm\": \"AEAD_AES_256_GCM\",\n"
+ " \"nonce\": \"1543b1cd0eb9\",\n"
+ " \"associated_data\": \"certificate\",\n"
+ " \"ciphertext\": "
+ "\"5ZQ4y+5Az+AjCgb+bg574jUQvBuQofsPzea3EKpfvvbiREnklJNkzNTVdkAX1SUz1Aaimwcnl8Jjg7R/57L30Gqz"
+ "+QXHBPjer2wo5KwQspwpfkdxWdps9dF+G4VtyBNSqJd1EHlK5ao"
+ "+/x2TsmcZIulBiz3f5civgFMjvtqLnJTPSqRClomJP6CZiNq00GkNJRrsMgND7VD0mzOq3vdt62tgOZNReahDbXOqj4uiHy0sLHWsiWVfOxMR0zV4FXgcvahi1L5yrJdTs4uNX1RQ+chsVAydXCeiiysJbLY/Bz0fwF1NEi0EGrAhO51qUCseGtFBJNJosCSJkn9nW1FqINJtxZ/vUliXlw7IW4gw6mKO2FqijjHe7kWeCT1KukNi8YBa+Z9CPjTBiMEKFx7SasFsAwA6cqu9mMfNGTcDFEIDfbDYGt8XMFWIOH3oOFU2k4cKRBuL9pB7A3netiZ2qUGtYMxkVAxDIz852XKo2P2+YG7TqhijX33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0OgNMUtXKS5HvgXe7abexMtFH5eulOsAuFZkQ5LYJa/m4yHFInXzL/t3hjdTi2NmxUufvYzwIyffRTu5vS9vjscARD9lUQDHFQ/xgWe1i8EkRlrSfjlXt00+4//h2bcJKyTBT3IXwvKNsuY29V9/vU3HkvWKZ99zpSlmcZRuBa1BHbyPEvc0NlqIIoKidxqUvOR64MzudHhAjgWFP+IXojfhS3Gj9OJhBL7s\",\n"
+ " \"nonce\": \"14b16c03dc1b\"\n"
+ " },\n"
+ " \"expire_time\": \"2028-09-17T23:15:58+08:00\",\n"
+ " \"serial_no\": \"5DEA10EF55877E3CF6C33255C2E7DEFFF7E427EC\"\n"
+ " }\n"
+ " ]\n"
+ "}\n";
+ "}";

public static final String DOWNLOAD_CERTIFICATE_SERIAL_NUMBER =
"19FBBF2A24A3F3C97F5925FA855A850D6E4624AF";
"5DEA10EF55877E3CF6C33255C2E7DEFFF7E427EC";

static {
try {
Expand Down
Loading