5.6.3.3. ユーザーの暗号化のみの証明書の取得
本セクションでは、既存のユーザー署名証明書で署名された暗号化のみの証明書を取得するワークフローを説明します。
注記
ユーザーがさまざまな用途で複数の証明書を所有していて、1 つが署名している場合、ユーザーは最初に署名証明書を取得する必要があります。ユーザーが署名証明書を所有すると、CMC Shared Secret メカニズムを設定して依存することなく、Proof Of Origin に使用できます。
ユーザーの最初の署名証明書を取得する方法は、「ユーザーの初回署名証明書の取得」 を参照してください。
ユーザーとして以下を行います。
- Network Security Services (NSS) データベースまたはユーザーの署名証明書および鍵が含まれるスマートカードに保存されている暗号化トークンを使用します。
- PKCS #10 形式または CRMF 形式で CSR を生成します。注記(キーのアーカイブが必要な場合は) CRMF 形式を使用してください。
- CMC 要求を生成します。これは暗号のみの証明書であるため、秘密鍵は署名できません。そのため、Proof Of Possession (POP) は含まれていません。このため、登録には、2 つの手順が必要です。最初のリクエストが成功すると、
EncryptedPOP
制御のある CMC 状態が生じます。次に、ユーザーは応答を使用して、DecryptedPOP
制御を含む CMC 要求を生成し、2 番目のステップで送信します。- 最初のステップでは、デフォルトのパラメーターに加えて、ユーザーは、
CMCRequest
ユーティリティーに渡される設定ファイルに次のパラメーターを設定する必要があります。identification.enable
witness.sharedSecret
identityProofV2.enable
identityProofV2.hashAlg
identityProofV2.macAlg
popLinkWitnessV2.enable
(CA で必要な場合)popLinkWitnessV2.keyGenAlg
(CA で必要な場合)popLinkWitnessV2.macAlg
(CA で必要な場合)request.privKeyId
詳細は、CMCRequest(1) の man ページを参照してください。応答には以下が含まれます。- CMC で暗号化された POP コントロール
- POP の required エラーでの
CMCStatusInfoV2
コントロール - リクエスト ID
- 次のステップでは、デフォルトのパラメーターに加えて、ユーザーは、
CMCRequest
ユーティリティーに渡される設定ファイルに次のパラメーターを設定する必要があります。decryptedPop.enable
encryptedPopResponseFile
decryptedPopRequestFile
request.privKeyId
詳細は、CMCRequest(1) の man ページを参照してください。
5.6.3.3.1. キーアーカイブを使用した暗号化のみの証明書の取得例
キーアーカイブを使用して登録を実行するには、CRMF 要求にユーザーの暗号化された秘密鍵を含む CMC 要求を生成します。以下の手順は、ユーザーが署名証明書をすでに所有していることを前提としています。この署名証明書のニックネームは、手順の設定ファイルに設定されます。
注記
以下の手順は、署名に使用できない暗号のみの鍵で使用される 2 通の発行を説明します。証明書に署名できるキーを使用する場合は、
-q POP_NONE
の代わりに -q POP_SUCCESS
オプションを、単一トリップ発行のために CRMFPopClient
ユーティリティーに渡します。
POP_SUCCESS で
CRMFPoPClient
を使用する方法は、「CRMFPopClient
を使用したキー Archival を持つ CSR の作成」 および 「CRMFPopClient
を使用した SharedSecret ベースの CMC の CSR の作成」 を参照してください。
- KRA トランスポート証明書を検索します。以下に例を示します。
$ pki cert-find --name KRA_transport_certificate_subject_CN
- 前の手順で取得した KRA トランスポート証明書のシリアル番号を使用して、証明書をファイルに保存します。たとえば、
/home/user_name/kra.cert
ファイルに 12345 シリアル番号がある証明書を保存するには、次のコマンドを実行します。$ pki cert-show 12345 --output /home/user_name/kra.cert
CRMFPopClient
ユーティリティーを使用して以下を行います。- キーアーカイブを使用して CSR を作成します。
- 証明書が要求されるユーザーまたはエンティティーの証明書データベースディレクトリーに移動します。以下に例を示します。
$ cd /home/user_name/
- RSA 秘密鍵が KRA トランスポート証明書によりラップされる CRMF 要求を作成するには、
CRMFPopClient
ユーティリティーを使用します。たとえば、要求を/home/user_name/crmf.req
ファイルに保存するには、以下のコマンドを実行します。$ CRMFPopClient -d . -p token_password -n subject_DN -q POP_NONE \ -b /home/user_name/kra.cert -w "AES/CBC/PKCS5Padding" \ -v -o /home/user_name/crmf.req
コマンドで表示される秘密鍵の ID をメモします。ID は、2 番目のトリップの設定ファイルのrequest.privKeyId
パラメーターの値として、後のステップで必要になります。
- 以下の内容を含む、
/home/user_name/cmc.cfg
など、CRMRequest
ユーティリティー用の設定ファイルを作成します。#numRequests: Total number of PKCS10 requests or CRMF requests. numRequests=1 #input: full path for the PKCS10 request or CRMF request, #the content must be in Base-64 encoded format input=/home/user_name/crmf.req #output: full path for the CMC request in binary format output=/home/user_name/cmc.req #tokenname: name of token where agent signing cert can be found #(default is internal) tokenname=internal #nickname: nickname for user certificate which will be used #to sign the CMC full request. nickname=signing_certificate #dbdir: directory for cert8.db, key3.db and secmod.db dbdir=/home/user_name/.dogtag/nssdb/ #password: password for cert8.db which stores the agent certificate password=password #format: request format, either pkcs10 or crmf format=crmf
- CMC 要求を作成します。
$ CMCRequest /home/user_name/cmc.cfg
コマンドが成功すると、CMCRequest ユーティリティーは、要求設定ファイルのoutput
パラメーターで指定されたファイルに CMC 要求を保存します。 /home/user_name/cmc-submit.cfg
などのHttpClient
の設定ファイルを作成します。このファイルは、後で CMC 要求を CA に送信します。作成されたファイルに以下の内容を追加します。#host: host name for the http server host=server.example.com #port: port number port=8443 #secure: true for secure connection, false for nonsecure connection secure=true #input: full path for the enrollment request, the content must be in #binary format input=/home/user_name/cmc.req #output: full path for the response in binary format output=/home/user_name/cmc-response_round_1.bin #tokenname: name of token where TLS client authentication cert can be found #(default is internal) #This parameter will be ignored if secure=false tokenname=internal #dbdir: directory for cert8.db, key3.db and secmod.db #This parameter will be ignored if secure=false dbdir=/home/user_name/.dogtag/nssdb/ #clientmode: true for client authentication, false for no client authentication #This parameter will be ignored if secure=false clientmode=true #password: password for cert8.db #This parameter will be ignored if secure=false and clientauth=false password=password #nickname: nickname for client certificate #This parameter will be ignored if clientmode=false nickname=signing_certificate #servlet: servlet name servlet=/ca/ee/ca/profileSubmitUserSignedCMCFull?profileId=caFullCMCUserSignedCert
- CMC 要求を CA に送信します。
$ HttpClient /home/user_name/cmc-submit.cfg
コマンドが成功すると、HTTPClient ユーティリティーは、CMC 応答を、設定ファイルのoutput
パラメーターで指定されたファイルに保存します。 - 応答ファイルを
CMCResponse
ユーティリティーに渡して応答を確認します。以下に例を示します。$ CMCResponse -d /home/user_name/.dogtag/nssdb/ -i /home/user_name/cmc-response_round_1.bin
最初のトリップが成功した場合は、CMCResponse
は、以下のような出力を表示します。Certificates: Certificate: Data: Version: v3 Serial Number: 0x1 Signature Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11 Issuer: CN=CA Signing Certificate,OU=pki-tomcat,O=unknown00262DFC6A5E Security Domain Validity: Not Before: Wednesday, May 17, 2017 6:06:50 PM PDT America/Los_Angeles Not After: Sunday, May 17, 2037 6:06:50 PM PDT America/Los_Angeles Subject: CN=CA Signing Certificate,OU=pki-tomcat,O=unknown00262DFC6A5E Security Domain ... Number of controls is 3 Control #0: CMC encrypted POP OID: {1 3 6 1 5 5 7 7 9} encryptedPOP decoded Control #1: CMCStatusInfoV2 OID: {1 3 6 1 5 5 7 7 25} BodyList: 1 OtherInfo type: FAIL failInfo=POP required Control #2: CMC ResponseInfo requestID: 15
- 2 番目のトリップの場合は、後の手順で使用する
/home/user_name/cmc_DecryptedPOP.cfg
などのDecryptedPOP
の設定ファイルを作成します。作成されたファイルに以下の内容を追加します。#numRequests: Total number of PKCS10 requests or CRMF requests. numRequests=1 #input: full path for the PKCS10 request or CRMF request, #the content must be in Base-64 encoded format #this field is actually unused in 2nd trip input=/home/user_name/crmf.req #output: full path for the CMC request in binary format #this field is actually unused in 2nd trip output=/home/user_name/cmc2.req #tokenname: name of token where agent signing cert can be found #(default is internal) tokenname=internal #nickname: nickname for agent certificate which will be used #to sign the CMC full request. nickname=signing_certificate #dbdir: directory for cert8.db, key3.db and secmod.db dbdir=/home/user_name/.dogtag/nssdb/ #password: password for cert8.db which stores the agent #certificate password=password #format: request format, either pkcs10 or crmf format=crmf decryptedPop.enable=true encryptedPopResponseFile=/home/user_name/cmc-response_round_1.bin request.privKeyId=-25aa0a8aad395ebac7e6a19c364f0dcb5350cfef decryptedPopRequestFile=/home/user_name/cmc.DecryptedPOP.req
DecryptPOP
CMC 要求を作成します。$ CMCRequest /home/user_name/cmc.DecryptedPOP.cfg
コマンドが成功すると、CMCRequest ユーティリティーは、要求設定ファイルのdecryptedPopRequestFile
パラメーターで指定されたファイルに CMC 要求を保存します。/home/user_name/decrypted_POP_cmc-submit.cfg
などのHttpClient
の設定ファイルを作成します。このファイルは、後でDecryptedPOP
CMC 要求を CA に送信します。作成されたファイルに以下の内容を追加します。#host: host name for the http server host=server.example.com #port: port number port=8443 #secure: true for secure connection, false for nonsecure connection secure=true #input: full path for the enrollment request, the content must be in binary format input=/home/user_name/cmc.DecryptedPOP.req #output: full path for the response in binary format output=/home/user_name/cmc-response_round_2.bin #tokenname: name of token where TLS client authentication cert can be found (default is internal) #This parameter will be ignored if secure=false tokenname=internal #dbdir: directory for cert8.db, key3.db and secmod.db #This parameter will be ignored if secure=false dbdir=/home/user_name/.dogtag/nssdb/ #clientmode: true for client authentication, false for no client authentication #This parameter will be ignored if secure=false clientmode=true #password: password for cert8.db #This parameter will be ignored if secure=false and clientauth=false password=password #nickname: nickname for client certificate #This parameter will be ignored if clientmode=false nickname=singing_certificate #servlet: servlet name servlet=/ca/ee/ca/profileSubmitUserSignedCMCFull?profileId=caFullCMCUserCert
Decrypted
CMC 要求を CA に送信します。$ HttpClient /home/user_name/decrypted_POP_cmc-submit.cfg
コマンドが成功すると、HTTPClient ユーティリティーは、CMC 応答を、設定ファイルのoutput
パラメーターで指定されたファイルに保存します。- CMC の応答を PKCS #7 証明書チェーンに変換するには、
CMCResponse
ユーティリティーの-i
パラメーターに CMC レスポンスファイルを渡します。以下に例を示します。$ CMCResponse -i /home/user_name/cmc-response_round_2.bin -o /home/user_name/certs.p7
または、個々の証明書を PEM 形式で表示するには、-v
ユーティリティーに渡します。次のトリップが成功した場合は、CMCResponse
は、以下のような出力を表示します。Certificates: Certificate: Data: Version: v3 Serial Number: 0x2D Signature Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11 Issuer: CN=CA Signing Certificate,OU=pki-tomcat,O=unknown00262DFC6A5E Security Domain Validity: Not Before: Thursday, June 15, 2017 3:43:45 PM PDT America/Los_Angeles Not After: Tuesday, December 12, 2017 3:43:45 PM PST America/Los_Angeles Subject: CN=user_name,UID=example,OU=keyArchivalExample ... Number of controls is 1 Control #0: CMCStatusInfo OID: {1 3 6 1 5 5 7 7 1} BodyList: 1 Status: SUCCESS