<html><head></head><body>
<p>Yalp! Sure, already have what I need, right?</p>
<p>So define:</p>
<p>ASN1Value subclass: #ASN1DomainObject<br/>
instanceVariableNames: 'className'<br/>
classVariableNames: ''<br/>
poolDictionaries: ''<br/>
category: 'CryptographyASN1-Objects'</p>
<p>Then whenever we have an unknown object to write or reading in
the same, output in ASN1 a class structure, with className (let us
say #SessionConfig and instance variables: '</p>
<blockquote>
<ul>
<li>selectedCipherName</li>
<li>selectedEncoderName</li>
<li>cryptoCiphers</li>
<li>dataEncoders</li>
<li>protocolMap</li>
<li>preferredProtocol '</li>
</ul>
</blockquote>
<p>So using ASN1WrapperConstructedType or ASN1ExplicitContextValue,</p>
<p>ASN1WrapperType subclass: #ASN1WrapperConstructedType<br/>
instanceVariableNames: ''<br/>
classVariableNames: ''<br/>
poolDictionaries: ''<br/>
category: 'CryptographyASN1-Types'</p>
<p>Dynamically create a subclass of ASN1DomainObject, with the right
ivars (className in the superclass) and accessors:</p>
<p>ASN1DomainObject subclass: #ASN1DOSessionConfig<br/>
instanceVariableNames: 'selectedCipherName selectedEncoderName
cryptoCiphers dataEncoders protocolMap preferredProtocol'<br/>
classVariableNames: ''<br/>
poolDictionaries: ''<br/>
category: 'CryptographyASN1-Types'</p>
<p>Thus we dynamically defined a domain object class for the unknown
#SessionConfig structure. This meets the needs of A, B & C.<br/>
</p>
<p>K, r<br/>
</p>
<div class="moz-cite-prefix">On 4/20/20 4:10 PM, tim Rowledge wrote:<br/>
</div>
<blockquote type="cite" cite="mid:D2D03A95-57D4-4C07-B6D0-11E77506DFF4@rowledge.org">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On 2020-04-20, at 2:03 AM, Marcel Taeumel <a class="moz-txt-link-rfc2396E" href="mailto:marcel.taeumel@hpi.de"><marcel.taeumel@hpi.de></a> wrote:
Uhh! This feels like JavaScript ... :o) I would rather work on improving Squeak's meta-object protocol and with it class construction and refinement. Especially for tests. Let's not undermine the idea of having classes in Smalltalk.
-1 for DynamicObject.
Objects in Squeak/Smalltalk are quite dynamic already. That name is misleading. :-)
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">I agree.
tim
--
tim Rowledge; <a class="moz-txt-link-abbreviated" href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a class="moz-txt-link-freetext" href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a>
CChheecckk yyoouurr dduupplleexx sswwiittcchh..
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Kindly,
Robert</pre>
</body></html>