1*a24fe59cSnia# $NetBSD: pkgsrc.cnf,v 1.3 2021/04/10 19:49:59 nia Exp $
2d66ee6c3Sjoerg#
3d66ee6c3Sjoerg# OpenSSL sample configuration file for use by pkgsrc.sh
4d66ee6c3Sjoerg#
5d66ee6c3Sjoerg
6d66ee6c3Sjoerg# This definition stops the following lines choking if HOME isn't
7d66ee6c3Sjoerg# defined.
8d66ee6c3SjoergHOME			= .
9d66ee6c3SjoergRANDFILE		= $ENV::HOME/.rnd
10d66ee6c3Sjoerg
11d66ee6c3Sjoerg####################################################################
12d66ee6c3Sjoerg[ ca ]
13d66ee6c3Sjoergdefault_ca	= CA_default		# The default ca section
14d66ee6c3Sjoerg
15d66ee6c3Sjoerg####################################################################
16d66ee6c3Sjoerg[ CA_default ]
17d66ee6c3Sjoerg
18d66ee6c3Sjoergdir		= ./pkgsrc		# Where everything is kept
19d66ee6c3Sjoergcerts		= $dir/certs		# Where the issued certs are kept
20d66ee6c3Sjoergcrl_dir		= $dir/crl		# Where the issued crl are kept
21d66ee6c3Sjoergdatabase	= $dir/index.txt	# database index file.
22d66ee6c3Sjoerg#unique_subject	= no			# Set to 'no' to allow creation of
23d66ee6c3Sjoerg					# several ctificates with same subject.
24d66ee6c3Sjoergnew_certs_dir	= $dir/newcerts		# default place for new certs.
25d66ee6c3Sjoerg
26d66ee6c3Sjoergcertificate	= $dir/cacert.pem 	# The CA certificate
27d66ee6c3Sjoergserial		= $dir/serial 		# The current serial number
28d66ee6c3Sjoergcrlnumber	= $dir/crlnumber	# the current crl number
29d66ee6c3Sjoerg					# must be commented out to leave a V1 CRL
30d66ee6c3Sjoergcrl		= $dir/crl.pem 		# The current CRL
31d66ee6c3Sjoergprivate_key	= $dir/private/cakey.pem# The private key
32d66ee6c3SjoergRANDFILE	= $dir/private/.rand	# private random number file
33d66ee6c3Sjoerg
34d66ee6c3Sjoerg# Comment out the following two lines for the "traditional"
35d66ee6c3Sjoerg# (and highly broken) format.
36d66ee6c3Sjoergname_opt 	= ca_default		# Subject Name options
37d66ee6c3Sjoergcert_opt 	= ca_default		# Certificate field options
38d66ee6c3Sjoerg
39d66ee6c3Sjoerg# Extension copying option: use with caution.
40d66ee6c3Sjoerg# copy_extensions = copy
41d66ee6c3Sjoerg
42d66ee6c3Sjoerg# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
43d66ee6c3Sjoerg# so this is commented out by default to leave a V1 CRL.
44d66ee6c3Sjoerg# crlnumber must also be commented out to leave a V1 CRL.
45d66ee6c3Sjoerg# crl_extensions	= crl_ext
46d66ee6c3Sjoerg
47d66ee6c3Sjoergdefault_days	= 365			# how long to certify for
48d66ee6c3Sjoergdefault_crl_days= 30			# how long before next CRL
49d66ee6c3Sjoergdefault_md	= default		# use public key default MD
50d66ee6c3Sjoergpreserve	= no			# keep passed DN ordering
51d66ee6c3Sjoerg
52d66ee6c3Sjoerg# A few difference way of specifying how similar the request should look
53d66ee6c3Sjoerg# For type CA, the listed attributes must be the same, and the optional
54d66ee6c3Sjoerg# and supplied fields are just that :-)
55d66ee6c3Sjoergpolicy		= policy_match
56d66ee6c3Sjoerg
57d66ee6c3Sjoerg# For the CA policy
58d66ee6c3Sjoerg[ policy_match ]
59d66ee6c3SjoergcountryName		= match
60d66ee6c3SjoergstateOrProvinceName	= match
61d66ee6c3SjoergorganizationName	= match
62d66ee6c3SjoergorganizationalUnitName	= optional
63d66ee6c3SjoergcommonName		= supplied
64d66ee6c3SjoergemailAddress		= optional
65d66ee6c3Sjoerg
66d66ee6c3Sjoerg# For the 'anything' policy
67d66ee6c3Sjoerg# At this point in time, you must list all acceptable 'object'
68d66ee6c3Sjoerg# types.
69d66ee6c3Sjoerg[ policy_anything ]
70d66ee6c3SjoergcountryName		= optional
71d66ee6c3SjoergstateOrProvinceName	= optional
72d66ee6c3SjoerglocalityName		= optional
73d66ee6c3SjoergorganizationName	= optional
74d66ee6c3SjoergorganizationalUnitName	= optional
75d66ee6c3SjoergcommonName		= supplied
76d66ee6c3SjoergemailAddress		= optional
77d66ee6c3Sjoerg
78d66ee6c3Sjoerg####################################################################
79d66ee6c3Sjoerg[ req ]
80d66ee6c3Sjoergdefault_bits		= 2048
81d66ee6c3Sjoergdefault_keyfile 	= privkey.pem
82d66ee6c3Sjoergdefault_md		= sha1
83d66ee6c3Sjoergdistinguished_name	= req_distinguished_name
84d66ee6c3Sjoergx509_extensions	= v3_ca	# The extentions to add to the self signed cert
85d66ee6c3Sjoerg
86d66ee6c3Sjoergstring_mask = utf8only
87d66ee6c3Sjoerg
88d66ee6c3Sjoerg[ req_distinguished_name ]
89d66ee6c3SjoergcountryName			= Country Name (2 letter code)
90d66ee6c3SjoergcountryName_default		= AU
91d66ee6c3SjoergcountryName_min			= 2
92d66ee6c3SjoergcountryName_max			= 2
93d66ee6c3Sjoerg
94d66ee6c3SjoergstateOrProvinceName		= State or Province Name (full name)
95d66ee6c3SjoergstateOrProvinceName_default	= Some-State
96d66ee6c3Sjoerg
97d66ee6c3SjoerglocalityName			= Locality Name (eg, city)
98d66ee6c3Sjoerg
99d66ee6c3Sjoerg0.organizationName		= Organization Name (eg, company)
100d66ee6c3Sjoerg0.organizationName_default	= Internet Widgits Pty Ltd
101d66ee6c3Sjoerg
102d66ee6c3Sjoerg# we can do this but it is not needed normally :-)
103d66ee6c3Sjoerg#1.organizationName		= Second Organization Name (eg, company)
104d66ee6c3Sjoerg#1.organizationName_default	= World Wide Web Pty Ltd
105d66ee6c3Sjoerg
106d66ee6c3SjoergorganizationalUnitName		= Organizational Unit Name (eg, section)
107d66ee6c3Sjoerg#organizationalUnitName_default	=
108d66ee6c3Sjoerg
109d66ee6c3SjoergcommonName			= Common Name (eg, YOUR name)
110d66ee6c3SjoergcommonName_max			= 64
111d66ee6c3Sjoerg
112d66ee6c3SjoergemailAddress			= Email Address
113d66ee6c3SjoergemailAddress_max		= 64
114d66ee6c3Sjoerg
115d66ee6c3Sjoerg[ pkgkey ]
116d66ee6c3SjoergnsComment			= "Certificate for binary pkgsrc packages"
117d66ee6c3Sjoerg
118d66ee6c3SjoergsubjectKeyIdentifier=hash
119d66ee6c3SjoergauthorityKeyIdentifier=keyid,issuer
120d66ee6c3Sjoerg
121d66ee6c3SjoergsubjectAltName=email:move
122d66ee6c3Sjoerg
123d66ee6c3SjoergextendedKeyUsage = codeSigning, emailProtection
124d66ee6c3Sjoerg
125d66ee6c3Sjoerg[ pkgsec ]
126d66ee6c3SjoergnsComment			= "Certificate for pkg-vulnerabilities"
127d66ee6c3Sjoerg
128d66ee6c3SjoergsubjectKeyIdentifier=hash
129d66ee6c3SjoergauthorityKeyIdentifier=keyid,issuer
130d66ee6c3Sjoerg
131d66ee6c3SjoergsubjectAltName=email:move
132d66ee6c3Sjoerg
133d66ee6c3Sjoerg[ v3_ca ]
134d66ee6c3SjoergsubjectKeyIdentifier=hash
135d66ee6c3SjoergauthorityKeyIdentifier=keyid:always,issuer:always
136d66ee6c3SjoergbasicConstraints = critical,CA:true
137