X.509 pharo smalltalk certificate operations

I am very new to smalltalk. I installed Pharo 5.0 and use a standard image.

I want to create / read x.509 certs in Smalltalk. I searched and found ZdcPluginSSLSession (which uses SqueakSSL, which in turn uses ssleay32.dll / libeay.dll). I understand that Zodiac / Zinc can be used to create SSL sessions with certificates.

Can anyone tell me how to get started with smalltalk certificates. I want to perform operations with certificates, for example, create / analyze / verify, etc. Am I using ssleay32.dll instead? Where can I get good documents for FFI to be used with Pharo 5.0?

Thanks in advance.

+4
source share
1 answer

You can go your own route using FFI or use only the smalltalk method. For the latter, you can download the project from

http://smalltalkhub.com/#!/~NorbertHartl/X509

for reading certificates. You can download it by opening the playing field and doing:

Metacello new
  configuration: 'X509';
  version: #development;
  repository: 'http://smalltalkhub.com/mc/NorbertHartl/X509/main';
  load.

Implementation there can be used with

X509 readCertificateFromPEM: '/path/to/pem/file.pem' asFileReference readStream 

The implementation of the X509 is quite simple and gives you an idea of ​​how to work with the included ASN.1 package. If you have any questions, please contact me directly. I really want to help with this.

+5
source

Source: https://habr.com/ru/post/1652887/


All Articles