91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.92MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-09-01
  • 語言: Java
  • 標(biāo)簽: 微信退款??

資源簡介

注意PKCS12證書 是從微信商戶平臺(tái)-》賬戶設(shè)置-》 API安全 中下載的

資源截圖

代碼片段和文件信息

/*
?*?====================================================================
?*?Licensed?to?the?Apache?Software?Foundation?(ASF)?under?one
?*?or?more?contributor?license?agreements.??See?the?NOTICE?file
?*?distributed?with?this?work?for?additional?information
?*?regarding?copyright?ownership.??The?ASF?licenses?this?file
?*?to?you?under?the?Apache?License?Version?2.0?(the
?*?“License“);?you?may?not?use?this?file?except?in?compliance
?*?with?the?License.??You?may?obtain?a?copy?of?the?License?at
?*
?*???http://www.apache.org/licenses/LICENSE-2.0
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing
?*?software?distributed?under?the?License?is?distributed?on?an
?*?“AS?IS“?BASIS?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY
?*?KIND?either?express?or?implied.??See?the?License?for?the
?*?specific?language?governing?permissions?and?limitations
?*?under?the?License.
?*?====================================================================
?*
?*?This?software?consists?of?voluntary?contributions?made?by?many
?*?individuals?on?behalf?of?the?Apache?Software?Foundation.??For?more
?*?information?on?the?Apache?Software?Foundation?please?see
?*?.
?*
?*/
package?com.utils;

import?java.io.File;
import?java.io.FileInputStream;
import?java.security.KeyStore;

import?javax.net.ssl.SSLContext;

import?org.apache.http.HttpEntity;
import?org.apache.http.client.methods.CloseableHttpResponse;
import?org.apache.http.client.methods.HttpPost;
import?org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import?org.apache.http.conn.ssl.SSLContexts;
import?org.apache.http.entity.StringEntity;
import?org.apache.http.impl.client.CloseableHttpClient;
import?org.apache.http.impl.client.HttpClients;
import?org.apache.http.util.EntityUtils;

/**
?*?This?example?demonstrates?how?to?create?secure?connections?with?a?custom?SSL
?*?context.
?*/
public?class?ClientCustomSSL?{

????public?static?String?doRefund(String?urlString?data)?throws?Exception?{
???? /**
???? ?*?注意PKCS12證書?是從微信商戶平臺(tái)-》賬戶設(shè)置-》?API安全?中下載的
???? ?*/
????
????????KeyStore?keyStore??=?KeyStore.getInstance(“PKCS12“);
????????FileInputStream?instream?=?new?FileInputStream(new?File(“D:/Program?Files/MyEclipse?6.5/workspace/weidian/WebRoot/cer/apiclient_cert.p12“));//P12文件目錄
????????try?{
???????? /**
???????? ?*?此處要改
???????? ?*?*/
????????????keyStore.load(instream?“1232309302“.toCharArray());//這里寫密碼..默認(rèn)是你的MCHID
????????}?finally?{
????????????instream.close();
????????}

????????//?Trust?own?CA?and?all?self-signed?certs
????????/**
???? ?*?此處要改
???? ?*?*/
????????SSLContext?sslcontext?=?SSLContexts.custom()
????????????????.loadKeyMaterial(keyStore?“1232309302“.toCharArray())//這里也是寫密碼的??
????????????????.build();
????????//?Allow?TLSv1?protocol?only
????????SSLConnectionSocketFactory?sslsf?=?new?SSLConnectionSocketFactory(
????????????????sslcontext
????????????????new?String[]?{?“TLSv1“?}
????????????????null
?????

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\
?????文件????????1140??2015-05-18?18:24??testWeixinRefund\.classpath
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\.myeclipse\
?????文件?????????321??2015-05-22?11:34??testWeixinRefund\.mymetadata
?????文件????????1018??2015-05-18?18:17??testWeixinRefund\.project
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\.settings\
?????文件?????????209??2015-05-19?14:47??testWeixinRefund\.settings\org.eclipse.core.resources.prefs
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\src\
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\src\com\
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\src\com\utils\
?????文件????????4426??2015-05-22?12:05??testWeixinRefund\src\com\utils\ClientCustomSSL.java
?????文件????????1157??2015-05-18?14:05??testWeixinRefund\src\com\utils\MD5Util.java
?????文件????????6612??2015-05-18?14:05??testWeixinRefund\src\com\utils\RequestHandler.java
?????文件????????2098??2015-05-18?14:05??testWeixinRefund\src\com\utils\Sha1Util.java
?????文件????????3682??2015-05-18?14:05??testWeixinRefund\src\com\utils\TenpayUtil.java
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\src\com\wechat\
?????文件????????2226??2015-05-22?12:02??testWeixinRefund\src\com\wechat\Refund.java
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\WebRoot\
?????文件?????????834??2015-05-18?18:17??testWeixinRefund\WebRoot\index.jsp
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\WebRoot\meta-INF\
?????文件??????????39??2015-05-18?18:17??testWeixinRefund\WebRoot\meta-INF\MANIFEST.MF
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\WebRoot\WEB-INF\
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\WebRoot\WEB-INF\classes\
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\WebRoot\WEB-INF\classes\com\
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\WebRoot\WEB-INF\classes\com\utils\
?????文件????????4064??2015-05-22?12:05??testWeixinRefund\WebRoot\WEB-INF\classes\com\utils\ClientCustomSSL.class
?????文件????????2154??2015-05-18?18:24??testWeixinRefund\WebRoot\WEB-INF\classes\com\utils\MD5Util.class
?????文件????????6325??2015-05-19?14:47??testWeixinRefund\WebRoot\WEB-INF\classes\com\utils\RequestHandler.class
?????文件????????3369??2015-05-18?18:24??testWeixinRefund\WebRoot\WEB-INF\classes\com\utils\Sha1Util.class
?????文件????????3396??2015-05-18?18:24??testWeixinRefund\WebRoot\WEB-INF\classes\com\utils\TenpayUtil.class
?????目錄???????????0??2015-05-22?12:05??testWeixinRefund\WebRoot\WEB-INF\classes\com\wechat\
............此處省略13個(gè)文件信息

評(píng)論

共有 條評(píng)論