تعيين Keytool اسم المضيف
-
18-09-2019 - |
سؤال
أحاول فقط استخدام Java Keytool لكن لا يمكنني معرفة كيفية تعيين اسم المضيف.
هذا هو ما هو محاولتي:
hostname[username:/this/is/a/path][640]% keytool -keystore server.keystore -genkeypair -alias hostname
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: hostname
What is the name of your organizational unit?
[Unknown]: hostname
What is the name of your organization?
[Unknown]: hostname
What is the name of your City or Locality?
[Unknown]: hostname
What is the name of your State or Province?
[Unknown]: hostname
What is the two-letter country code for this unit?
[Unknown]: CA
Is CN=hostname, OU=hostname, O=hostname, L=hostname, ST=hostname, C=CA correct?
[no]: yes
Enter key password for <hostname>
(RETURN if same as keystore password):
hostname[username:/this/is/a/path][641]%
منذ أن قمت بتعيين جميع الحقول إلى اسم المضيف، يمكنني افتراض أن اسم مضيف My Host على اسم المضيف؟
المحلول
CN = اسم المضيف - إنه الخيار الأول الذي طلبته هنا. إنه أمر مربك أن Keytool يشير إليها باسم "الاسم الأول والأخير".
نصائح أخرى
وفقا للقطعة 3.1 "هوية خادم" RFC 2818 "HTTP على TLS", ، من المفترض أن يقارن العميل جزء CN (الاسم الشائع) من الموضوع DN (الاسم المميز) في شهادة الخادم إلى اسم مضيف DNS في عنوان URL.
لذلك استخدم الاسم الشائع (CN) لاسم المضيف (السؤال الأول من KeyTool).
لا تنتمي إلى StackOverflow