Skip to content

Instantly share code, notes, and snippets.

@Hexa
Created December 18, 2012 14:36
Show Gist options
  • Save Hexa/4328513 to your computer and use it in GitHub Desktop.
Save Hexa/4328513 to your computer and use it in GitHub Desktop.
cRLDistributionPoints and issuingDistributionPoint
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
)], 0, :CONTEXT_SPECIFIC
)], 0, :CONTEXT_SPECIFIC
),
OpenSSL::ASN1::ASN1Data.new([
OpenSSL::ASN1::BitString.new(
reasons = ['00010101'].pack('B8')
)], 1, :CONTEXT_SPECIFIC
)]
)]
)
issuingDistributionPoint =
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
)], 0, :CONTEXT_SPECIFIC
)], 0, :CONTEXT_SPECIFIC
),
OpenSSL::ASN1::ASN1Data.new([
OpenSSL::ASN1::Boolean.new(
onlyUserCertificates = true
).to_der], 1, :CONTEXT_SPECIFIC
),
OpenSSL::ASN1::ASN1Data.new([
OpenSSL::ASN1::BitString.new(
onlySomeReasons = ['011011010'].pack('B8'),
1
)], 3, :CONTEXT_SPECIFIC
)]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment