RSA2验签遭遇异常,请检查公钥格式是否正确。待验签内容不可为空

news/2024/11/19 13:36:39/

支付宝支付,上线突然出现这个问题。

2021-09-27 22:54:37	2021-09-27 14:54:37.348 [http-nio-5020-exec-7] INFO  com.fastonetech.listener.OrderPayedListener - 支付宝回调,{}
2021-09-27 22:54:37	2021-09-27 14:54:37.348 [http-nio-5020-exec-7] ERROR o.a.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.alipay.api.AlipayApiException: RSA2验签遭遇异常,请检查公钥格式是否正确。待验签内容不可为空 content=,charset=utf-8,publicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg7tj75iqJOmibtbcRT+SuXFfDd3XELKgpviuI1y00y2eOI3AvIcb/feyEu8uFmDaAo+j5QWKduQl94tpYjgRkb/xGXg8zxZj047BhwyYx4mfIjKbR32HQc09AtfC4hnYsIS1WGiwtqnQDyxXEAfFffPsL1jQJmrdAPQPt7nthVAHvMQPyDuKTxtbIn9r7HJ9844jQzBfgh6eNnXGYX4Mx4AG0egWTp0nwIgG2oG6dIX3DqG7wRpVImFkLz38RoSy0/5aS8HJOninidb0OHVCoj48S5+PsgluRQ4j44qa0t2ahNU73KNAYcJ9oXc8GWUhKJM5icC2fpPLh8SaCRGaswIDAQAB] with root cause
2021-09-27 22:54:37	com.alipay.api.AlipayApiException: 待验签内容不可为空
2021-09-27 22:54:37		at com.alipay.api.internal.util.asymmetric.BaseAsymmetricEncryptor.verify(BaseAsymmetricEncryptor.java:85)
2021-09-27 22:54:37		at com.alipay.api.internal.util.AlipaySignature.rsaCheck(AlipaySignature.java:588)
2021-09-27 22:54:37		at com.alipay.api.internal.util.AlipaySignature.rsaCheckV1(AlipaySignature.java:547)
2021-09-27 22:54:37		at com.fastonetech.listener.OrderPayedListener.isSignVerified(OrderPayedListener.kt:63)
2021-09-27 22:54:37		at com.fastonetech.listener.OrderPayedListener.handleAlipayed(OrderPayedListener.kt:43)
2021-09-27 22:54:37		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-09-27 22:54:37		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-09-27 22:54:37		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-09-27 22:54:37		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021-09-27 22:54:37		at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
2021-09-27 22:54:37		at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
2021-09-27 22:54:37		at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
2021-09-27 22:54:37		at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
2021-09-27 22:54:37		at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
2021-09-27 22:54:37		at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
2021-09-27 22:54:37		at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1063)
2021-09-27 22:54:37		at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
2021-09-27 22:54:37		at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
2021-09-27 22:54:37		at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
2021-09-27 22:54:37		at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
2021-09-27 22:54:37		at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
2021-09-27 22:54:37		at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
2021-09-27 22:54:37		at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
2021-09-27 22:54:37		at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
2021-09-27 22:54:37		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
2021-09-27 22:54:37		at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
2021-09-27 22:54:37		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
2021-09-27 22:54:37		at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
2021-09-27 22:54:37		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
2021-09-27 22:54:37		at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
2021-09-27 22:54:37		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190)
2021-09-27 22:54:37		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
2021-09-27 22:54:37		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
2021-09-27 22:54:37		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
2021-09-27 22:54:37		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
2021-09-27 22:54:37		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
2021-09-27 22:54:37		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
2021-09-27 22:54:37		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
2021-09-27 22:54:37		at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764)
2021-09-27 22:54:37		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
2021-09-27 22:54:37		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
2021-09-27 22:54:37		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
2021-09-27 22:54:37		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
2021-09-27 22:54:37		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
2021-09-27 22:54:37		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
2021-09-27 22:54:37		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2021-09-27 22:54:37		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2021-09-27 22:54:37		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2021-09-27 22:54:37		at java.base/java.lang.Thread.run(Thread.java:829)

解决问题的思路

1、回调地址是否并更过,配置错误;我们就是http修改为https的跳转
2、公钥和私钥是否配置正确。
3、调用的支付宝的配置是否配置成功。


http://www.ppmy.cn/news/911918.html

相关文章

POI和POI-TL操作Word

POI操作Word 操作依赖包org.apache.poi,包括poi和poi-ooxml。创建空白Word文件 void poiCreateNewWord() {String path "C:\\Users\\wisdom21111\\Desktop\\";XWPFDocument document new XWPFDocument();try {FileOutputStream out new FileOutputStr…

beagleboneblack(BBB)开发板使用NFS挂载根文件系统,tftp下载镜像与设备树

一、文件下载 交叉编译工具链下载地址 wget -c https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-linux-gnueabihf/gcc-linaro-6.5.0-2018.12-i686_arm-linux-gnueabihf.tar.xz beagleboneblack内核kernel下载地址,切换到tag为4.19.94-t…

数据结构与算法基础ppt

根据数据结构C语言版第2版书编写。想要电子书的童鞋可以私我 B站学习地址 9.13开始 9.29更新到p118 线性表 2.1线性表的定义和特点 P10 2.2 案例引入 p11 2.3 线性表的类型定义 p12 2.4 线性表的顺序表示和实现1 p13 2.4 线性表的顺序表示和实现2 p14 P15 第02周06–类C语言…

ia笔记总结

HCIA 计算机 使用二进制语言 应用层:人机交互的接口,自然语言转化为编码表示层:编码–>二进制,翻译介质访问控制层:控制硬件物理层:CPU 对等网 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接…

golang打包后在另一台电脑运行报错/lib64/libc.so.6: version `GLIBC_xxxx‘ not found解决方案

前言 最近使用golang打包项目出现个问题报错/lib64/libc.so.6: version GLIBC_xxxx’ not found,很多人都说需要安装GLIBC解决,但是这里有个误区,好像CGO库是依赖glibc的(具体的我也没有考证)就是我根部就没有使用CGO…

jakarta ee_Jakarta EE社区之声:Jakarta EE的未来是什么?

jakarta ee 本月初,Jakarta EE社区成员被邀请参加Jakarta EE社区之声文档 ,该文档重点关注Jakarta EE规范的技术创新。 本文档中的内容反映了参与者对他们希望贡献时间的领域的个人观点。 但是,必须提及的是,它们并不代表硬性承诺…

C#正则表达式通过HTML提取网页中的图片src

C#正则表达式通过HTML提取网页中的图片src 原文: C#正则表达式通过HTML提取网页中的图片src 目前在做HoverTreeCMS项目中有处理图片的部分,参考了一下网上案例,自己写了一个获取内容中的图片地址的方法。可以先看看效果:http://tool.hovertre…

leetcode|math|9.172.69.50.

9. Palindrome Number to_string 就行 172. Factorial Trailing Zeroes 不能直接乘起来,会overflow!! 166! 就是要找166乘到1一共有几个5。5,10,15,25...都算。166/5就是算一共有几个5。但是25其实贡献了…