-
-
Save manveru/156c959d5b8820d9b0e0e9c5732614fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'drb/ssl' | |
DRb.start_service | |
DRb.config.merge!( | |
SSLVerifyMode: OpenSSL::SSL::VERIFY_PEER, | |
SSLCACertificateFile: 'pki/ca.crt', | |
SSLPrivateKey: OpenSSL::PKey::RSA.new(File.read('client/pki/private/ManveruClient.key')), | |
SSLCertificate: OpenSSL::X509::Certificate.new(File.read('pki/issued/ManveruClient.crt')), | |
) | |
obj = DRbObject.new_with_uri('drbssl://localhost:1234') | |
p obj.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'drb/ssl' | |
DRb.start_service( | |
'drbssl://localhost:1234', | |
{}, | |
SSLVerifyMode: OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT, | |
SSLCACertificateFile: 'pki/ca.crt', | |
SSLPrivateKey: OpenSSL::PKey::RSA.new(File.read('pki/private/ca.key')), | |
SSLCertificate: OpenSSL::X509::Certificate.new(File.read('pki/ca.crt')), | |
SSLVerifyCallback: ->(ok, c){ ok }, | |
) | |
DRb.thread.join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment