(james-jdkim) 02/03: Only 'pass' result should be considered for valid signatures.

[email protected]
Newsgroups gmane.comp.jakarta.james.devel
Message-ID <[email protected]>
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-jdkim.git

commit cf4c5a86c7807db4f9cb2787719d2280d2933ff3
Author: Emerson Pinter <[email protected]>
AuthorDate: Thu Mar 27 12:32:32 2025 -0300

    Only 'pass' result should be considered for valid signatures.
---
 main/src/main/java/org/apache/james/jdkim/api/Result.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/src/main/java/org/apache/james/jdkim/api/Result.java b/main/src/main/java/org/apache/james/jdkim/api/Result.java
index 065fe81..a383a48 100644
--- a/main/src/main/java/org/apache/james/jdkim/api/Result.java
+++ b/main/src/main/java/org/apache/james/jdkim/api/Result.java
@@ -112,7 +112,7 @@ public class Result {
                     reasonMsg = "valid signature";
                     break;
                 case NONE:
-                    reasonMsg = "not signed";
+                    reasonMsg = "unknown error";
                     break;
                 default:
                     reasonMsg = errorMessage != null ? errorMessage : "";
@@ -147,7 +147,7 @@ public class Result {
      * @return Returns true if success
      */
     public boolean isSuccess() {
-        return type == Type.PASS || type == Type.NONE || type == Type.NEUTRAL;
+        return type == Type.PASS;
     }
 
     /**
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.