# ArtifactoryでSSLを有効化

## 手順

1. CAキーを生成します。
   ```
   openssl genrsa -out local.key 2040
   Generating RSA private key, 2040 bit long modulus (2 primes)
   ..............................+++++
   .......+++++
   e is 65537 (0x010001)
   ```

   local.keyファイルが生成されます。
2. CA証明書リクエストを生成します。
   ```
   ➜ zhengshu openssl req -new-key local.key -out local.csr
   req: Unrecognized flag new-key
   req: Use -help for summary.
   ➜ zhengshu openssl req -new -key local.key -out local.csr
   You are about to be asked to enter information that will be incorporated
   into your certificate request.
   What you are about to enter is what is called a Distinguished Name or a DN.
   There are quite a few fields but you can leave some blank
   For some fields there will be a default value,
   If you enter '.', the field will be left blank.
   -----
   Country Name (2 letter code) [AU]:FR
   State or Province Name (full name) [Some-State]:FR
   Locality Name (eg, city) []:Surness
   Organization Name (eg, company) [Internet Widgits Pty Ltd]:Talend
   Organizational Unit Name (eg, section) []:Developer
   Common Name (e.g. server FQDN or YOUR name) []:RD
   Email Address []:aa@talend.com
    
   Please enter the following 'extra' attributes
   to be sent with your certificate request
   A challenge password []:tacadmin
   An optional company name []:tac
   ```

   local.csrファイルが生成されます。
3. CAルート証明書を生成します。
   ```
   openssl x509 -req -in local.csr -extensions v3_ca -signkey local.key -out local.crt
   Signature ok
   subject=C = FR, ST = FR, L = Surness, O = Talend, OU = Developer, CN = RD, emailAddress = aa@talend.com
   Getting Private key
   ➜ zhengshu l
   total 20K
   drwxrwxr-x 2 oem oem 4.0K 11月 9 16:06 .
   drwxr-xr-x 44 oem oem 4.0K 11月 9 16:06 ..
   -rw-rw-r-- 1 oem oem 1.3K 11月 9 16:06 local.crt
   -rw-rw-r-- 1 oem oem 1.1K 11月 9 16:04 local.csr
   -rw------- 1 oem oem 1.7K 11月 9 16:02 local.key
   ➜ zhengshu openssl genrsa -out my_server.key 2040
   Generating RSA private key, 2040 bit long modulus (2 primes)
   ...................+++++
   ..........+++++
   e is 65537 (0x010001)
   ```

   local.crtファイルが生成されます。
4. ArtifactoryでカスタムベースURLを設定します。
   1. [Admin] (管理)タブで、[Configuration] (設定) &gt; [General] (一般) &gt; [Custom Base URL] (カスタムベースURL)を選択します。
   2. [Custom Base URL] (カスタムベースURL)フィールドに、Artifactoryへの連絡に使われている値を入力します。例: https://yourdomain.com

   ベースURLの設定に関する詳細は、https://www.jfrog.com/confluence/display/JFROG/General+System+Settings (英語のみ)をご覧ください。