simp-beaker-helpers 1.18.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.fixtures.yml +8 -0
  3. data/.gitignore +8 -0
  4. data/.gitlab-ci.yml +163 -0
  5. data/.rspec +4 -0
  6. data/.rubocop.yml +546 -0
  7. data/.travis.yml +36 -0
  8. data/CHANGELOG.md +231 -0
  9. data/Gemfile +51 -0
  10. data/LICENSE +27 -0
  11. data/README.md +543 -0
  12. data/Rakefile +151 -0
  13. data/files/pki/clean.sh +1 -0
  14. data/files/pki/make.sh +101 -0
  15. data/files/pki/template_ca.cnf +259 -0
  16. data/files/pki/template_host.cnf +263 -0
  17. data/files/puppet-agent-versions.yaml +46 -0
  18. data/lib/simp/beaker_helpers.rb +1231 -0
  19. data/lib/simp/beaker_helpers/constants.rb +25 -0
  20. data/lib/simp/beaker_helpers/inspec.rb +328 -0
  21. data/lib/simp/beaker_helpers/snapshot.rb +156 -0
  22. data/lib/simp/beaker_helpers/ssg.rb +383 -0
  23. data/lib/simp/beaker_helpers/version.rb +5 -0
  24. data/lib/simp/beaker_helpers/windows.rb +16 -0
  25. data/lib/simp/rake/beaker.rb +269 -0
  26. data/simp-beaker-helpers.gemspec +38 -0
  27. data/spec/acceptance/nodesets/default.yml +32 -0
  28. data/spec/acceptance/suites/default/check_puppet_version_spec.rb +23 -0
  29. data/spec/acceptance/suites/default/enable_fips_spec.rb +23 -0
  30. data/spec/acceptance/suites/default/fixture_modules_spec.rb +22 -0
  31. data/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb +43 -0
  32. data/spec/acceptance/suites/default/nodesets +1 -0
  33. data/spec/acceptance/suites/default/pki_tests_spec.rb +55 -0
  34. data/spec/acceptance/suites/default/set_hieradata_on_spec.rb +33 -0
  35. data/spec/acceptance/suites/default/write_hieradata_to_spec.rb +33 -0
  36. data/spec/acceptance/suites/fips_from_fixtures/00_default_spec.rb +63 -0
  37. data/spec/acceptance/suites/fips_from_fixtures/metadata.yml +2 -0
  38. data/spec/acceptance/suites/fips_from_fixtures/nodesets +1 -0
  39. data/spec/acceptance/suites/offline/00_default_spec.rb +165 -0
  40. data/spec/acceptance/suites/offline/README +2 -0
  41. data/spec/acceptance/suites/offline/nodesets/default.yml +26 -0
  42. data/spec/acceptance/suites/puppet_collections/00_default_spec.rb +25 -0
  43. data/spec/acceptance/suites/puppet_collections/metadata.yml +2 -0
  44. data/spec/acceptance/suites/puppet_collections/nodesets/default.yml +30 -0
  45. data/spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb +82 -0
  46. data/spec/acceptance/suites/snapshot/10_general_usage_spec.rb +56 -0
  47. data/spec/acceptance/suites/snapshot/nodesets +1 -0
  48. data/spec/acceptance/suites/windows/00_default_spec.rb +119 -0
  49. data/spec/acceptance/suites/windows/metadata.yml +2 -0
  50. data/spec/acceptance/suites/windows/nodesets/default.yml +33 -0
  51. data/spec/acceptance/suites/windows/nodesets/win2016.yml +35 -0
  52. data/spec/acceptance/suites/windows/nodesets/win2019.yml +34 -0
  53. data/spec/lib/simp/beaker_helpers_spec.rb +216 -0
  54. data/spec/spec_helper.rb +100 -0
  55. data/spec/spec_helper_acceptance.rb +25 -0
  56. metadata +243 -0
@@ -0,0 +1,151 @@
1
+ $: << File.expand_path( '../lib/', __FILE__ )
2
+
3
+ require 'rubygems'
4
+ require 'rake/clean'
5
+ require 'fileutils'
6
+ require 'find'
7
+ require 'rspec/core/rake_task'
8
+ require 'simp/rake/beaker'
9
+
10
+ @package='simp-beaker-helpers'
11
+ @rakefile_dir=File.dirname(__FILE__)
12
+
13
+ Simp::Rake::Beaker.new(@rakefile_dir)
14
+
15
+ CLEAN.include "#{@package}-*.gem"
16
+ CLEAN.include 'pkg'
17
+ CLEAN.include 'dist'
18
+ CLEAN.include '.vendor'
19
+ Find.find( @rakefile_dir ) do |path|
20
+ if File.directory? path
21
+ CLEAN.include path if File.basename(path) == 'tmp'
22
+ else
23
+ Find.prune
24
+ end
25
+ end
26
+
27
+
28
+ desc 'Ensure gemspec-safe permissions on all files'
29
+ task :chmod do
30
+ gemspec = File.expand_path( "#{@package}.gemspec", @rakefile_dir ).strip
31
+ spec = Gem::Specification::load( gemspec )
32
+ spec.files.each do |file|
33
+ FileUtils.chmod 'go=r', file
34
+ end
35
+ end
36
+
37
+ desc 'special notes about these rake commands'
38
+ task :help do
39
+ puts %Q{
40
+ == environment variables ==
41
+ SIMP_RPM_BUILD when set, alters the gem produced by pkg:gem to be RPM-safe.
42
+ 'pkg:gem' sets this automatically.
43
+ }
44
+ end
45
+
46
+ desc "Run spec tests"
47
+ RSpec::Core::RakeTask.new(:spec) do |t|
48
+ t.rspec_opts = ['--color']
49
+ t.pattern = 'spec/lib/**/*_spec.rb'
50
+ end
51
+
52
+ desc %q{run all RSpec tests (alias of 'spec')}
53
+ task :test => :spec
54
+
55
+ desc "Run acceptance tests"
56
+ RSpec::Core::RakeTask.new(:acceptance) do |t|
57
+ t.pattern = 'spec/acceptance'
58
+ end
59
+
60
+ namespace :pkg do
61
+ @specfile_template = "rubygem-#{@package}.spec.template"
62
+ @specfile = "build/rubygem-#{@package}.spec"
63
+
64
+ # ----------------------------------------
65
+ # DO NOT UNCOMMENT THIS: the spec file requires a lot of tweaking
66
+ # ----------------------------------------
67
+ # desc "generate RPM spec file for #{@package}"
68
+ # task :spec => [:clean, :gem] do
69
+ # Dir.glob("pkg/#{@package}*.gem") do |pkg|
70
+ # sh %Q{gem2rpm -t "#{@specfile_template}" "#{pkg}" > "#{@specfile}"}
71
+ # end
72
+ # end
73
+
74
+ desc "build rubygem package for #{@package}"
75
+ task :gem => :chmod do
76
+ Dir.chdir @rakefile_dir
77
+ Dir['*.gemspec'].each do |spec_file|
78
+ rpm_build = ENV.fetch('SIMP_RPM_BUILD', '1')
79
+ cmd = %Q{SIMP_RPM_BUILD=#{rpm_build} bundle exec gem build "#{spec_file}"}
80
+ sh cmd
81
+ FileUtils.mkdir_p 'dist'
82
+ FileUtils.mv Dir.glob("#{@package}*.gem"), 'dist/'
83
+ end
84
+ end
85
+
86
+
87
+ desc "build and install rubygem package for #{@package}"
88
+ task :install_gem => [:clean, :gem] do
89
+ Dir.chdir @rakefile_dir
90
+ Dir.glob("dist/#{@package}*.gem") do |pkg|
91
+ sh %Q{bundle exec gem install #{pkg}}
92
+ end
93
+ end
94
+
95
+
96
+ desc "generate RPM for #{@package}"
97
+ require 'tmpdir'
98
+ task :rpm, [:mock_root] => [:clean, :gem] do |t, args|
99
+ mock_root = args[:mock_root]
100
+ # TODO : Get rid of this terrible code. Shoe-horned in until
101
+ # we have a better idea for auto-decet
102
+ if mock_root =~ /^epel-6/ then el_version = '6'
103
+ elsif mock_root =~ /^epel-7/ then el_version = '7'
104
+ else puts 'WARNING: Did not detect epel version'
105
+ end
106
+ tmp_dir = ''
107
+
108
+ if tmp_dir = ENV.fetch( 'SIMP_MOCK_SIMPGEM_ASSETS_DIR', false )
109
+ FileUtils.mkdir_p tmp_dir
110
+ else
111
+ tmp_dir = Dir.mktmpdir( "build_#{@package}" )
112
+ end
113
+
114
+ begin
115
+ Dir.chdir tmp_dir
116
+ specfile = "#{@rakefile_dir}/build/rubygem-#{@package}.el#{el_version}.spec"
117
+ tmp_specfile = "#{tmp_dir}/rubygem-#{@package}.el#{el_version}.spec"
118
+
119
+ # We have to copy to a local directory because mock bugs out in NFS
120
+ # home directories (where SIMP devs often work)
121
+ FileUtils.cp specfile, tmp_specfile, :preserve => true
122
+ Dir.glob("#{@rakefile_dir}/dist/#{@package}*.gem") do |pkg|
123
+ FileUtils.cp pkg, tmp_dir, :preserve => true
124
+ end
125
+
126
+ # Build SRPM from specfile
127
+ sh %Q{mock -r #{mock_root} --buildsrpm --source="#{tmp_dir}" --spec="#{tmp_specfile}" --resultdir="#{tmp_dir}"}
128
+
129
+ # Build RPM from SRPM
130
+ Dir.glob("#{tmp_dir}/rubygem-#{@package}-*.el#{el_version}*.src.rpm") do |pkg|
131
+ sh %Q{mock -r #{mock_root} --rebuild "#{pkg}" --resultdir=#{tmp_dir} --no-cleanup-after}
132
+ end
133
+
134
+ sh %Q{ls -l "#{tmp_dir}"}
135
+
136
+ # copy RPM back into pkg/
137
+ Dir.glob("#{tmp_dir}/rubygem-#{@package}-*.el#{el_version}*.rpm") do |pkg|
138
+ sh %Q{cp "#{pkg}" "#{@rakefile_dir}/dist/"}
139
+ FileUtils.cp pkg, "#{@rakefile_dir}/dist/"
140
+ end
141
+ ensure
142
+ Dir.chdir @rakefile_dir
143
+ # cleanup if needed
144
+ if ! ENV.fetch( 'SIMP_MOCK_SIMPGEM_ASSETS_DIR', false )
145
+ FileUtils.remove_entry_secure tmp_dir
146
+ end
147
+ end
148
+ end
149
+ end
150
+
151
+ # vim: syntax=ruby
@@ -0,0 +1 @@
1
+ rm -rf working demoCA keydist cacertkey ca.cnf
@@ -0,0 +1,101 @@
1
+ # For ruby
2
+ export PATH=/opt/puppetlabs/puppet/bin:$PATH
3
+
4
+ DAYS="-days 365"
5
+ REQ="openssl req $SSLEAY_CONFIG"
6
+ CA="openssl ca $SSLEAY_CONFIG"
7
+ VERIFY="openssl verify"
8
+ X509="openssl x509"
9
+
10
+ CATOP=./demoCA
11
+ CAKEY=./cakey.pem
12
+ CACERT=./cacert.pem
13
+ CASERIAL=`uuidgen | cut -f1 -d'-'`
14
+
15
+ keydist=keydist
16
+
17
+ # start clean
18
+ bash clean.sh
19
+
20
+ mkdir -p working "${keydist}" "${keydist}/cacerts"
21
+
22
+ # Create new CA if necessary
23
+ # ------------------------------------------------------------------------------
24
+ mkdir -p ${CATOP} ${CATOP}/certs ${CATOP}/crl ${CATOP}/newcerts ${CATOP}/private
25
+ if [ ! -f cacertkey ]; then
26
+ dd if=/dev/urandom status=none bs=60 count=1 | openssl base64 -e -nopad | tr -d '\n' > cacertkey
27
+ echo '' >> cacertkey
28
+ fi
29
+ if [ ! -f ${CATOP}/serial ]; then
30
+ echo "01" > ${CATOP}/serial
31
+ fi
32
+ touch ${CATOP}/index.txt
33
+
34
+ echo "== Making CA certificate ..."
35
+ sed "s/^\([[:space:]]*commonName_default\).*/\1 \t\t= Fake Org Fake CA - ${CASERIAL}/" template_ca.cnf > ca.cnf
36
+
37
+ export OPENSSL_CONF=ca.cnf
38
+
39
+ $REQ -verbose -batch -passout file:cacertkey -new -x509 -keyout ${CATOP}/private/$CAKEY -out ${CATOP}/$CACERT $DAYS
40
+
41
+ echo "== Making Client certificates ..."
42
+ for hosts in $*; do
43
+ hosts=`echo $hosts | sed -e 's/[ \t]//g'`
44
+ hname=`echo $hosts | cut -d',' -f1`
45
+
46
+ echo "-- $hname"
47
+ mkdir -p "${keydist}/${hname}/cacerts"
48
+
49
+ sed -e "s/#HOSTNAME#/${hname}/" template_host.cnf > "working/${hname}.cnf"
50
+
51
+ if [ "$hname" != "$hosts" ];
52
+ then
53
+ alts=`echo $hosts | cut -d',' -f1-`
54
+ altnames=''
55
+ for i in `echo $alts | tr ',' '\n'`
56
+ do
57
+ ruby -r ipaddr -e "begin IPAddr.new('$i') rescue exit 1 end"
58
+ if [ $? -eq 0 ]; then
59
+ # This is required due to some applications not properly supporting the
60
+ # IP version of subjectAltName.
61
+ prefixes='IP DNS'
62
+ else
63
+ prefixes='DNS'
64
+ fi
65
+
66
+ for prefix in $prefixes; do
67
+ if [ "$altnames" != '' ]
68
+ then
69
+ altnames+=",$prefix:$i"
70
+ else
71
+ altnames+="$prefix:$i"
72
+ fi
73
+ done
74
+ done
75
+
76
+ sed -i "s/# subjectAltName = #ALTNAMES#/subjectAltName = ${altnames}/" "working/${hname}.cnf"
77
+ fi
78
+
79
+ echo "-- running openssl req"
80
+
81
+ export OPENSSL_CONF="working/${hname}.cnf"
82
+
83
+ $REQ -new -nodes -keyout ${keydist}/${hname}/${hname}.pem -out working/"${hname}"req.pem -days 360 -batch;
84
+
85
+ echo "-- running openssl ca"
86
+
87
+ $CA -passin file:cacertkey -batch -out ${keydist}/${hname}/${hname}.pub -infiles working/"${hname}"req.pem
88
+
89
+ cat ${keydist}/${hname}/${hname}.pub >> ${keydist}/${hname}/${hname}.pem
90
+ done
91
+
92
+ echo "== Hashing CA certs"
93
+ cacerts="${keydist}/cacerts"
94
+ hash=`openssl x509 -in ${CATOP}/${CACERT} -hash -noout`;
95
+ cp ${CATOP}/${CACERT} $cacerts/cacert_${CASERIAL}.pem
96
+ cd $cacerts
97
+ ln -s cacert_${CASERIAL}.pem $hash.0
98
+ cd -
99
+
100
+ chmod -R u+rwX,g+rX,o-rwx $keydist
101
+ #chown -R root:puppet $keydist
@@ -0,0 +1,259 @@
1
+ #
2
+ # OpenSSL example configuration file.
3
+ # This is mostly being used for generation of certificate requests.
4
+ #
5
+
6
+ # This definition stops the following lines choking if HOME isn't
7
+ # defined.
8
+ HOME = .
9
+ RANDFILE = $ENV::HOME/.rnd
10
+
11
+ # Extra OBJECT IDENTIFIER info:
12
+ #oid_file = $ENV::HOME/.oid
13
+ oid_section = new_oids
14
+
15
+ # To use this configuration file with the "-extfile" option of the
16
+ # "openssl x509" utility, name here the section containing the
17
+ # X.509v3 extensions to use:
18
+ # extensions =
19
+ # (Alternatively, use a configuration file that has only
20
+ # X.509v3 extensions in its main [= default] section.)
21
+
22
+ [ new_oids ]
23
+
24
+ # We can add new OIDs in here for use by 'ca' and 'req'.
25
+ # Add a simple OID like this:
26
+ # testoid1=1.2.3.4
27
+ # Or use config file substitution like this:
28
+ # testoid2=${testoid1}.5.6
29
+
30
+ ####################################################################
31
+ [ ca ]
32
+ default_ca = CA_default # The default ca section
33
+
34
+ ####################################################################
35
+ [ CA_default ]
36
+
37
+ dir = ./demoCA # Where everything is kept
38
+ certs = $dir/certs # Where the issued certs are kept
39
+ crl_dir = $dir/crl # Where the issued crl are kept
40
+ database = $dir/index.txt # database index file.
41
+ new_certs_dir = $dir/newcerts # default place for new certs.
42
+
43
+ certificate = $dir/cacert.pem # The CA certificate
44
+ serial = $dir/serial # The current serial number
45
+ crl = $dir/crl.pem # The current CRL
46
+ private_key = $dir/private/cakey.pem# The private key
47
+ RANDFILE = $dir/private/.rand # private random number file
48
+
49
+ x509_extensions = usr_cert # The extentions to add to the cert
50
+
51
+ # Comment out the following two lines for the "traditional"
52
+ # (and highly broken) format.
53
+ name_opt = ca_default # Subject Name options
54
+ cert_opt = ca_default # Certificate field options
55
+
56
+ # Extension copying option: use with caution.
57
+ # copy_extensions = copy
58
+
59
+ # Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
60
+ # so this is commented out by default to leave a V1 CRL.
61
+ # crl_extensions = crl_ext
62
+
63
+ default_days = 365 # how long to certify for
64
+ default_crl_days= 30 # how long before next CRL
65
+ default_md = sha256 # which md to use.
66
+ preserve = no # keep passed DN ordering
67
+
68
+ # A few difference way of specifying how similar the request should look
69
+ # For type CA, the listed attributes must be the same, and the optional
70
+ # and supplied fields are just that :-)
71
+ policy = policy_anything
72
+
73
+ # For the CA policy
74
+ [ policy_match ]
75
+ countryName = match
76
+ stateOrProvinceName = match
77
+ organizationName = match
78
+ organizationalUnitName = optional
79
+ commonName = supplied
80
+ emailAddress = optional
81
+
82
+ # For the 'anything' policy
83
+ # At this point in time, you must list all acceptable 'object'
84
+ # types.
85
+ [ policy_anything ]
86
+ countryName = optional
87
+ stateOrProvinceName = optional
88
+ localityName = optional
89
+ organizationName = optional
90
+ organizationalUnitName = optional
91
+ commonName = supplied
92
+ emailAddress = optional
93
+
94
+ ####################################################################
95
+ [ req ]
96
+ default_bits = 2048
97
+ default_keyfile = privkey.pem
98
+ distinguished_name = req_distinguished_name
99
+ attributes = req_attributes
100
+ x509_extensions = v3_ca # The extentions to add to the self signed cert
101
+
102
+ # Passwords for private keys if not present they will be prompted for
103
+ # input_password = secret
104
+ # output_password = secret
105
+
106
+ # This sets a mask for permitted string types. There are several options.
107
+ # default: PrintableString, T61String, BMPString.
108
+ # pkix : PrintableString, BMPString.
109
+ # utf8only: only UTF8Strings.
110
+ # nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
111
+ # MASK:XXXX a literal mask value.
112
+ # WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings
113
+ # so use this option with caution!
114
+ string_mask = nombstr
115
+
116
+ # req_extensions = v3_req # The extensions to add to a certificate request
117
+
118
+ [ req_distinguished_name ]
119
+ countryName = Country Name (2 letter code)
120
+ countryName_default = ZZ
121
+ countryName_min = 2
122
+ countryName_max = 2
123
+
124
+ #stateOrProvinceName = State or Province Name (full name)
125
+ #stateOrProvinceName_default = Berkshire
126
+
127
+ #localityName = Locality Name (eg, city)
128
+ #localityName_default = Newbury
129
+
130
+ 0.organizationName = Organization Name (eg, company)
131
+ 0.organizationName_default = Fake Org
132
+
133
+ # we can do this but it is not needed normally :-)
134
+ #1.organizationName = Second Organization Name (eg, company)
135
+ #1.organizationName_default = World Wide Web Pty Ltd
136
+
137
+ organizationalUnitName = Organizational Unit Name (eg, section)
138
+ organizationalUnitName_default = Hosts
139
+
140
+ commonName = Common Name (eg, your name or your server\'s hostname)
141
+ commonName_max = 64
142
+ commonName_default = Fake Org Fake CA - #SERIAL#
143
+
144
+ #emailAddress = Email Address
145
+ #emailAddress_max = 64
146
+
147
+ # SET-ex3 = SET extension number 3
148
+
149
+ [ req_attributes ]
150
+ #challengePassword = A challenge password
151
+ #challengePassword_min = 4
152
+ #challengePassword_max = 20
153
+ #challengePassword_default = password
154
+
155
+ unstructuredName = An optional company name
156
+
157
+ [ usr_cert ]
158
+
159
+ # These extensions are added when 'ca' signs a request.
160
+
161
+ # This goes against PKIX guidelines but some CAs do it and some software
162
+ # requires this to avoid interpreting an end user certificate as a CA.
163
+
164
+ basicConstraints=CA:FALSE
165
+
166
+ # Here are some examples of the usage of nsCertType. If it is omitted
167
+ # the certificate can be used for anything *except* object signing.
168
+
169
+ # This is OK for an SSL server.
170
+ # nsCertType = server
171
+
172
+ # For an object signing certificate this would be used.
173
+ # nsCertType = objsign
174
+
175
+ # For normal client use this is typical
176
+ # nsCertType = client, email
177
+
178
+ # and for everything including object signing:
179
+ # nsCertType = client, email, objsign
180
+
181
+ # This is typical in keyUsage for a client certificate.
182
+ # keyUsage = nonRepudiation, digitalSignature, keyEncipherment
183
+
184
+ # This will be displayed in Netscape's comment listbox.
185
+ nsComment = "Completely Fake Certificate"
186
+
187
+ # PKIX recommendations harmless if included in all certificates.
188
+ subjectKeyIdentifier=hash
189
+ authorityKeyIdentifier=keyid,issuer:always
190
+
191
+ # This stuff is for subjectAltName and issuerAltname.
192
+ # Import the email address.
193
+ subjectAltName=email:copy
194
+ # An alternative to produce certificates that aren't
195
+ # deprecated according to PKIX.
196
+ # subjectAltName=email:move
197
+
198
+ # Copy subject details
199
+ # issuerAltName=issuer:copy
200
+
201
+ #nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
202
+ #nsBaseUrl
203
+ #nsRevocationUrl
204
+ #nsRenewalUrl
205
+ #nsCaPolicyUrl
206
+ #nsSslServerName
207
+
208
+ [ v3_req ]
209
+
210
+ # Extensions to add to a certificate request
211
+
212
+ basicConstraints = CA:FALSE
213
+ #keyUsage = nonRepudiation, digitalSignature, keyEncipherment
214
+ keyUsage = keyEncipherment
215
+
216
+ [ v3_ca ]
217
+
218
+
219
+ # Extensions for a typical CA
220
+
221
+
222
+ # PKIX recommendation.
223
+
224
+ subjectKeyIdentifier=hash
225
+
226
+ authorityKeyIdentifier=keyid:always,issuer:always
227
+
228
+ # This is what PKIX recommends but some broken software chokes on critical
229
+ # extensions.
230
+ #basicConstraints = critical,CA:true
231
+ # So we do this instead.
232
+ basicConstraints = CA:true
233
+
234
+ # Key usage: this is typical for a CA certificate. However since it will
235
+ # prevent it being used as an test self-signed certificate it is best
236
+ # left out by default.
237
+ # keyUsage = cRLSign, keyCertSign
238
+
239
+ # Some might want this also
240
+ # nsCertType = sslCA, emailCA
241
+
242
+ # Include email address in subject alt name: another PKIX recommendation
243
+ # subjectAltName=email:copy
244
+ # Copy issuer details
245
+ # issuerAltName=issuer:copy
246
+
247
+ # DER hex encoding of an extension: beware experts only!
248
+ # obj=DER:02:03
249
+ # Where 'obj' is a standard or added object
250
+ # You can even override a supported extension:
251
+ # basicConstraints= critical, DER:30:03:01:01:FF
252
+
253
+ [ crl_ext ]
254
+
255
+ # CRL extensions.
256
+ # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
257
+
258
+ # issuerAltName=issuer:copy
259
+ authorityKeyIdentifier=keyid:always,issuer:always