简体   繁体   English

使用pharo smalltalk进行x.509证书操作

[英]x.509 certificate operations with pharo smalltalk

I am very new to smalltalk. 我对smalltalk很新。 I have installed Pharo 5.0 and use the standard image. 我安装了Pharo 5.0并使用标准图像。

I want to create/read x.509 certs in Smalltalk. 我想在Smalltalk中创建/读取x.509证书。 Searched for and found ZdcPluginSSLSession (which uses SqueakSSL which in turn uses ssleay32.dll/libeay.dll). 搜索并找到ZdcPluginSSLSession(使用SqueakSSL,后者又使用ssleay32.dll / libeay.dll)。 I understand Zodiac/Zinc can be used to create SSL sessions with certs. 我了解Zodiac / Zinc可用于创建带证书的SSL会话。

Can anyone tell how to get started with certs on smalltalk. 任何人都可以告诉如何开始使用smalltalk上的证书。 I want to perform operations on certs like create/parse/validate etc. Do I use ssleay32.dll instead ? 我想对诸如create / parse / validate等证书执行操作。我是否使用ssleay32.dll? Where can i get some good docs on FFI to be used with Pharo 5.0? 我在哪里可以得到一些关于FFI的好文档与Pharo 5.0一起使用?

Thanks in advance. 提前致谢。

You can go either the native route using FFI or you could use a smalltalk only approach. 您可以使用FFI使用本机路由,也可以使用smalltalk方法。 For the latter you can load the project from 对于后者,您可以从中加载项目

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

to read certificates. 阅读证书。 You can load it by opening a playground and executing: 您可以通过打开游乐场并执行以下命令来加载它:

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

The implementation there can be used with 那里的实现可以使用

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

The X509 implementation is pretty simple and gives you an idea how to work with the ASN.1 suite included. X509实现非常简单,让您了解如何使用包含的ASN.1套件。 If you have questions contact me directly. 如有疑问,请直接与我联系。 I'm eager to help with it. 我很想帮忙。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM