Ubuntu 11.04 64-bit
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
public_key:der_decode('CertificateList', Der). | |
{'CertificateList', | |
{'TBSCertList',v2, | |
{'AlgorithmIdentifier',{1,2,840,113549,1,1,5},<<5,0>>}, | |
{rdnSequence, | |
[[{'AttributeTypeAndValue',{2,5,4,6},<<19,1,67>>}], | |
[{'AttributeTypeAndValue',{2,5,4,8},<<12,2,83,84>>}], | |
[{'AttributeTypeAndValue',{2,5,4,3},<<12,2,67,78>>}]]}, | |
{utcTime,"101123233530Z"}, | |
{utcTime,"101130233530Z"}, |
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
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c | |
index fe7256a..b64227a 100644 | |
--- a/ext/openssl/ossl_asn1.c | |
+++ b/ext/openssl/ossl_asn1.c | |
@@ -877,7 +877,7 @@ int_ossl_asn1_decode0_cons(unsigned char **pp, long max_len, | |
} | |
} | |
- if (tc == sUNIVERSAL && (tag == V_ASN1_SEQUENCE || V_ASN1_SET)) { | |
+ if (tc == sUNIVERSAL && (tag == V_ASN1_SEQUENCE || tag == V_ASN1_SET)) { |
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
11/12/18 23:16:01 YoruFukurou[25271] Exception detected while handling key input. | |
11/12/18 23:16:01 YoruFukurou[25271] *** Collection <NSCFDictionary: 0x101051a90> was mutated while being enumerated.<CFBasicHash 0x101051a90 [0x7fff7043dee0]>{type = mutable dict, count = 1, | |
entries => | |
2 : <CFString 0x114fb3580 [0x7fff7043dee0]>{contents = "50534906-41F0-438C-9DD6-30535FF88335"} = <CFString 0x100165348 [0x7fff7043dee0]>{contents = "Main Stream"} | |
} |
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
## module OpenSSL::OCSP | |
## http://doc.ruby-lang.org/ja/1.9.3/class/OpenSSL=3a=3aOCSP.html | |
require 'openssl' | |
require 'net/http' | |
## 動作確認のために追記 | |
ca_cert = OpenSSL::X509::Certificate.new(File.read('client-ca.pem')) | |
cert = OpenSSL::X509::Certificate.new(File.read('client.pem')) | |
store = OpenSSL::X509::Store.new |
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 'socket' | |
sock4 = UDPSocket.new(Socket::AF_INET) | |
sock4.bind('0.0.0.0', 40000) # => 0 | |
sock6 = UDPSocket.new(Socket::AF_INET6) | |
sock6.bind('::', 40000) # =>Errno::EADDRINUSE: Address already in use - bind(2) | |
sock6.setsockopt(Socket::IPPROTO_IPV6, Socket::IPV6_V6ONLY, true) | |
sock6.bind('::', 40000) # => 0 |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'fog' | |
name = ARGV[0] | |
conn =Fog::Compute.new({ | |
:provider => 'XenServer', | |
:xenserver_url => '192.168.1.2', |
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
## ruby 2.0.0dev | |
irb(main):001:0> require 'openssl' | |
=> true | |
irb(main):002:0> ef = OpenSSL::X509::ExtensionFactory.new | |
=> #<OpenSSL::X509::ExtensionFactory:0x007fd72213f6e0 @config=nil> | |
irb(main):003:0> ef.create_ext('basicConstraints', 'CA:TRUE, pathlen:1', true) | |
=> #<OpenSSL::X509::Extension:0x007fd7221245e8> | |
## ruby 1.9.3p194 |
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
Certificate: | |
Data: | |
Version: 3 (0x2) | |
Serial Number: 1 (0x1) | |
Signature Algorithm: sha1WithRSAEncryption | |
Issuer: CN=CA | |
Validity | |
Not Before: Dec 16 04:56:09 2012 GMT | |
Not After : Dec 16 04:56:09 2012 GMT | |
Subject: CN=CA |
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 'openssl' | |
cRLDistributionPoints= | |
OpenSSL::ASN1::Sequence.new([ | |
OpenSSL::ASN1::Sequence.new([ | |
OpenSSL::ASN1::ASN1Data.new([ | |
OpenSSL::ASN1::ASN1Data.new([ | |
OpenSSL::ASN1::ASN1Data.new( | |
distributionPointName = "http://example.com/example.crl", | |
6, :CONTEXT_SPECIFIC |
OlderNewer