<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">The smallest content I could generate using keytool was 200 bytes: a 1-byte password.<div><br><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000000 3082011b 02010330 81d60609 2a864886</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000020 f70d0107 01a081c8 0481c530 81c23081</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000040 bf06092a 864886f7 0d010701 a081b104</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000060 81ae3081 ab3081a8 060b2a86 4886f70d</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000100 010c0a01 05a05930 57060b2a 864886f7</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000120 0d010c0a 0102a048 04463044 3028060a</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000140 2a864886 f70d010c 0103301a 04147856</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000160 a3689d4b e55469af fbfa2a41 d5d3ce1d</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000200 81360202 04000418 7867f3fc a91b9a1b</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000220 7b863cc5 7e89e11e db14739a e623462c</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000240 313e3019 06092a86 4886f70d 01091431</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000260 0c1e0a00 6d007900 6b006500 79302106</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000300 092a8648 86f70d01 09153114 04125469</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000320 6d652031 34313839 30383339 32363333</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000340 303d3021 30090605 2b0e0302 1a050004</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000360 144a9a2f f169cbdc 65e31b6e fd5d25a8</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000400 a7096207 55041433 c18e4ee1 0ee7fc7f</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000420 4e0177a3 f7248ac0 9484bd02 02040000</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0000437</div><div><br></div><div><br></div><div><div>On 18 Dec 2014, at 14:59, Wang Weijun <<a href="mailto:weijun.wang@oracle.com">weijun.wang@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><blockquote type="cite">On Dec 18, 2014, at 22:12, Vincent Ryan <<a href="mailto:vincent.x.ryan@oracle.com">vincent.x.ryan@oracle.com</a>> wrote:<br><br>Thanks for reviewing, Max.<br><br><br>On 18 Dec 2014, at 06:52, Wang Weijun <<a href="mailto:weijun.wang@oracle.com">weijun.wang@oracle.com</a>> wrote:<br><br><blockquote type="cite"><br><blockquote type="cite">On Dec 18, 2014, at 07:58, Vincent Ryan <<a href="mailto:vincent.x.ryan@oracle.com">vincent.x.ryan@oracle.com</a>> wrote:<br><br>FYI I’ve updated the webrev to include the changes below:<br> <a href="http://cr.openjdk.java.net/~vinnie/8044445/webrev.05/">http://cr.openjdk.java.net/~vinnie/8044445/webrev.05/</a><br></blockquote><br>PKCS12KeyStore.PKCS12_HEADER_PATTERNS.<br><br>Is there a possibility for this?<br><br>30 82 -- -- 02 01 03 30 81 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 -- 04<br><br>That is to say, the length of ContentInfo is only slight smaller than 128. My understanding this is more likely than existing pattern #5 and #6.<br></blockquote><br>In theory it may be possible but the smallest non-empty content that I could generate was about 200 bytes.<br></blockquote><br>Oh, so #2 is reserved for an empty keystore. :-)<br><br><blockquote type="cite">Do you have an example?<br></blockquote><br>No. I tried to store a DES key there but see "NoSuchAlgorithmException: unrecognized algorithm name: DES". Maybe DES is obsolete? What would be the size if another tool creates a DES key? Will it be small enough?<br><br>I use keytool to -genseckey an AES key, ContentInfo has size D0. A little bigger.<br><br><blockquote type="cite">KeyStore.getInstance(file,pass,param,hasP):<br><blockquote type="cite"><br>It seems if one engineProbe() returns true but loading fails you will try the next storetype. Right? If so, dataStream.reset() should be called.<br></blockquote><br>No. If loading fails then an exception is thrown - no further storetypes are checked.<br></blockquote><br>I see. I thought new KeyStore(impl, (Provider)objs[1], type) could throw some exception. That's where I called "loading".<br><br>--Max<br><br><blockquote type="cite"><br><br><blockquote type="cite"><br>Thanks<br>Max<br><br></blockquote><br></blockquote><br></blockquote></div><br></div></div></body></html>