{"id":298344,"date":"2020-02-07T09:00:12","date_gmt":"2020-02-07T09:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298344"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298344","title":{"rendered":"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u043e \u0432\u0437\u0430\u0438\u043c\u043d\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 Java c TLS\/SSL"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/dbtc\/blog\/487318\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/eb\/ev\/fa\/ebevfa5pxhb86uheboysklyk6vc.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u0437\u0430\u0449\u0438\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432\u0441\u0435 \u0447\u0430\u0449\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0444\u0430\u043d\u0430\u0442\u0438\u0437\u043c\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0441\u0444\u0435\u0440\u043e\u0439 \u043c\u043e\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u041f\u041e \u0432 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u043c \u0441\u0435\u043a\u0442\u043e\u0440\u0435, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0438\u0441\u0442\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0440\u0438\u0441\u043a\u043e\u0432, \u044f \u043d\u0435 \u043c\u043e\u0433 \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0441 \u0447\u0435\u043c \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u043b\u0438\u0431\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0442\u0438\u043f\u0430 nginx \u0438\u043b\u0438 apache, \u0441\u0442\u043e\u044f\u0449\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0441\u0435\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 dmz. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u0443\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0441\u0435\u0442\u044c \u0438 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u0414\u0430\u043b\u0435\u0435, \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u041a\u0442\u043e-\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0432 GUI \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0440\u043e\u043b\u0435\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u0442\u043e-\u0442\u043e \u0438\u0434\u0435\u0442 \u0434\u0430\u043b\u044c\u0448\u0435, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f LDAP \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u043e\u0433\u0438\u043d, \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u043e\u0431\u0449\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. <\/p>\n<p>  <\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/tools.ietf.org\/html\/rfc2865\">RADIUS<\/a>, <a href=\"https:\/\/tools.ietf.org\/html\/rfc4120\">Kerberos <\/a> \u0438\u043b\u0438 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749\">OAuth\/OpenID<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0445\u0435\u043c\u044b \u0441 <a href=\"https:\/\/tools.ietf.org\/html\/rfc7617\">\u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u0443\u043d\u0442\u0435\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439<\/a>, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 base64, \u043a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"https:\/\/tools.ietf.org\/html\/rfc7519\">JsonWebToken<\/a>, \u0435\u0449\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0447\u0442\u043e \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0448\u0438\u0444\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c, \u043d\u043e \u0438 \u0437\u043d\u0430\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0422\u0435\u0445\u0426\u0435\u043d\u0442\u0440\u0435 \u0414\u043e\u0439\u0447\u0435 \u0411\u0430\u043d\u043a\u0430 \u043c\u044b \u0432 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u0435\u0436\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c SSL-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u2014 \u0434\u0430\u0436\u0435 \u0432 UAT \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u0412 Java \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c JKS, \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d\u044b, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u043c \u2014 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u043e\u0440\u0433\u0430\u043d\u043e\u0432 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443, \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u0443, \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043a\u043e\u0434\u0443 \u0441 \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>  <\/p>\n<h2 id=\"terminologiya\">\u0422\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u044f<\/h2>\n<p>  <\/p>\n<ul>\n<li><strong>SSL<\/strong> (\u0430\u043d\u0433\u043b. <strong>Secure Sockets Layer<\/strong> \u2014 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0445 \u0441\u043e\u043a\u0435\u0442\u043e\u0432) \u2014 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0443\u044e \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0439 \u043e\u0431\u043c\u0435\u043d\u0430, \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0434\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0422\u0440\u0435\u0442\u044c\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6101\">RFC-6101<\/a>. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432 SSL \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2014-3566\">CVE-2014-3566<\/a> \u0432 \u0441\u0432\u044f\u0437\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435. \u0412 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/tools.ietf.org\/html\/rfc5246\">RFC-5246<\/a> \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 TLS.<\/li>\n<li><strong>TLS<\/strong> (\u0430\u043d\u0433\u043b. <strong>Transport Layer Security<\/strong> \u2014 \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0437\u0430\u0449\u0438\u0442\u044b \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f) \u2014 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0438\u0434\u0435\u0438 SSLv3 \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0442\u0430\u043c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"format-sertifikatov\">\u0424\u043e\u0440\u043c\u0430\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <a href=\"https:\/\/en.wikipedia.org\/wiki\/PKCS_12\">PKCS 12<\/a> \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 Java, \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 JKS (Java KeyStore). \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c JDK \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/technotes\/tools\/unix\/keytool.html\">keytool<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 keystore, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">keytool -genkey -alias example.com -keyalg RSA -keystore keystore.jks  -keysize 2048<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0440\u044f\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 JKS \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0432 Java<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0442\u0438\u043b\u0438\u0442\u044b keytool<\/b><\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 (CSR) \u0434\u043b\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e Java keystore<br \/> \n<pre><code class=\"bash\">keytool -certreq -alias example.com -keystore keystore.jks -file example.com.csr<\/code><\/pre>\n<\/li>\n<li>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e CA \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430<br \/> \n<pre><code class=\"bash\">keytool -import -trustcacerts -alias root -file Thawte.crt -keystore keystore.jks<\/code><\/pre>\n<\/li>\n<li>\u0418\u043c\u043f\u043e\u0440\u0442 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430<br \/> \n<pre><code class=\"bash\">keytool -import -trustcacerts -alias example.com -file example.com.crt -keystore keystore.jks<\/code><\/pre>\n<\/li>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0430\u043f\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0438 keystore<br \/> \n<pre><code class=\"bash\">keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048<\/code><\/pre>\n<\/li>\n<li>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430<br \/> \n<pre><code class=\"bash\">keytool -printcert -v -file example.com.crt<\/code><\/pre>\n<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 keystore<br \/> \n<pre><code class=\"bash\">keytool -list -v -keystore keystore.jks<\/code><\/pre>\n<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043f\u043e \u0430\u043b\u0438\u0430\u0441\u0443 \u0432 keystore<br \/> \n<pre><code class=\"bash\">keytool -list -v -keystore keystore.jks -alias example.com<\/code><\/pre>\n<\/li>\n<li>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0438\u0437 keystore<br \/> \n<pre><code class=\"bash\">keytool -delete -alias example.com -keystore keystore.jks<\/code><\/pre>\n<\/li>\n<li>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f keystore<br \/> \n<pre><code class=\"bash\">keytool -storepasswd -new new_storepass -keystore keystore.jks<\/code><\/pre>\n<\/li>\n<li>\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0438\u0437 keystore<br \/> \n<pre><code class=\"bash\">keytool -export -alias example.com -file example.com.crt -keystore keystore.jks<\/code><\/pre>\n<\/li>\n<li>\u0421\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432<br \/> \n<pre><code class=\"bash\">keytool -list -v -keystore $JAVA_HOME\/jre\/lib\/security\/cacerts<\/code><\/pre>\n<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0432 trustStore<br \/> \n<pre><code class=\"bash\">keytool -import -trustcacerts -file \/path\/to\/ca\/ca.pem -alias CA_ALIAS -keystore $JAVA_HOME\/jre\/lib\/security\/cacerts<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2 id=\"keystore--truststore\">KeyStore &amp; TrustStore<\/h2>\n<p>  <\/p>\n<p>\u0413\u043e\u0432\u043e\u0440\u044f \u043e JKS, \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a KeyStore \u0442\u0430\u043a \u0438 TrustStore. \u042d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 JKS \u0444\u0430\u0439\u043b\u0430\u0445. \u041e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445 (KeyStore) \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0442\u0438\u043f\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0432\u0435\u0441 \u0447\u0435\u043c\u0443 TrustStore \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f Linux \u0441\u0438\u0441\u0442\u0435\u043c \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0445 \u043d\u0430\u0439\u0442\u0438 \u0432 <code>\/usr\/local\/share\/ca-certificates\/<\/code><\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0442\u0430\u043a \u0436\u0435 \u044d\u0442\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0438\u0434\u0443\u0442 \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0435 Java \u0432 \u0444\u0430\u0439\u043b\u0435 cacerts, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>java.home\\lib\\security<\/code> \u0438 \u0438\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <strong>changeit<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 JDK\/JRE \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, \u0438 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0443\u0434\u0430 \u0441\u0432\u043e\u0438\u0445 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0434\u043b\u044f prod\/uat \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u043c\u0438 KeyStore &amp; TrustStore.<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>Keystore<\/th>\n<th>TrustStore<\/th>\n<\/tr>\n<tr>\n<td>\u0425\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u0430\u0448\u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b (\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435)<\/td>\n<td>\u0425\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b (\u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0435 \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 CA root)<\/td>\n<\/tr>\n<tr>\n<td>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u043e\u0439\u043a\u0438 SSL \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/td>\n<td>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435<\/td>\n<\/tr>\n<tr>\n<td>\u041a\u043b\u0438\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432 keystore<\/td>\n<td>\u0421\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u0434\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 trustStore<\/td>\n<\/tr>\n<tr>\n<td>javax.net.ssl.keyStore \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 keystore<\/td>\n<td>javax.net.ssl.trustStore \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 trustStore<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h2 id=\"podklyuchenie-ssl-k-nettyserver\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 SSL \u043a NettyServer<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438(protobuf) \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0431\u0441\u043e\u043a\u0435\u0442\u044b (wss), \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f SSL \u0432 netty \u0441\u0435\u0440\u0432\u0435\u0440. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u0431\u0438\u043b\u0434\u0435\u0440\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 .withSslContext(), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">NettyServer.builder()         .addHttpListener(         NetworkInterfaceBuilder.forPort(serviceUri.getPort())             .withSslContext(sslContextFactory.getSslContext()),         PathHandler.path()             .addExactPath(serviceUri.getPath(), createServiceHandler()     )     .build();<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 SSL-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0438\u043b\u0434\u0435\u0440 \u2014 SslContextBuilder \u0438 \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u044b \u2014 forServer \u0438 forClient. \u0423 \u044d\u0442\u043e\u0433\u043e \u0431\u0438\u043b\u0434\u0435\u0440\u0430 \u043d\u0430\u0434\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u044f\u0434 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a trustManager \u0438 ketManager. \u042d\u0442\u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0431\u0440\u0438\u043a \u2014 TrustManagerFactory \u0438 KeyManagerFactory. <\/p>\n<p>  <\/p>\n<pre><code class=\"java\"> SslContextBuilder.forServer(getKeyManagerFactory())         .trustManager(getTrustManagerFactory())         .build();<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0431\u0440\u0438\u043a \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0441 \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043b\u044f trustManager-\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e jks \u0444\u0430\u0439\u043b\u0430,<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">private TrustManagerFactory getTrustManagerFactory() throws Exception {     final TrustManagerFactory tmFactory = TrustManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());     final KeyStore keyStore = KeyStore.getInstance(&quot;JKS&quot;);     final InputStream trustStoreFile = getTrustStoreFile();     keyStore.load(trustStoreFile, trustStorePassword.toCharArray());     tmFactory.init(keyStore);     return tmFactory; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0430 \u0434\u043b\u044f KeyStore \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">private KeyManagerFactory getKeyManagerFactory() throws Exception {     final KeyManagerFactory kmFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());     final KeyStore keyStore = KeyStore.getInstance(&quot;JKS&quot;);     final InputStream keyStoreFile = getKeyStoreFile();     keyStore.load(keyStoreFile, keyStorePassword.toCharArray());     kmFactory.init(keyStore, keyPassword.toCharArray());     return kmFactory; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0432 \u0446\u0435\u043b\u043e\u043c \u044d\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f SSL \u0432 NettyServer.<\/p>\n<p>  <\/p>\n<h2 id=\"podklyuchenie-ssl-v-grpc--rsocket\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 SSL \u0432 gRPC \/ RSocket<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043e\u0431\u043c\u0435\u043d\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f\u0445 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c gRPC \u0438 RSocket \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Netty \u043a\u0430\u043a \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442, \u043b\u043e\u0433\u0438\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"podklyuchenie-ssl-v-spring-boot-dlya-restcontroller\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 SSL \u0432 Spring Boot \u0434\u043b\u044f RestController<\/h2>\n<p>  <\/p>\n<p>\u041d\u043e \u0432 \u043c\u0438\u0440\u0435 Java \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Spring \u0441\u0442\u0430\u043b \u0434\u0435 \u0444\u0430\u043a\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u043b\u044f DI. \u0410 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043b\u044e\u0434\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c Spring Boot \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043d\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u043e\u043e\u043f\u0430\u0440\u043a\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u041a\u0443\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e RestController, \u0447\u0435\u043c \u0441\u0430\u043c\u043e\u043c\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0445\u0435\u043d\u0434\u043b\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u044b. \u0410 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0451 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u044b \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u0432 Spring Boot \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u0443\u0442\u0438 \u043f\u0440\u043ec\u0442\u043e\u0439 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<br \/>  \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0435\u0439<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">server.ssl.key-store-type=JKS server.ssl.key-store=classpath:cert.jks server.ssl.key-store-password=changeit server.ssl.key-alias=key trust.store=classpath:cert.jks trust.store.password=changeit<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0437\u0430 \u0432\u0430\u0441. \u041b\u0438\u0431\u043e, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u0430\u0445 \u0441 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u0442\u043e\u0433\u0434\u0430 \u043f\u0443\u0442\u044c \u043b\u0435\u0436\u0438\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 WebServerFactoryCustomizer, \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u044c \u0442\u043e Jetty, Tomcat \u0438\u043b\u0438 Undertow.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0435\u0433\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 lambda c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0442\u0438\u043f\u0430 Connector. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0430\u0433 setSecure(true), \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f ProtocolHandler-\u0430, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0432 \u0435\u043c\u0443 \u043f\u0443\u0442\u0438 \u0434\u043e jks c keystore \u0438 trustStore \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u0438 \u043a \u043d\u0438\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f tomcat \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">@Bean WebServerFactoryCustomizer&lt;ConfigurableWebServerFactory&gt; containerCustomizer() throws Exception {     TomcatConnectorCustomizer customizer;     String absoluteKeystoreFile = keystoreFile.getAbsolutePath();     String absoluteTruststoreFile = truststoreFile.getAbsolutePath();     boolean sslEnabled = checkSslSettings(absoluteKeystoreFile, absoluteTruststoreFile, keystorePass);     if (sslEnabled) {         customizer = (connector) -&gt; {             connector.setPort(port);             connector.setSecure(true);             connector.setScheme(&quot;https&quot;);             Http11NioProtocol proto = (Http11NioProtocol) connector.getProtocolHandler();             proto.setSSLEnabled(true);             proto.setClientAuth(clientAuth);             proto.setKeystoreFile(absoluteKeystoreFile);             proto.setKeystorePass(keystorePass);             proto.setTruststoreFile(absoluteTruststoreFile);             proto.setTruststorePass(truststorePass);             proto.setKeystoreType(keyStoreType);             proto.setKeyAlias(keyAlias);             proto.setCiphers(chiphers);         };     } else {         customizer = (connector) -&gt; {             connector.setPort(port);             connector.setSecure(false);             if (sslEnabled) {                 log.error(&quot;Key- or Trust-store file \u2014 {} or {} \u2014 is not found, or keystore password is missing, REST service on port {} is disabled&quot;, absoluteKeystoreFile, absoluteTruststoreFile, port);                 ((Http11NioProtocol) connector.getProtocolHandler()).setMaxConnections(0);             }         };     }      return (ConfigurableWebServerFactory factory) -&gt; {         ConfigurableTomcatWebServerFactory tomcatWebServerFactory = (ConfigurableTomcatWebServerFactory) factory;         tomcatWebServerFactory.addConnectorCustomizers(customizer);     };<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043e\u0442\u0434\u0430\u0435\u043c \u043d\u0430 \u043e\u0442\u043a\u0443\u043f \u00ab\u043c\u0430\u0433\u0438\u0438\u00bb \u0441\u043f\u0440\u0438\u043d\u0433\u0430 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u0432\u0441\u0435\u0445 \u0432\u0435\u0431-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"testirovanie-tlsssl\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 TLS\/SSL<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c ketstore \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 java.security.* \u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439 \u0442\u0438\u043f\u0430 \u0438\u0441\u0442\u0435\u043a\u0448\u0438\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c \u0447\u0430\u0441\u0442\u044f\u043c jks \u0438 \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0432\u043d\u0443\u0442\u0440\u0438 KeyStore \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439 KeyPair, \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 X509Cetrificate, \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0438 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/www.bouncycastle.org\/\">bouncy\u0421astle<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u044f\u0434 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0432 Java, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0438\u0437 Java Cryptography Architecture (JCA) \u0438 Java Cryptography Extension (JCE).<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u043b\u044f kotlin \u0438 Java \u0432 \u0437\u0435\u0440\u043a\u0430\u043b\u0435 \u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 github (<a href=\"https:\/\/github.com\/bcgit\/bc-java\">https:\/\/github.com\/bcgit\/bc-java<\/a> \u0438 <a href=\"https:\/\/github.com\/bcgit\/bc-java\">https:\/\/github.com\/bcgit\/bc-kotlin<\/a>).<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 keyStore \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">KeyStore generateKeyStore(String password) {      X509Certificate2 ca = X509Certificate2Builder()         .setSubject(&quot;CN=CA&quot;)         .build()       X509Certificate2 int = X509Certificate2Builder()         .setIssuer(ca)         .setSubject(&quot;CN=Intermediate&quot;)         .build()      X509Certificate2 cert = X509Certificate2Builder()         .setIssuer(int)         .setSubject(&quot;CN=Child&quot;)         .setIntermediate(false)         .build()      return KeyStoreBuilder()         .addTrustedCertificate(&quot;test-ca&quot;, ca)         .addPrivateKey(&quot;test-pk&quot;, cert.keyPair, password, asList(cert, int, ca))         .build() }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u0448 \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 CA, \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 cert, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u0443\u0449\u0435\u043d \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u043c \u0437\u0432\u0435\u043d\u043e\u043c, \u0438 \u043d\u0430\u0448\u0443 \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439 (\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u043c \u0432 \u043f\u043e\u043b\u0435 KeyPair keyPair \u043a\u043b\u0430\u0441\u0441\u0430 X509Certificate2, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0435\u043c X509Certificate.<\/p>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0431\u0438\u043b\u0434\u0435\u0440\u0430\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430, \u043c\u044b \u043b\u0435\u0433\u043a\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u043a\u0435\u0439\u0441\u044b \u0434\u043b\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u044e\u0430\u043d\u0441 \u0432 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0434\u0432\u0443\u0445 \u0431\u0438\u043b\u0434\u0435\u0440\u043e\u0432 \u2014 X509Certificate2Builder \u0438 KeyStoreBuilder. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0432 java \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 java.security.KeyStore.Builder, \u043d\u043e \u043e\u043d \u0432\u0435\u0441\u044c\u043c\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u043b\u0430\u043d\u0430 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0446\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u2014 newInstance, \u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0447\u0435\u0433\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u044f\u0432\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441\u0432\u043e\u0439 \u0431\u0438\u043b\u0434\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u0421\u0432\u043e\u0439 \u0431\u0438\u043b\u0434\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043c\u0435\u0442\u043e\u0434 setEntry \u043a\u043b\u0430\u0441\u0441\u0430 KeyStore \u0434\u043b\u044f \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0442\u0438\u043f\u0430 Entry (TrustedCertificateEntry \u0438\u043b\u0438 PrivateKeyEntry).<\/p>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 KeyStore#setEntry \u0438\u043c\u0435\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 setEntry(String alias, Entry entry, ProtectionParameter protParam) \u0441 3 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043c\u044b \u0438\u0445 \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 item \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 KeyStoreBuilder#build() \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public KeyStore build() {     try {         KeyStore keyStore = KeyStore.getInstance(&quot;JKS&quot;, &quot;SUN&quot;);         keyStore.load(null, null);         for (Item it : entries.values()) {             keyStore.setEntry(it.alias, it.entry, it.parameter);         }         return keyStore;     } catch (IOException | GeneralSecurityException e) {         throw new RuntimeException(e.getMessage(), e);     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 entries \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e KeyStore#setEntry, \u043d\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u043e\u0442 setEntry \u0431\u0443\u0434\u0443\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b addPrivateKey <\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public KeyStoreBuilder addPrivateKey(String alias, KeyPair pair, String password, List&lt;X509Certificate&gt; chain) {     addEntry(alias,              new KeyStore.PrivateKeyEntry(pair.getPrivate(), chain),              new KeyStore.PasswordProtection(password.toCharArray()));     return this;  }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043c\u0435\u0442\u043e\u0434 addTrustedCertificate,<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public KeyStoreBuilder addTrustedCertificate(String alias, X509Certificate cert) {     addEntry(alias, new KeyStore.TrustedCertificateEntry(cert), null);     return this; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 keyStore.<\/p>\n<p>  <\/p>\n<p>C \u0431\u0438\u043b\u0434\u0435\u0440\u043e\u043c X509 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0434\u0435\u043b\u0430 \u043e\u0431\u0441\u0442\u043e\u044f\u0442 \u0447\u0443\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0438 \u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 build(). \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0431\u043e\u043b\u0435\u0439\u0440\u043f\u043b\u0435\u0439\u0442 \u043a\u043e\u0434\u043e\u043c \u0441\u0435\u0442\u0442\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0431\u0438\u043b\u0434\u0435\u0440\u0430, \u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 build() \u0434\u043b\u044f X509Certificate2, \u043e\u043f\u0443\u0441\u0442\u0438\u0432 \u043c\u0435\u0442\u043e\u0434\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0431\u0438\u043b\u0434\u0435\u0440, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public X509Certificate2 build() {     if (Security.getProvider(&quot;BC&quot;) == null) {         Security.addProvider(new BouncyCastleProvider());     }      final X500Name subject = new X500Name(this.subject);     final KeyPair subjectKeyPair = newKeyPair(subjectKeyStrength);     final boolean selfSigned = this.issuer == null;     final X500Name issuer = selfSigned ? subject : new X500Name(this.issuer.getSubjectDN().getName());     final KeyPair issuerKeyPair = selfSigned ? subjectKeyPair : this.issuer.getKeyPair();      \/\/ Create x509 certificate     final Date notBefore = new Date();     final Date notAfter = new Date(notBefore.getTime() + 20L * 365 * 24 * 60 * 60 * 1000);     final BigInteger serialNumber = BigInteger.valueOf(SERIALS.incrementAndGet());     final SubjectPublicKeyInfo subjectKeyInfo = SubjectPublicKeyInfo.getInstance(subjectKeyPair.getPublic().getEncoded());     final X509v3CertificateBuilder builder = new X509v3CertificateBuilder(         issuer, serialNumber, notBefore, notAfter, subject, subjectKeyInfo);      \/\/ Get the certificate back     final AlgorithmIdentifier sigAlgId = new DefaultSignatureAlgorithmIdentifierFinder().find(&quot;SHA256withRSA&quot;);     final AlgorithmIdentifier digAlgId = new DefaultDigestAlgorithmIdentifierFinder().find(sigAlgId);      try {         final BcX509ExtensionUtils extensionUtils = new BcX509ExtensionUtils();         builder.addExtension(             new ASN1ObjectIdentifier(&quot;2.5.29.14&quot;), \/\/ Subject Key Identifier             false,             extensionUtils.createSubjectKeyIdentifier(                 SubjectPublicKeyInfo.getInstance(subjectKeyPair.getPublic().getEncoded()))         );         builder.addExtension(             new ASN1ObjectIdentifier(&quot;2.5.29.35&quot;), \/\/ Authority Key Identifier             false,             extensionUtils.createAuthorityKeyIdentifier(                 SubjectPublicKeyInfo.getInstance(issuerKeyPair.getPublic().getEncoded()))         );         builder.addExtension(             new ASN1ObjectIdentifier(&quot;2.5.29.19&quot;), \/\/ Basic Constraints             false,             new BasicConstraints(intermediate));          AsymmetricKeyParameter privateKey = PrivateKeyFactory.createKey(issuerKeyPair.getPrivate().getEncoded());         ContentSigner signer = new BcRSAContentSignerBuilder(sigAlgId, digAlgId)         .build(privateKey);         X509Certificate cert = new JcaX509CertificateConverter()             .setProvider(&quot;BC&quot;)             .getCertificate(builder.build(signer));          return new X509Certificate2(cert, subjectKeyPair);     } catch (IOException | OperatorCreationException | CertificateException e) {         throw new RuntimeException(e.getMessage(), e);     } }  private static KeyPair newKeyPair(int subjectKeyStrength) {     try {         if (subjectKeyStrength &lt;= 0) {             subjectKeyStrength = DEFAULT_KEY_STRENGTH; \/\/ 2048          }          \/\/ Create the public\/private rsa key pair         KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance(&quot;RSA&quot;, &quot;BC&quot;);         keyPairGen.initialize(subjectKeyStrength, SecureRandom.getInstance(&quot;SHA1PRNG&quot;));         return keyPairGen.generateKeyPair();     } catch (GeneralSecurityException e) {         throw new RuntimeException(e.getMessage(), e);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438\u0437 bouncycastle.<br \/>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 bouncycastle, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u0440\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <strong>java.security.KeyPairGenerator<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0438 \u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d RSA c SHA1PRNG.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0434\u0430\u0442\u044b \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f, \u044d\u043c\u0438\u0442\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u0443\u0431\u044a\u0435\u043a\u0442 \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0432\u0448\u0435\u0433\u043e \u0435\u0433\u043e. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0438\u043f\u0430 \u0441\u0440\u043e\u043a\u043e\u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445.<\/p>\n<p>  <\/p>\n<p>\u0426\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0442\u0430\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0434\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0443\u043a\u043e\u043f\u043e\u0436\u0430\u0442\u0438\u044f, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u043c\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0432 Spring boot \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0441 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0432\u0435\u0431\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/start.spring.io\/\">Spring Initializr<\/a> \u0438 <\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@SpringBootApplication @RestController public class Server {     static String certFile = System.getProperty(&quot;user.home&quot;) + &quot;\/cert.jks&quot;;     static String defaultPassword = &quot;changeit&quot;;      @GetMapping(&quot;\/hello&quot;)     public String hello() {         System.out.println(&quot;request \/hello&quot;);         return &quot;hello&quot;;     }      @Bean     WebServerFactoryCustomizer&lt;ConfigurableWebServerFactory&gt; containerCustomizer() {         TomcatConnectorCustomizer customizer = (connector) -&gt; {             connector.setPort(8080);             connector.setSecure(true);             connector.setScheme(&quot;https&quot;);             Http11NioProtocol proto = (Http11NioProtocol) connector.getProtocolHandler();             proto.setSSLEnabled(true);             proto.setClientAuth(&quot;true&quot;);             proto.setKeystoreFile(certFile);             proto.setKeystorePass(defaultPassword);             proto.setTruststoreFile(certFile);             proto.setTruststorePass(defaultPassword);             proto.setKeystoreType(&quot;JKS&quot;);         };          return (ConfigurableWebServerFactory factory) -&gt; {             ConfigurableTomcatWebServerFactory tomcatWebServerFactory = (ConfigurableTomcatWebServerFactory) factory;             tomcatWebServerFactory.addConnectorCustomizers(customizer);         };     }      public static void main(String[] args) {         SpringApplication.run(Server.class, args);     } }  class Client {     RestTemplate restTemplate() throws Exception {         SSLContext sslContext = new SSLContextBuilder()                 .loadTrustMaterial(new URL(Server.certFile), Server.defaultPassword.toCharArray())                 .build();         SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext);         HttpClient httpClient = HttpClients.custom()                 .setSSLSocketFactory(socketFactory)                 .build();         HttpComponentsClientHttpRequestFactory factory =                 new HttpComponentsClientHttpRequestFactory(httpClient);         return new RestTemplate(factory);     }      public static void main(String[] args) {         String response = new RestTemplate().getForObject(&quot;https:\/\/localhost:8080\/hello&quot;, String.class);         System.out.println(&quot;received &quot; + response);     } }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 cert.jks \u0444\u0430\u0439\u043b, \u0435\u0441\u043b\u0438 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043b\u0435\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b \u0432\u044b\u0448\u0435 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/dbtc\/blog\/487318\/\"> https:\/\/habr.com\/ru\/company\/dbtc\/blog\/487318\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/dbtc\/blog\/487318\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/eb\/ev\/fa\/ebevfa5pxhb86uheboysklyk6vc.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u0437\u0430\u0449\u0438\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432\u0441\u0435 \u0447\u0430\u0449\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0444\u0430\u043d\u0430\u0442\u0438\u0437\u043c\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0441\u0444\u0435\u0440\u043e\u0439 \u043c\u043e\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u041f\u041e \u0432 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u043c \u0441\u0435\u043a\u0442\u043e\u0440\u0435, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0438\u0441\u0442\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0440\u0438\u0441\u043a\u043e\u0432, \u044f \u043d\u0435 \u043c\u043e\u0433 \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0441 \u0447\u0435\u043c \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298344","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=298344"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298344\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}