VA Smalltalk's ST: Cryptographic Support feature contains the following Applications:
• OpenSSLCryptoInterfaceApp - High-Level bindings to OpenSSL's cryptographic library.
• OpenSSLCryptoInterfaceExamplesApp - Contains numerous code examples showing how to use the various Crypto APIs.Even when brand new functionality is introduced into VA Smalltalk, the reality is that design decisions from existing functionality often influence it. This means that backwards compatibility could be broken if these existing design decisions are not accounted for and maintaining this compatibility is always a primary goal for VA Smalltalk. The cryptographic feature is no exception. VA Smalltalk has been using OpenSSL ever since it began including support for SSL/TLS. In the same way that OpenSSL's SSL/TLS library depends on OpenSSL's cryptographic library...we also introduced the same dependency at the application level. If you load the ST: Socket Communications Interface feature, you will see that the SciSslSocketInterface application lists OpenSSLCryptoInterfaceApp as a prerequisite.
• Functions & Constants: All functions and constants in OpenSSL header files are defined as pool variables in OpenSSLCryptoInterfaceApp's pool dictionaries.
• Functions resolve to Smalltalk <PlatformFunction>s
• Constants resolve to the primitive types found in the OpenSSL header files such as Integers and Strings.
• Dispatching Engine: The actual call to one of the defined OpenSSL functions is performed by the OpenSSLCryptoLibraryDispatcher. In addition to performing the function call, the dispatcher also interprets the return value and creates error objects where required.
• OSObject: Objects responsible for presenting an API to the caller and delegating functionality requests to the dispatcher object.Developers are expected to only interact through the API of the various OSObjects. There should not be a need to call upon the dispatcher directly and certainly calling raw PlatformFunctions is discouraged.Memory-Ownership: Each Crypto OSObject has the concept of memory ownership. This means:Reference-Counter: OpenSSL APIs can answer a new instance of data or an existing data that has its reference count incremented. We internally mirror this and keep track of the reference counts so we know how many times to call free (which decrements a positive reference count) before we know the object was truly freed.GC Notifier: When an OpenSSL OSObject is about to be garbage collected, the notifier is informed and makes sure to call free on the OSObject if it is a memory owner.
|