एक प्रमाण पत्र के बुनियादी नियमों पर चेतावनी के कारण क्या है?


8

मैंने OpenSSL की req -x509कमांड और एक CONF फ़ाइल का उपयोग करके एक स्व-हस्ताक्षरित सर्वर प्रमाणपत्र बनाया । CONF फ़ाइल को नीचे दिखाया गया है।

जब मैं Microsoft प्रमाणपत्र दर्शक का उपयोग कर प्रमाण पत्र की जांच करता हूं, तो इस पर एक चेतावनी basicConstraints(थोड़ा विस्मयबोधक बिंदु नोटिस) दिखा रहा है :

यहाँ छवि विवरण दर्ज करें

CONF फ़ाइल बनाने के लिए निम्नलिखित का उपयोग करता है basicConstraints:

basicConstraints = critical,CA:FALSE

आरएफसी 5280 के अनुसार , pathLenकेवल मौजूद होना चाहिए CA:TRUEऔर मौजूद होना चाहिए keyCertSign। सर्वर का प्रमाणपत्र या तो स्थिति को संतुष्ट नहीं करता है (प्लस, परीक्षण pathLenउसी चेतावनी के परिणामस्वरूप)।

Microsoft प्रमाणपत्र उपकरण पर चेतावनी क्यों है basicConstraints? इसमें क्या गलत है या इसे ठीक करने के लिए मुझे क्या करना चाहिए?


# Self Signed (note the addition of -x509):
#     openssl req -config example.conf -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout example.key.pem -days 365 -out example.cert.pem

# Self Signed with existing key (note the addition of -x509):
#     openssl req -config example.conf -new -x509 -sha256 -key example.key.pem -days 365 -out example.cert.pem

# Signing Request (note the lack of -x509):
#     openssl req -config example.conf -new -newkey rsa:2048 -nodes -keyout example.key.pem -days 365 -out example.req.pem

# Signing Request with existing key (note the lack of -x509):
#     openssl req -config example.conf -new -key example.key.pem -days 365 -out example.req.pem

# Print it:
#     openssl x509 -in example.cert.pem -text -noout
#     openssl req -in example.req.pem -text -noout

[ req ]
default_bits        = 2048
default_keyfile     = server-key.pem
distinguished_name  = subject
req_extensions      = req_ext
x509_extensions     = x509_ext
string_mask         = utf8only

# The Subject DN can be formed using X501 or RFC 4514 (see RFC 4519 for a description).
#   Its sort of a mashup. For example, RFC 4514 does not provide emailAddress.
[ subject ]
countryName         = Country Name (2 letter code)
countryName_default     = US

stateOrProvinceName     = State or Province Name (full name)
stateOrProvinceName_default = MD

localityName            = Locality Name (eg, city)
localityName_default        = Baltimore

organizationName         = Organization Name (eg, company)
organizationName_default    =

# Use a friendly name here because its presented to the user. The server's DNS
#   names are placed in Subject Alternate Names. Plus, DNS names here is deprecated
#   by both IETF and CA/Browser Forums.
commonName          = Common Name (e.g. server FQDN or YOUR name)
commonName_default      = Example, LLC

emailAddress            = Email Address
emailAddress_default        = webmaster@example.com

# Section x509_ext is used when generating a self-signed certificate. I.e., openssl req -x509 ...
[ x509_ext ]

subjectKeyIdentifier        = hash
authorityKeyIdentifier  = keyid,issuer

basicConstraints        = critical,CA:FALSE
keyUsage            = digitalSignature, keyEncipherment
subjectAltName          = @alternate_names
nsComment           = "OpenSSL Generated Certificate"

# RFC 5280, Section 4.2.1.12 makes EKU optional
# CA/Browser Baseline Requirements, Appendix (B)(3)(G) makes me confused
extendedKeyUsage    = serverAuth

# Section req_ext is used when generating a certificate signing request. I.e., openssl req ...
[ req_ext ]

subjectKeyIdentifier        = hash

basicConstraints        = critical,CA:FALSE
keyUsage            = digitalSignature, keyEncipherment
subjectAltName          = @alternate_names
nsComment           = "OpenSSL Generated Certificate"

# RFC 5280, Section 4.2.1.12 makes EKU optional
# CA/Browser Baseline Requirements, Appendix (B)(3)(G) makes me confused
extendedKeyUsage    = serverAuth

[ alternate_names ]

DNS.1       = example.com
DNS.2       = www.example.com
DNS.3       = mail.example.com
DNS.4       = ftp.example.com

# Add these if you need them. But usually you don't want them or
#   need them in production. You may need them for development.
# DNS.5       = localhost
# DNS.6       = localhost.localdomain
# DNS.7       = 127.0.0.1

# IPv6 localhost
# DNS.8     = ::1

जवाबों:


6

विस्मयादिबोधक चिह्न के साथ छोटा पीला त्रिकोण आपको यह बताने के लिए है कि विस्तार महत्वपूर्ण के रूप में चिह्नित है। आइकन से छुटकारा पाने के लिए, ओपनएसएसएल कॉन्फ़िगरेशन से 'महत्वपूर्ण' क्रिया को हटा दें।

इसके अलावा, एक मूल बाधा के साथ अंतिम-इकाई प्रमाणपत्र को चिह्नित करने की कोई आवश्यकता नहीं है जिसमें cAबूलियन को गलत पर सेट किया जाता है क्योंकि यह सभी प्रमाणपत्रों में निहित होता है जिसमें इसे सही पर सेट नहीं किया जाता है। यह वहां होने का उल्लंघन नहीं है; लेकिन इसकी जरूरत नहीं है।

हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.