⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
OpenSSL
/
Timestamp
/
View File Name :
cdesc-Timestamp.ri
U:RDoc::NormalModule[iI"Timestamp:ETI"OpenSSL::Timestamp;T0o:RDoc::Markup::Document:@parts[o;;[ o:RDoc::Markup::Paragraph;[I"BProvides classes and methods to request, create and validate ;TI"J{RFC3161-compliant}[http://www.ietf.org/rfc/rfc3161.txt] timestamps. ;TI"LRequest may be used to either create requests from scratch or to parse ;TI"Kexisting requests that again can be used to request timestamps from a ;TI"Ftimestamp server, e.g. via the net/http. The resulting timestamp ;TI"+response may be parsed using Response.;To:RDoc::Markup::BlankLine o; ;[I"GPlease note that Response is read-only and immutable. To create a ;TI"LResponse, an instance of Factory as well as a valid Request are needed.;T@S:RDoc::Markup::Heading: leveli: textI"Create a Response:;To:RDoc::Markup::Verbatim;[I"E#Assumes ts.p12 is a PKCS#12-compatible file with a private key ;TI"I#and a certificate that has an extended key usage of 'timeStamping' ;TI">p12 = OpenSSL::PKCS12.new(File.binread('ts.p12'), 'pwd') ;TI"&md = OpenSSL::Digest.new('SHA1') ;TI"@hash = md.digest(data) #some binary data to be timestamped ;TI"+req = OpenSSL::Timestamp::Request.new ;TI"req.algorithm = 'SHA1' ;TI" req.message_imprint = hash ;TI"!req.policy_id = "1.2.3.4.5" ;TI"req.nonce = 42 ;TI"+fac = OpenSSL::Timestamp::Factory.new ;TI"fac.gen_time = Time.now ;TI"fac.serial_number = 1 ;TI"Etimestamp = fac.create_timestamp(p12.key, p12.certificate, req) ;T:@format0S;;i; I"!Verify a timestamp response:;To;;[I"?#Assume we have a timestamp token in a file called ts.der ;TI"Cts = OpenSSL::Timestamp::Response.new(File.binread('ts.der')) ;TI"I#Assume we have the Request for this token in a file called req.der ;TI"Dreq = OpenSSL::Timestamp::Request.new(File.binread('req.der')) ;TI"C# Assume the associated root CA certificate is contained in a ;TI"'# DER-encoded file named root.cer ;TI"Eroot = OpenSSL::X509::Certificate.new(File.binread('root.cer')) ;TI"A# get the necessary intermediate certificates, available in ;TI"5# DER-encoded form in inter1.cer and inter2.cer ;TI"Iinter1 = OpenSSL::X509::Certificate.new(File.binread('inter1.cer')) ;TI"Iinter2 = OpenSSL::X509::Certificate.new(File.binread('inter2.cer')) ;TI"Zts.verify(req, root, inter1, inter2) -> ts or raises an exception if validation fails;T;0: @fileI"ext/openssl/ossl_ts.c;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[I"ext/openssl/ossl.c;TI"OpenSSL;TcRDoc::NormalModule