aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichal Rokos <m.rokos@sh.cvut.cz>2002-01-04 11:12:22 +0000
committerMichal Rokos <m.rokos@sh.cvut.cz>2002-01-04 11:12:22 +0000
commit30c7790a512172b5254775fbad8f601d5638c1e6 (patch)
tree39a0ceb2db8fcd07e8b82bc107e5cc2a05df9d24 /test
parent99d5a24aa57c9eb4ac792a36e0947dc5df84fe8c (diff)
downloadruby-openssl-history-30c7790a512172b5254775fbad8f601d5638c1e6.tar.gz
* Further checking (Check_SafeStr, memory leaks)
Diffstat (limited to 'test')
-rwxr-xr-xtest/ossl_x509.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ossl_x509.rb b/test/ossl_x509.rb
index 4a7abe3..1c65217 100755
--- a/test/ossl_x509.rb
+++ b/test/ossl_x509.rb
@@ -38,6 +38,11 @@ p x509 = Certificate.new(File.open("./01cert.pem").read)
p key = RSA.new(1024)
p new = Certificate.new
name = [['C', 'CZ'],['O','Rokos'],['CN','pokusXXX']]
+#p n = Name.new(name)
+#p n.to_h
+#p n.to_a
+#p n.to_str
+#exit
p new.subject = Name.new(name)
p new.issuer = Name.new(name)
p new.not_before = Time.now
@@ -48,6 +53,10 @@ p new.version = 3
#p new.extensions #each_with_index {|e, i| p e.to_a}
maker = ExtensionFactory.new(nil, new) #only subject
p ext1 = maker.create_extension(["basicConstraints","CA:FALSE,pathlen:5"])
+#p ext1.to_a
+#p ext1.to_h
+#p ext1.to_str
+#exit
p ext2 = maker.create_extension(["nsComment","OK, man!!!"])
###p digest = Digest::SHA1.new(new.public_key.to_der)
###p ext3 = maker.create_extension(["subjectKeyIdentifier", digest.hexdigest])