<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFE0">
Hi Max,<br>
<br>
<div class="moz-cite-prefix">On 8/14/2018 1:33 AM, Weijun Wang
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:B5B296D6-B9C7-49BA-8C26-163A10FADDB7@oracle.com">
<pre wrap="">Here is the change for both classes. I use "original object" so a caller would know what the filter should expect.</pre>
</blockquote>
ok<br>
<blockquote type="cite"
cite="mid:B5B296D6-B9C7-49BA-8C26-163A10FADDB7@oracle.com">
<pre wrap="">
diff --git a/src/java.base/share/classes/java/security/SignedObject.java b/src/java.base/share/classes/java/security/SignedObject.java
--- a/src/java.base/share/classes/java/security/SignedObject.java
+++ b/src/java.base/share/classes/java/security/SignedObject.java
@@ -59,10 +59,16 @@
* Signature.getInstance(algorithm, provider);
* if (so.verify(publickey, verificationEngine))
* try {
- * Object myobj = so.getObject();
+ * ObjectInputFilter myfilter = ...;
+ * Object myobj = so.getObject(myfilter);
* } catch (java.lang.ClassNotFoundException e) {};
* }</pre>
*
+ * In this example, an {@link ObjectInputFilter} <strike>object</strike> is used during
+ * deserialization of the original object. If {@link #getObject()} is
+ * called, the {@link ObjectInputFilter.Config#getSerialFilter()
+ * initial process-wide filter} is used instead.
+ *</pre>
</blockquote>
Just saying "an ObjectInputFilter is used"... is fine.<br>
<blockquote type="cite"
cite="mid:B5B296D6-B9C7-49BA-8C26-163A10FADDB7@oracle.com">
<pre wrap="">
* <p> Several points are worth noting. First, there is no need to
* initialize the signing or verification engine, as it will be
* re-initialized inside the constructor and the {@code verify}
diff --git a/src/java.base/share/classes/javax/crypto/SealedObject.java b/src/java.base/share/classes/javax/crypto/SealedObject.java
--- a/src/java.base/share/classes/javax/crypto/SealedObject.java
+++ b/src/java.base/share/classes/javax/crypto/SealedObject.java
@@ -86,6 +86,12 @@
*
* </ul>
*
+ * Both methods have overloaded forms that accept an {@link ObjectInputFilter}
+ * parameter, which will be used during deserialization of the original object.
+ * If a {@code getObject} method without a {@code ObjectInputFilter} parameter
+ * is called, the {@link ObjectInputFilter.Config#getSerialFilter()
+ * initial process-wide filter} is used instead.
This last paragraph is after the <ul> of lines 57-86 [1] that talks about 2 getObject() methods to retrieve the original object.
I'll update the CSR if you're OK with the words.</pre>
</blockquote>
Looks fine to me.<br>
<br>
Thanks, Roger<br>
<br>
<blockquote type="cite"
cite="mid:B5B296D6-B9C7-49BA-8C26-163A10FADDB7@oracle.com">
<pre wrap="">
Thanks
Max
[1] <a class="moz-txt-link-freetext" href="http://hg.openjdk.java.net/jdk/jdk/file/977c6dd636bd/src/java.base/share/classes/javax/crypto/SealedObject.java#l57">http://hg.openjdk.java.net/jdk/jdk/file/977c6dd636bd/src/java.base/share/classes/javax/crypto/SealedObject.java#l57</a>
</pre>
<blockquote type="cite">
<pre wrap="">On Aug 14, 2018, at 12:29 PM, Weijun Wang <a class="moz-txt-link-rfc2396E" href="mailto:weijun.wang@oracle.com"><weijun.wang@oracle.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Aug 7, 2018, at 10:57 PM, Roger Riggs <a class="moz-txt-link-rfc2396E" href="mailto:roger.riggs@oracle.com"><roger.riggs@oracle.com></a> wrote:
It may be useful to include in the descriptions a reminder that if no ObjectInputFilter
is supplied the global filter is used. Details in ObjectInputStream.
</pre>
</blockquote>
<pre wrap="">
The new getObject() methods with an ObjectInputFilter does not allow it to be null, so it looks strange to mention this in the method spec.
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>