summaryrefslogtreecommitdiffstats
path: root/base/java-tools
diff options
context:
space:
mode:
authorMatthew Harmsen <mharmsen@redhat.com>2016-02-11 14:59:50 -0700
committerMatthew Harmsen <mharmsen@redhat.com>2016-02-11 14:59:50 -0700
commit0ea3afcca4d214a4054ef10ee76e4e97365928dc (patch)
tree5d46ecff732575540d08f08f94946fb7670a9b78 /base/java-tools
parent938c5ce2485b203bd55fc28f7bb4aa3f0151c429 (diff)
downloadpki-0ea3afcca4d214a4054ef10ee76e4e97365928dc.tar.gz
pki-0ea3afcca4d214a4054ef10ee76e4e97365928dc.tar.xz
pki-0ea3afcca4d214a4054ef10ee76e4e97365928dc.zip
PKI TRAC Ticket #1850 - Rename DRMTool --> KRATool
Diffstat (limited to 'base/java-tools')
-rw-r--r--base/java-tools/doc/README14
-rw-r--r--base/java-tools/src/CMakeLists.txt2
-rw-r--r--base/java-tools/src/com/netscape/cmstools/DRMTool.cfg160
-rw-r--r--base/java-tools/src/com/netscape/cmstools/KRATool.cfg160
-rw-r--r--base/java-tools/src/com/netscape/cmstools/KRATool.java (renamed from base/java-tools/src/com/netscape/cmstools/DRMTool.java)1438
-rw-r--r--base/java-tools/templates/CMakeLists.txt2
6 files changed, 888 insertions, 888 deletions
diff --git a/base/java-tools/doc/README b/base/java-tools/doc/README
index fa0af7d4b..1cd2a1d86 100644
--- a/base/java-tools/doc/README
+++ b/base/java-tools/doc/README
@@ -37,8 +37,8 @@ CRMFPopClient A command line utility used to
generate CRMF requests with
proof of possession (POP).
-DRMTool -drmtool_config_file A command line utility used to
- <path + drmtool config file> change the storage key used
+KRATool -kratool_config_file A command line utility used to
+ <path + kratool config file> change the storage key used
-source_ldif_file to wrap the symmetric key
<path + source ldif file> which is used to encrypt the
-target_ldif_file user's private key.
@@ -46,7 +46,7 @@ DRMTool -drmtool_config_file A command line utility used to
-log_file may also be used to re-index IDs
<path + log file > associated with the various
[-source_pki_security_database_path records which may be useful
- <path to PKI source databases> for DRM consolidation.
+ <path to PKI source databases> for KRA consolidation.
-source_storage_token_name
'<source token>'
-source_storage_certificate_nickname
@@ -59,10 +59,10 @@ DRMTool -drmtool_config_file A command line utility used to
<numeric offset> ||
-remove_id_offset
<numeric offset>]
- [-source_drm_naming_context
- <source DRM naming context>]
- [-target_drm_naming_context
- <target DRM naming context>]
+ [-source_kra_naming_context
+ <source KRA naming context>]
+ [-target_kra_naming_context
+ <target KRA naming context>]
[-process_requests_and_key_records_only]
ExtJoiner <ext_file0> . . . <ext_file9> A command line utility utilized
diff --git a/base/java-tools/src/CMakeLists.txt b/base/java-tools/src/CMakeLists.txt
index ade1ea2b1..9a3c72fa2 100644
--- a/base/java-tools/src/CMakeLists.txt
+++ b/base/java-tools/src/CMakeLists.txt
@@ -141,7 +141,7 @@ install(
install(
FILES
- com/netscape/cmstools/DRMTool.cfg
+ com/netscape/cmstools/KRATool.cfg
DESTINATION
${SHARE_INSTALL_PREFIX}/pki/java-tools
)
diff --git a/base/java-tools/src/com/netscape/cmstools/DRMTool.cfg b/base/java-tools/src/com/netscape/cmstools/DRMTool.cfg
deleted file mode 100644
index b43441e19..000000000
--- a/base/java-tools/src/com/netscape/cmstools/DRMTool.cfg
+++ /dev/null
@@ -1,160 +0,0 @@
-drmtool.ldif.caEnrollmentRequest._000=########################################
-drmtool.ldif.caEnrollmentRequest._001=## DRM CA Enrollment Request ##
-drmtool.ldif.caEnrollmentRequest._002=########################################
-drmtool.ldif.caEnrollmentRequest._003=## ##
-drmtool.ldif.caEnrollmentRequest._004=## NEVER allow 'DRMTOOL' the ability ##
-drmtool.ldif.caEnrollmentRequest._005=## to change the CA 'naming context' ##
-drmtool.ldif.caEnrollmentRequest._006=## data in the following fields: ##
-drmtool.ldif.caEnrollmentRequest._007=## ##
-drmtool.ldif.caEnrollmentRequest._008=## extdata-auth--005ftoken;uid ##
-drmtool.ldif.caEnrollmentRequest._009=## extdata-auth--005ftoken;userid ##
-drmtool.ldif.caEnrollmentRequest._010=## extdata-updatedby ##
-drmtool.ldif.caEnrollmentRequest._011=## ##
-drmtool.ldif.caEnrollmentRequest._012=## NEVER allow 'DRMTOOL' the ability ##
-drmtool.ldif.caEnrollmentRequest._013=## to change CA 'numeric' data in ##
-drmtool.ldif.caEnrollmentRequest._014=## the following fields: ##
-drmtool.ldif.caEnrollmentRequest._015=## ##
-drmtool.ldif.caEnrollmentRequest._016=## extdata-requestId ##
-drmtool.ldif.caEnrollmentRequest._017=## ##
-drmtool.ldif.caEnrollmentRequest._018=########################################
-drmtool.ldif.caEnrollmentRequest.cn=true
-drmtool.ldif.caEnrollmentRequest.dateOfModify=true
-drmtool.ldif.caEnrollmentRequest.dn=true
-drmtool.ldif.caEnrollmentRequest.extdata.keyRecord=true
-drmtool.ldif.caEnrollmentRequest.extdata.requestNotes=true
-drmtool.ldif.caEnrollmentRequest.requestId=true
-drmtool.ldif.caKeyRecord._000=#########################################
-drmtool.ldif.caKeyRecord._001=## DRM CA Key Record ##
-drmtool.ldif.caKeyRecord._002=#########################################
-drmtool.ldif.caKeyRecord._003=## ##
-drmtool.ldif.caKeyRecord._004=## NEVER allow 'DRMTOOL' the ability ##
-drmtool.ldif.caKeyRecord._005=## to change the CA 'naming context' ##
-drmtool.ldif.caKeyRecord._006=## data in the following fields: ##
-drmtool.ldif.caKeyRecord._007=## ##
-drmtool.ldif.caKeyRecord._008=## archivedBy ##
-drmtool.ldif.caKeyRecord._009=## ##
-drmtool.ldif.caKeyRecord._010=#########################################
-drmtool.ldif.caKeyRecord.cn=true
-drmtool.ldif.caKeyRecord.dateOfModify=true
-drmtool.ldif.caKeyRecord.dn=true
-drmtool.ldif.caKeyRecord.privateKeyData=true
-drmtool.ldif.caKeyRecord.serialno=true
-drmtool.ldif.namingContext._000=############################################
-drmtool.ldif.namingContext._001=## DRM Naming Context Fields ##
-drmtool.ldif.namingContext._002=############################################
-drmtool.ldif.namingContext._003=## ##
-drmtool.ldif.namingContext._004=## NEVER allow 'DRMTOOL' the ability to ##
-drmtool.ldif.namingContext._005=## change the CA 'naming context' data ##
-drmtool.ldif.namingContext._006=## in the following 'non-KeyRecord / ##
-drmtool.ldif.namingContext._007=## non-Request' fields (as these records ##
-drmtool.ldif.namingContext._008=## should be removed via the option to ##
-drmtool.ldif.namingContext._009=## process requests and key records only ##
-drmtool.ldif.namingContext._010=## if this is a DRM migration): ##
-drmtool.ldif.namingContext._011=## ##
-drmtool.ldif.namingContext._012=## cn ##
-drmtool.ldif.namingContext._013=## sn ##
-drmtool.ldif.namingContext._014=## uid ##
-drmtool.ldif.namingContext._015=## uniqueMember ##
-drmtool.ldif.namingContext._016=## ##
-drmtool.ldif.namingContext._017=## NEVER allow 'DRMTOOL' the ability to ##
-drmtool.ldif.namingContext._018=## change the DRM 'naming context' data ##
-drmtool.ldif.namingContext._019=## in the following 'non-KeyRecord / ##
-drmtool.ldif.namingContext._020=## non-Request' fields (as these records ##
-drmtool.ldif.namingContext._021=## should be removed via the option to ##
-drmtool.ldif.namingContext._022=## process requests and key records only ##
-drmtool.ldif.namingContext._023=## if this is a DRM migration): ##
-drmtool.ldif.namingContext._024=## ##
-drmtool.ldif.namingContext._025=## dc ##
-drmtool.ldif.namingContext._026=## dn ##
-drmtool.ldif.namingContext._027=## uniqueMember ##
-drmtool.ldif.namingContext._028=## ##
-drmtool.ldif.namingContext._029=## NEVER allow 'DRMTOOL' the ability to ##
-drmtool.ldif.namingContext._030=## change the TPS 'naming context' data ##
-drmtool.ldif.namingContext._031=## in the following 'non-KeyRecord / ##
-drmtool.ldif.namingContext._032=## non-Request' fields (as these records ##
-drmtool.ldif.namingContext._033=## should be removed via the option to ##
-drmtool.ldif.namingContext._034=## process requests and key records only ##
-drmtool.ldif.namingContext._035=## if this is a DRM migration): ##
-drmtool.ldif.namingContext._036=## ##
-drmtool.ldif.namingContext._037=## uid ##
-drmtool.ldif.namingContext._038=## uniqueMember ##
-drmtool.ldif.namingContext._039=## ##
-drmtool.ldif.namingContext._040=## If '-source_naming_context ##
-drmtool.ldif.namingContext._041=## <original source DRM naming context>' ##
-drmtool.ldif.namingContext._042=## and '-target_naming_context ##
-drmtool.ldif.namingContext._043=## <renamed target DRM naming context>' ##
-drmtool.ldif.namingContext._044=## options are specified, ALWAYS ##
-drmtool.ldif.namingContext._045=## require 'DRMTOOL' to change the ##
-drmtool.ldif.namingContext._046=## DRM 'naming context' data in ALL of ##
-drmtool.ldif.namingContext._047=## the following fields in EACH of the ##
-drmtool.ldif.namingContext._048=## following types of records: ##
-drmtool.ldif.namingContext._049=## ##
-drmtool.ldif.namingContext._050=## caEnrollmentRequest: ##
-drmtool.ldif.namingContext._051=## ##
-drmtool.ldif.namingContext._052=## dn ##
-drmtool.ldif.namingContext._053=## extdata-auth--005ftoken;user ##
-drmtool.ldif.namingContext._054=## extdata-auth--005ftoken;userdn ##
-drmtool.ldif.namingContext._055=## ##
-drmtool.ldif.namingContext._056=## caKeyRecord: ##
-drmtool.ldif.namingContext._057=## ##
-drmtool.ldif.namingContext._058=## dn ##
-drmtool.ldif.namingContext._059=## ##
-drmtool.ldif.namingContext._060=## recoveryRequest: ##
-drmtool.ldif.namingContext._061=## ##
-drmtool.ldif.namingContext._062=## dn ##
-drmtool.ldif.namingContext._063=## ##
-drmtool.ldif.namingContext._064=## tpsKeyRecord: ##
-drmtool.ldif.namingContext._065=## ##
-drmtool.ldif.namingContext._066=## dn ##
-drmtool.ldif.namingContext._067=## ##
-drmtool.ldif.namingContext._068=## tpsNetkeyKeygenRequest: ##
-drmtool.ldif.namingContext._069=## ##
-drmtool.ldif.namingContext._070=## dn ##
-drmtool.ldif.namingContext._071=## ##
-drmtool.ldif.namingContext._072=############################################
-drmtool.ldif.recoveryRequest._000=#####################################
-drmtool.ldif.recoveryRequest._001=## DRM CA / TPS Recovery Request ##
-drmtool.ldif.recoveryRequest._002=#####################################
-drmtool.ldif.recoveryRequest.cn=true
-drmtool.ldif.recoveryRequest.dateOfModify=true
-drmtool.ldif.recoveryRequest.dn=true
-drmtool.ldif.recoveryRequest.extdata.requestId=true
-drmtool.ldif.recoveryRequest.extdata.requestNotes=true
-drmtool.ldif.recoveryRequest.extdata.serialnumber=true
-drmtool.ldif.recoveryRequest.requestId=true
-drmtool.ldif.tpsKeyRecord._000=#########################################
-drmtool.ldif.tpsKeyRecord._001=## DRM TPS Key Record ##
-drmtool.ldif.tpsKeyRecord._002=#########################################
-drmtool.ldif.tpsKeyRecord._003=## ##
-drmtool.ldif.tpsKeyRecord._004=## NEVER allow 'DRMTOOL' the ability ##
-drmtool.ldif.tpsKeyRecord._005=## to change the TPS 'naming context' ##
-drmtool.ldif.tpsKeyRecord._006=## data in the following fields: ##
-drmtool.ldif.tpsKeyRecord._007=## ##
-drmtool.ldif.tpsKeyRecord._008=## archivedBy ##
-drmtool.ldif.tpsKeyRecord._009=## ##
-drmtool.ldif.tpsKeyRecord._010=#########################################
-drmtool.ldif.tpsKeyRecord.cn=true
-drmtool.ldif.tpsKeyRecord.dateOfModify=true
-drmtool.ldif.tpsKeyRecord.dn=true
-drmtool.ldif.tpsKeyRecord.privateKeyData=true
-drmtool.ldif.tpsKeyRecord.serialno=true
-drmtool.ldif.tpsNetkeyKeygenRequest._000=#####################################
-drmtool.ldif.tpsNetkeyKeygenRequest._001=## DRM TPS Netkey Keygen Request ##
-drmtool.ldif.tpsNetkeyKeygenRequest._002=#####################################
-drmtool.ldif.tpsNetkeyKeygenRequest._003=## ##
-drmtool.ldif.tpsNetkeyKeygenRequest._004=## NEVER allow 'DRMTOOL' the ##
-drmtool.ldif.tpsNetkeyKeygenRequest._005=## ability to change the ##
-drmtool.ldif.tpsNetkeyKeygenRequest._006=## TPS 'naming context' data in ##
-drmtool.ldif.tpsNetkeyKeygenRequest._007=## the following fields: ##
-drmtool.ldif.tpsNetkeyKeygenRequest._008=## ##
-drmtool.ldif.tpsNetkeyKeygenRequest._009=## extdata-updatedby ##
-drmtool.ldif.tpsNetkeyKeygenRequest._010=## ##
-drmtool.ldif.tpsNetkeyKeygenRequest._011=#####################################
-drmtool.ldif.tpsNetkeyKeygenRequest.cn=true
-drmtool.ldif.tpsNetkeyKeygenRequest.dateOfModify=true
-drmtool.ldif.tpsNetkeyKeygenRequest.dn=true
-drmtool.ldif.tpsNetkeyKeygenRequest.extdata.keyRecord=true
-drmtool.ldif.tpsNetkeyKeygenRequest.extdata.requestId=true
-drmtool.ldif.tpsNetkeyKeygenRequest.extdata.requestNotes=true
-drmtool.ldif.tpsNetkeyKeygenRequest.requestId=true
-
diff --git a/base/java-tools/src/com/netscape/cmstools/KRATool.cfg b/base/java-tools/src/com/netscape/cmstools/KRATool.cfg
new file mode 100644
index 000000000..cad2bf400
--- /dev/null
+++ b/base/java-tools/src/com/netscape/cmstools/KRATool.cfg
@@ -0,0 +1,160 @@
+kratool.ldif.caEnrollmentRequest._000=########################################
+kratool.ldif.caEnrollmentRequest._001=## KRA CA Enrollment Request ##
+kratool.ldif.caEnrollmentRequest._002=########################################
+kratool.ldif.caEnrollmentRequest._003=## ##
+kratool.ldif.caEnrollmentRequest._004=## NEVER allow 'KRATOOL' the ability ##
+kratool.ldif.caEnrollmentRequest._005=## to change the CA 'naming context' ##
+kratool.ldif.caEnrollmentRequest._006=## data in the following fields: ##
+kratool.ldif.caEnrollmentRequest._007=## ##
+kratool.ldif.caEnrollmentRequest._008=## extdata-auth--005ftoken;uid ##
+kratool.ldif.caEnrollmentRequest._009=## extdata-auth--005ftoken;userid ##
+kratool.ldif.caEnrollmentRequest._010=## extdata-updatedby ##
+kratool.ldif.caEnrollmentRequest._011=## ##
+kratool.ldif.caEnrollmentRequest._012=## NEVER allow 'KRATOOL' the ability ##
+kratool.ldif.caEnrollmentRequest._013=## to change CA 'numeric' data in ##
+kratool.ldif.caEnrollmentRequest._014=## the following fields: ##
+kratool.ldif.caEnrollmentRequest._015=## ##
+kratool.ldif.caEnrollmentRequest._016=## extdata-requestId ##
+kratool.ldif.caEnrollmentRequest._017=## ##
+kratool.ldif.caEnrollmentRequest._018=########################################
+kratool.ldif.caEnrollmentRequest.cn=true
+kratool.ldif.caEnrollmentRequest.dateOfModify=true
+kratool.ldif.caEnrollmentRequest.dn=true
+kratool.ldif.caEnrollmentRequest.extdata.keyRecord=true
+kratool.ldif.caEnrollmentRequest.extdata.requestNotes=true
+kratool.ldif.caEnrollmentRequest.requestId=true
+kratool.ldif.caKeyRecord._000=#########################################
+kratool.ldif.caKeyRecord._001=## KRA CA Key Record ##
+kratool.ldif.caKeyRecord._002=#########################################
+kratool.ldif.caKeyRecord._003=## ##
+kratool.ldif.caKeyRecord._004=## NEVER allow 'KRATOOL' the ability ##
+kratool.ldif.caKeyRecord._005=## to change the CA 'naming context' ##
+kratool.ldif.caKeyRecord._006=## data in the following fields: ##
+kratool.ldif.caKeyRecord._007=## ##
+kratool.ldif.caKeyRecord._008=## archivedBy ##
+kratool.ldif.caKeyRecord._009=## ##
+kratool.ldif.caKeyRecord._010=#########################################
+kratool.ldif.caKeyRecord.cn=true
+kratool.ldif.caKeyRecord.dateOfModify=true
+kratool.ldif.caKeyRecord.dn=true
+kratool.ldif.caKeyRecord.privateKeyData=true
+kratool.ldif.caKeyRecord.serialno=true
+kratool.ldif.namingContext._000=############################################
+kratool.ldif.namingContext._001=## KRA Naming Context Fields ##
+kratool.ldif.namingContext._002=############################################
+kratool.ldif.namingContext._003=## ##
+kratool.ldif.namingContext._004=## NEVER allow 'KRATOOL' the ability to ##
+kratool.ldif.namingContext._005=## change the CA 'naming context' data ##
+kratool.ldif.namingContext._006=## in the following 'non-KeyRecord / ##
+kratool.ldif.namingContext._007=## non-Request' fields (as these records ##
+kratool.ldif.namingContext._008=## should be removed via the option to ##
+kratool.ldif.namingContext._009=## process requests and key records only ##
+kratool.ldif.namingContext._010=## if this is a KRA migration): ##
+kratool.ldif.namingContext._011=## ##
+kratool.ldif.namingContext._012=## cn ##
+kratool.ldif.namingContext._013=## sn ##
+kratool.ldif.namingContext._014=## uid ##
+kratool.ldif.namingContext._015=## uniqueMember ##
+kratool.ldif.namingContext._016=## ##
+kratool.ldif.namingContext._017=## NEVER allow 'KRATOOL' the ability to ##
+kratool.ldif.namingContext._018=## change the KRA 'naming context' data ##
+kratool.ldif.namingContext._019=## in the following 'non-KeyRecord / ##
+kratool.ldif.namingContext._020=## non-Request' fields (as these records ##
+kratool.ldif.namingContext._021=## should be removed via the option to ##
+kratool.ldif.namingContext._022=## process requests and key records only ##
+kratool.ldif.namingContext._023=## if this is a KRA migration): ##
+kratool.ldif.namingContext._024=## ##
+kratool.ldif.namingContext._025=## dc ##
+kratool.ldif.namingContext._026=## dn ##
+kratool.ldif.namingContext._027=## uniqueMember ##
+kratool.ldif.namingContext._028=## ##
+kratool.ldif.namingContext._029=## NEVER allow 'KRATOOL' the ability to ##
+kratool.ldif.namingContext._030=## change the TPS 'naming context' data ##
+kratool.ldif.namingContext._031=## in the following 'non-KeyRecord / ##
+kratool.ldif.namingContext._032=## non-Request' fields (as these records ##
+kratool.ldif.namingContext._033=## should be removed via the option to ##
+kratool.ldif.namingContext._034=## process requests and key records only ##
+kratool.ldif.namingContext._035=## if this is a KRA migration): ##
+kratool.ldif.namingContext._036=## ##
+kratool.ldif.namingContext._037=## uid ##
+kratool.ldif.namingContext._038=## uniqueMember ##
+kratool.ldif.namingContext._039=## ##
+kratool.ldif.namingContext._040=## If '-source_naming_context ##
+kratool.ldif.namingContext._041=## <original source KRA naming context>' ##
+kratool.ldif.namingContext._042=## and '-target_naming_context ##
+kratool.ldif.namingContext._043=## <renamed target KRA naming context>' ##
+kratool.ldif.namingContext._044=## options are specified, ALWAYS ##
+kratool.ldif.namingContext._045=## require 'KRATOOL' to change the ##
+kratool.ldif.namingContext._046=## KRA 'naming context' data in ALL of ##
+kratool.ldif.namingContext._047=## the following fields in EACH of the ##
+kratool.ldif.namingContext._048=## following types of records: ##
+kratool.ldif.namingContext._049=## ##
+kratool.ldif.namingContext._050=## caEnrollmentRequest: ##
+kratool.ldif.namingContext._051=## ##
+kratool.ldif.namingContext._052=## dn ##
+kratool.ldif.namingContext._053=## extdata-auth--005ftoken;user ##
+kratool.ldif.namingContext._054=## extdata-auth--005ftoken;userdn ##
+kratool.ldif.namingContext._055=## ##
+kratool.ldif.namingContext._056=## caKeyRecord: ##
+kratool.ldif.namingContext._057=## ##
+kratool.ldif.namingContext._058=## dn ##
+kratool.ldif.namingContext._059=## ##
+kratool.ldif.namingContext._060=## recoveryRequest: ##
+kratool.ldif.namingContext._061=## ##
+kratool.ldif.namingContext._062=## dn ##
+kratool.ldif.namingContext._063=## ##
+kratool.ldif.namingContext._064=## tpsKeyRecord: ##
+kratool.ldif.namingContext._065=## ##
+kratool.ldif.namingContext._066=## dn ##
+kratool.ldif.namingContext._067=## ##
+kratool.ldif.namingContext._068=## tpsNetkeyKeygenRequest: ##
+kratool.ldif.namingContext._069=## ##
+kratool.ldif.namingContext._070=## dn ##
+kratool.ldif.namingContext._071=## ##
+kratool.ldif.namingContext._072=############################################
+kratool.ldif.recoveryRequest._000=#####################################
+kratool.ldif.recoveryRequest._001=## KRA CA / TPS Recovery Request ##
+kratool.ldif.recoveryRequest._002=#####################################
+kratool.ldif.recoveryRequest.cn=true
+kratool.ldif.recoveryRequest.dateOfModify=true
+kratool.ldif.recoveryRequest.dn=true
+kratool.ldif.recoveryRequest.extdata.requestId=true
+kratool.ldif.recoveryRequest.extdata.requestNotes=true
+kratool.ldif.recoveryRequest.extdata.serialnumber=true
+kratool.ldif.recoveryRequest.requestId=true
+kratool.ldif.tpsKeyRecord._000=#########################################
+kratool.ldif.tpsKeyRecord._001=## KRA TPS Key Record ##
+kratool.ldif.tpsKeyRecord._002=#########################################
+kratool.ldif.tpsKeyRecord._003=## ##
+kratool.ldif.tpsKeyRecord._004=## NEVER allow 'KRATOOL' the ability ##
+kratool.ldif.tpsKeyRecord._005=## to change the TPS 'naming context' ##
+kratool.ldif.tpsKeyRecord._006=## data in the following fields: ##
+kratool.ldif.tpsKeyRecord._007=## ##
+kratool.ldif.tpsKeyRecord._008=## archivedBy ##
+kratool.ldif.tpsKeyRecord._009=## ##
+kratool.ldif.tpsKeyRecord._010=#########################################
+kratool.ldif.tpsKeyRecord.cn=true
+kratool.ldif.tpsKeyRecord.dateOfModify=true
+kratool.ldif.tpsKeyRecord.dn=true
+kratool.ldif.tpsKeyRecord.privateKeyData=true
+kratool.ldif.tpsKeyRecord.serialno=true
+kratool.ldif.tpsNetkeyKeygenRequest._000=#####################################
+kratool.ldif.tpsNetkeyKeygenRequest._001=## KRA TPS Netkey Keygen Request ##
+kratool.ldif.tpsNetkeyKeygenRequest._002=#####################################
+kratool.ldif.tpsNetkeyKeygenRequest._003=## ##
+kratool.ldif.tpsNetkeyKeygenRequest._004=## NEVER allow 'KRATOOL' the ##
+kratool.ldif.tpsNetkeyKeygenRequest._005=## ability to change the ##
+kratool.ldif.tpsNetkeyKeygenRequest._006=## TPS 'naming context' data in ##
+kratool.ldif.tpsNetkeyKeygenRequest._007=## the following fields: ##
+kratool.ldif.tpsNetkeyKeygenRequest._008=## ##
+kratool.ldif.tpsNetkeyKeygenRequest._009=## extdata-updatedby ##
+kratool.ldif.tpsNetkeyKeygenRequest._010=## ##
+kratool.ldif.tpsNetkeyKeygenRequest._011=#####################################
+kratool.ldif.tpsNetkeyKeygenRequest.cn=true
+kratool.ldif.tpsNetkeyKeygenRequest.dateOfModify=true
+kratool.ldif.tpsNetkeyKeygenRequest.dn=true
+kratool.ldif.tpsNetkeyKeygenRequest.extdata.keyRecord=true
+kratool.ldif.tpsNetkeyKeygenRequest.extdata.requestId=true
+kratool.ldif.tpsNetkeyKeygenRequest.extdata.requestNotes=true
+kratool.ldif.tpsNetkeyKeygenRequest.requestId=true
+
diff --git a/base/java-tools/src/com/netscape/cmstools/DRMTool.java b/base/java-tools/src/com/netscape/cmstools/KRATool.java
index 13f426eb9..2cff383ff 100644
--- a/base/java-tools/src/com/netscape/cmstools/DRMTool.java
+++ b/base/java-tools/src/com/netscape/cmstools/KRATool.java
@@ -68,7 +68,7 @@ import org.mozilla.jss.util.Password;
import com.netscape.cmsutil.util.Utils;
/**
- * The DRMTool class is a utility program designed to operate on an LDIF file
+ * The KRATool class is a utility program designed to operate on an LDIF file
* to perform one or more of the following tasks:
*
* <PRE>
@@ -78,14 +78,14 @@ import com.netscape.cmsutil.util.Utils;
*
* STARTING INVENTORY:
*
- * (1) a DRMTOOL configuration file containing DRM LDIF record
+ * (1) a KRATOOL configuration file containing KRA LDIF record
* types and the processing status of their associated fields
*
- * (2) an LDIF file containing 'exported' DRM data
- * (referred to as the "source" DRM)
+ * (2) an LDIF file containing 'exported' KRA data
+ * (referred to as the "source" KRA)
*
* NOTE: If this LDIF file contains data that was originally
- * from a DRM instance that was prior to RHCS 8, it
+ * from a KRA instance that was prior to RHCS 8, it
* must have previously undergone the appropriate
* migration steps.
*
@@ -95,15 +95,15 @@ import com.netscape.cmsutil.util.Utils;
*
* NOTE: If the storage key was located on an HSM, then the
* HSM must be available to the machine on which the
- * DRMTool is being executed (since the RSA private
+ * KRATool is being executed (since the RSA private
* storage key is required for unwrapping the
* symmetric triple DES key). Additionally, a
* password may be required to unlock access to
* this key (e. g. - which may be located in
- * the source DRM's 'password.conf' file).
+ * the source KRA's 'password.conf' file).
*
* (4) a file containing the ASCII BASE-64 storage certificate
- * from the DRM instance for which the output LDIF file is
+ * from the KRA instance for which the output LDIF file is
* intended (referred to as the "target")
*
* ENDING INVENTORY:
@@ -114,42 +114,42 @@ import com.netscape.cmsutil.util.Utils;
* purposes
*
* (3) an LDIF file containing the revised data suitable for
- * 'import' into a new DRM (referred to as the "target" DRM)
+ * 'import' into a new KRA (referred to as the "target" KRA)
*
- * DRMTool PARAMETERS:
+ * KRATool PARAMETERS:
*
- * (1) the name of the DRMTOOL configuration file containing
- * DRM LDIF record types and the processing status of their
+ * (1) the name of the KRATOOL configuration file containing
+ * KRA LDIF record types and the processing status of their
* associated fields
*
* (2) the name of the input LDIF file containing data which was
- * 'exported' from the source DRM instance
+ * 'exported' from the source KRA instance
*
* (3) the name of the output LDIF file intended to contain the
- * revised data suitable for 'import' to a target DRM instance
+ * revised data suitable for 'import' to a target KRA instance
*
* (4) the name of the log file that may be used for auditing
* purposes
*
* (5) the path to the security databases that were used by
- * the source DRM instance
+ * the source KRA instance
*
* (6) the name of the token that was used by
- * the source DRM instance
+ * the source KRA instance
*
* (7) the name of the storage certificate that was used by
- * the source DRM instance
+ * the source KRA instance
*
* (8) the name of the file containing the ASCII BASE-64 storage
- * certificate from the target DRM instance for which the
+ * certificate from the target KRA instance for which the
* output LDIF file is intended
*
* (9) OPTIONALLY, the name of a file which ONLY contains the
- * password needed to access the source DRM instance's
+ * password needed to access the source KRA instance's
* security databases
*
- * (10) OPTIONALLY, choose to change the specified source DRM naming
- * context to the specified target DRM naming context
+ * (10) OPTIONALLY, choose to change the specified source KRA naming
+ * context to the specified target KRA naming context
*
* (11) OPTIONALLY, choose to ONLY process CA enrollment requests,
* CA recovery requests, CA key records, TPS netkeyKeygen
@@ -158,49 +158,49 @@ import com.netscape.cmsutil.util.Utils;
*
* DATA FIELDS AFFECTED (using default config file values):
*
- * (1) CA DRM enrollment request
+ * (1) CA KRA enrollment request
*
* (a) dateOfModify
* (b) extdata-requestnotes
*
- * (2) CA DRM key record
+ * (2) CA KRA key record
*
* (a) dateOfModify
* (b) privateKeyData
*
- * (3) CA DRM recovery request
+ * (3) CA KRA recovery request
*
* (a) dateOfModify
* (b) extdata-requestnotes (NEW)
*
- * (4) TPS DRM netkeyKeygen (enrollment) request
+ * (4) TPS KRA netkeyKeygen (enrollment) request
*
* (a) dateOfModify
* (b) extdata-requestnotes (NEW)
*
- * (5) TPS DRM key record
+ * (5) TPS KRA key record
*
* (a) dateOfModify
* (b) privateKeyData
*
- * (6) TPS DRM recovery request
+ * (6) TPS KRA recovery request
*
* (a) dateOfModify
* (b) extdata-requestnotes (NEW)
*
* (B) Specify an ID offset to append to existing numeric data
- * (e. g. - to renumber data for use in DRM consolidation efforts).
+ * (e. g. - to renumber data for use in KRA consolidation efforts).
*
* STARTING INVENTORY:
*
- * (1) a DRMTOOL configuration file containing DRM LDIF record
+ * (1) a KRATOOL configuration file containing KRA LDIF record
* types and the processing status of their associated fields
*
- * (2) an LDIF file containing 'exported' DRM data
- * (referred to as the "source" DRM)
+ * (2) an LDIF file containing 'exported' KRA data
+ * (referred to as the "source" KRA)
*
* NOTE: If this LDIF file contains data that was originally
- * from a DRM instance that was prior to RHCS 8, it
+ * from a KRA instance that was prior to RHCS 8, it
* must have previously undergone the appropriate
* migration steps.
*
@@ -212,28 +212,28 @@ import com.netscape.cmsutil.util.Utils;
* purposes
*
* (3) an LDIF file containing the revised data suitable for
- * 'import' into a new DRM (referred to as the "target" DRM)
+ * 'import' into a new KRA (referred to as the "target" KRA)
*
- * DRMTool PARAMETERS:
+ * KRATool PARAMETERS:
*
- * (1) the name of the DRMTOOL configuration file containing
- * DRM LDIF record types and the processing status of their
+ * (1) the name of the KRATOOL configuration file containing
+ * KRA LDIF record types and the processing status of their
* associated fields
*
* (2) the name of the input LDIF file containing data which was
- * 'exported' from the source DRM instance
+ * 'exported' from the source KRA instance
*
* (3) the name of the output LDIF file intended to contain the
- * revised data suitable for 'import' to a target DRM instance
+ * revised data suitable for 'import' to a target KRA instance
*
* (4) the name of the log file that may be used for auditing
* purposes
*
* (5) a large numeric ID offset (mask) to be appended to existing
- * numeric data in the source DRM instance's LDIF file
+ * numeric data in the source KRA instance's LDIF file
*
- * (6) OPTIONALLY, choose to change the specified source DRM naming
- * context to the specified target DRM naming context
+ * (6) OPTIONALLY, choose to change the specified source KRA naming
+ * context to the specified target KRA naming context
*
* (7) OPTIONALLY, choose to ONLY process CA enrollment requests,
* CA recovery requests, CA key records, TPS netkeyKeygen
@@ -242,7 +242,7 @@ import com.netscape.cmsutil.util.Utils;
*
* DATA FIELDS AFFECTED (using default config file values):
*
- * (1) CA DRM enrollment request
+ * (1) CA KRA enrollment request
*
* (a) cn
* (b) dateOfModify
@@ -250,13 +250,13 @@ import com.netscape.cmsutil.util.Utils;
* (d) extdata-requestnotes
* (e) requestId
*
- * (2) CA DRM key record
+ * (2) CA KRA key record
*
* (a) cn
* (b) dateOfModify
* (c) serialno
*
- * (3) CA DRM recovery request
+ * (3) CA KRA recovery request
*
* (a) cn
* (b) dateOfModify
@@ -265,7 +265,7 @@ import com.netscape.cmsutil.util.Utils;
* (e) extdata-serialnumber
* (f) requestId
*
- * (4) TPS DRM netkeyKeygen (enrollment) request
+ * (4) TPS KRA netkeyKeygen (enrollment) request
*
* (a) cn
* (b) dateOfModify
@@ -274,13 +274,13 @@ import com.netscape.cmsutil.util.Utils;
* (e) extdata-requestnotes (NEW)
* (f) requestId
*
- * (5) TPS DRM key record
+ * (5) TPS KRA key record
*
* (a) cn
* (b) dateOfModify
* (c) serialno
*
- * (6) TPS DRM recovery request
+ * (6) TPS KRA recovery request
*
* (a) cn
* (b) dateOfModify
@@ -290,18 +290,18 @@ import com.netscape.cmsutil.util.Utils;
* (f) requestId
*
* (C) Specify an ID offset to be removed from existing numeric data
- * (e. g. - to undo renumbering used in DRM consolidation efforts).
+ * (e. g. - to undo renumbering used in KRA consolidation efforts).
*
* STARTING INVENTORY:
*
- * (1) a DRMTOOL configuration file containing DRM LDIF record
+ * (1) a KRATOOL configuration file containing KRA LDIF record
* types and the processing status of their associated fields
*
- * (2) an LDIF file containing 'exported' DRM data
- * (referred to as the "source" DRM)
+ * (2) an LDIF file containing 'exported' KRA data
+ * (referred to as the "source" KRA)
*
* NOTE: If this LDIF file contains data that was originally
- * from a DRM instance that was prior to RHCS 8, it
+ * from a KRA instance that was prior to RHCS 8, it
* must have previously undergone the appropriate
* migration steps.
*
@@ -313,28 +313,28 @@ import com.netscape.cmsutil.util.Utils;
* purposes
*
* (3) an LDIF file containing the revised data suitable for
- * 'import' into a new DRM (referred to as the "target" DRM)
+ * 'import' into a new KRA (referred to as the "target" KRA)
*
- * DRMTool PARAMETERS:
+ * KRATool PARAMETERS:
*
- * (1) the name of the DRMTOOL configuration file containing
- * DRM LDIF record types and the processing status of their
+ * (1) the name of the KRATOOL configuration file containing
+ * KRA LDIF record types and the processing status of their
* associated fields
*
* (2) the name of the input LDIF file containing data which was
- * 'exported' from the source DRM instance
+ * 'exported' from the source KRA instance
*
* (3) the name of the output LDIF file intended to contain the
- * revised data suitable for 'import' to a target DRM instance
+ * revised data suitable for 'import' to a target KRA instance
*
* (4) the name of the log file that may be used for auditing
* purposes
*
* (5) a large numeric ID offset (mask) to be removed from existing
- * numeric data in the source DRM instance's LDIF file
+ * numeric data in the source KRA instance's LDIF file
*
- * (6) OPTIONALLY, choose to change the specified source DRM naming
- * context to the specified target DRM naming context
+ * (6) OPTIONALLY, choose to change the specified source KRA naming
+ * context to the specified target KRA naming context
*
* (7) OPTIONALLY, choose to ONLY process CA enrollment requests,
* CA recovery requests, CA key records, TPS netkeyKeygen
@@ -343,7 +343,7 @@ import com.netscape.cmsutil.util.Utils;
*
* DATA FIELDS AFFECTED (using default config file values):
*
- * (1) CA DRM enrollment request
+ * (1) CA KRA enrollment request
*
* (a) cn
* (b) dateOfModify
@@ -351,13 +351,13 @@ import com.netscape.cmsutil.util.Utils;
* (d) extdata-requestnotes
* (e) requestId
*
- * (2) CA DRM key record
+ * (2) CA KRA key record
*
* (a) cn
* (b) dateOfModify
* (c) serialno
*
- * (3) CA DRM recovery request
+ * (3) CA KRA recovery request
*
* (a) cn
* (b) dateOfModify
@@ -366,7 +366,7 @@ import com.netscape.cmsutil.util.Utils;
* (e) extdata-serialnumber
* (f) requestId
*
- * (4) TPS DRM netkeyKeygen (enrollment) request
+ * (4) TPS KRA netkeyKeygen (enrollment) request
*
* (a) cn
* (b) dateOfModify
@@ -375,13 +375,13 @@ import com.netscape.cmsutil.util.Utils;
* (e) extdata-requestnotes (NEW)
* (f) requestId
*
- * (5) TPS DRM key record
+ * (5) TPS KRA key record
*
* (a) cn
* (b) dateOfModify
* (c) serialno
*
- * (6) TPS DRM recovery request
+ * (6) TPS KRA recovery request
*
* (a) cn
* (b) dateOfModify
@@ -393,12 +393,12 @@ import com.netscape.cmsutil.util.Utils;
* </PRE>
*
* <P>
- * DRMTool may be invoked as follows:
+ * KRATool may be invoked as follows:
*
* <PRE>
*
- * DRMTool
- * -drmtool_config_file &lt;path + drmtool config file&gt;
+ * KRATool
+ * -kratool_config_file &lt;path + kratool config file&gt;
* -source_ldif_file &lt;path + source ldif file&gt;
* -target_ldif_file &lt;path + target ldif file&gt;
* -log_file &lt;path + log file&gt;
@@ -409,13 +409,13 @@ import com.netscape.cmsutil.util.Utils;
* [-source_pki_security_database_pwdfile &lt;path to PKI password file&gt;]
* [-append_id_offset &lt;numeric offset&gt;]
* [-remove_id_offset &lt;numeric offset&gt;]
- * [-source_drm_naming_context '&lt;original source DRM naming context&gt;']
- * [-target_drm_naming_context '&lt;renamed target DRM naming context&gt;']
+ * [-source_kra_naming_context '&lt;original source KRA naming context&gt;']
+ * [-target_kra_naming_context '&lt;renamed target KRA naming context&gt;']
* [-process_requests_and_key_records_only]
*
* where the following options are 'Mandatory':
*
- * -drmtool_config_file &lt;path + drmtool config file&gt;
+ * -kratool_config_file &lt;path + kratool config file&gt;
* -source_ldif_file &lt;path + source ldif file&gt;
* -target_ldif_file &lt;path + target ldif file&gt;
* -log_file &lt;path + log file&gt;
@@ -432,17 +432,17 @@ import com.netscape.cmsutil.util.Utils;
* &lt;path to target certificate file&gt;]
*
* AND OPTIONALLY, specify the name of a file which ONLY contains
- * the password needed to access the source DRM instance's
+ * the password needed to access the source KRA instance's
* security databases:
*
* [-source_pki_security_database_pwdfile
* &lt;path to PKI password file&gt;]
*
- * AND OPTIONALLY, rename source DRM naming context --> target
- * DRM naming context:
+ * AND OPTIONALLY, rename source KRA naming context --> target
+ * KRA naming context:
*
- * [-source_drm_naming_context '&lt;source DRM naming context&gt;']
- * [-target_drm_naming_context '&lt;target DRM naming context&gt;']
+ * [-source_kra_naming_context '&lt;source KRA naming context&gt;']
+ * [-target_kra_naming_context '&lt;target KRA naming context&gt;']
*
* AND OPTIONALLY, process requests and key records ONLY:
*
@@ -453,11 +453,11 @@ import com.netscape.cmsutil.util.Utils;
*
* [-append_id_offset &lt;numeric offset&gt;]
*
- * AND OPTIONALLY, rename source DRM naming context --> target
- * DRM naming context:
+ * AND OPTIONALLY, rename source KRA naming context --> target
+ * KRA naming context:
*
- * [-source_drm_naming_context '&lt;source DRM naming context&gt;']
- * [-target_drm_naming_context '&lt;target DRM naming context&gt;']
+ * [-source_kra_naming_context '&lt;source KRA naming context&gt;']
+ * [-target_kra_naming_context '&lt;target KRA naming context&gt;']
*
* AND OPTIONALLY, process requests and key records ONLY:
*
@@ -466,11 +466,11 @@ import com.netscape.cmsutil.util.Utils;
* (c) option for removing the specified numeric ID offset
* from existing numerical data:
*
- * AND OPTIONALLY, rename source DRM naming context --> target
- * DRM naming context:
+ * AND OPTIONALLY, rename source KRA naming context --> target
+ * KRA naming context:
*
- * [-source_drm_naming_context '&lt;source DRM naming context&gt;']
- * [-target_drm_naming_context '&lt;target DRM naming context&gt;']
+ * [-source_kra_naming_context '&lt;source KRA naming context&gt;']
+ * [-target_kra_naming_context '&lt;target KRA naming context&gt;']
*
* [-remove_id_offset &lt;numeric offset&gt;]
*
@@ -479,13 +479,13 @@ import com.netscape.cmsutil.util.Utils;
* [-process_requests_and_key_records_only]
*
* (d) (a) rewrap AND (b) append ID offset
- * [AND OPTIONALLY, rename source DRM naming context --> target
- * DRM naming context]
+ * [AND OPTIONALLY, rename source KRA naming context --> target
+ * KRA naming context]
* [AND OPTIONALLY process requests and key records ONLY]
*
* (e) (a) rewrap AND (c) remove ID offset
- * [AND OPTIONALLY, rename source DRM naming context --> target
- * DRM naming context]
+ * [AND OPTIONALLY, rename source KRA naming context --> target
+ * KRA naming context]
* [AND OPTIONALLY process requests and key records ONLY]
*
* NOTE: Options (b) and (c) are mutually exclusive!
@@ -495,7 +495,7 @@ import com.netscape.cmsutil.util.Utils;
* @author mharmsen
* @version $Revision$, $Date$
*/
-public class DRMTool {
+public class KRATool {
/*************/
/* Constants */
/*************/
@@ -532,18 +532,18 @@ public class DRMTool {
private static final int REWRAP_AND_ID_OFFSET_ARGS = 18;
// Constants: Command-line Options (Mandatory)
- private static final String DRM_TOOL = "DRMTool";
+ private static final String KRA_TOOL = "KRATool";
- private static final String DRMTOOL_CFG_FILE = "-drmtool_config_file";
+ private static final String KRATOOL_CFG_FILE = "-kratool_config_file";
- private static final String DRMTOOL_CFG_DESCRIPTION = " <complete path to the drmtool config file"
+ private static final String KRATOOL_CFG_DESCRIPTION = " <complete path to the kratool config file"
+ NEWLINE
+ " "
- + " ending with the drmtool config file name>";
+ + " ending with the kratool config file name>";
- private static final String DRMTOOL_CFG_FILE_EXAMPLE = DRMTOOL_CFG_FILE
+ private static final String KRATOOL_CFG_FILE_EXAMPLE = KRATOOL_CFG_FILE
+ " "
- + "/usr/share/pki/java-tools/DRMTool.cfg";
+ + "/usr/share/pki/java-tools/KRATool.cfg";
private static final String SOURCE_LDIF_FILE = "-source_ldif_file";
@@ -576,7 +576,7 @@ public class DRMTool {
private static final String LOG_FILE_EXAMPLE = LOG_FILE
+ " "
- + "/export/pki/DRMTool.log";
+ + "/export/pki/KRATool.log";
// Constants: Command-line Options (Rewrap)
private static final String SOURCE_NSS_DB_PATH = "-source_pki_security_database_path";
@@ -667,21 +667,21 @@ public class DRMTool {
+ "100000000000";
// Constants: Command-line Options
- private static final String SOURCE_DRM_NAMING_CONTEXT = "-source_drm_naming_context";
+ private static final String SOURCE_KRA_NAMING_CONTEXT = "-source_kra_naming_context";
- private static final String SOURCE_DRM_NAMING_CONTEXT_DESCRIPTION = " <source DRM naming context>";
+ private static final String SOURCE_KRA_NAMING_CONTEXT_DESCRIPTION = " <source KRA naming context>";
- private static final String SOURCE_DRM_NAMING_CONTEXT_EXAMPLE = SOURCE_DRM_NAMING_CONTEXT
+ private static final String SOURCE_KRA_NAMING_CONTEXT_EXAMPLE = SOURCE_KRA_NAMING_CONTEXT
+ " "
+ TIC
+ "alpha.example.com-pki-kra"
+ TIC;
- private static final String TARGET_DRM_NAMING_CONTEXT = "-target_drm_naming_context";
+ private static final String TARGET_KRA_NAMING_CONTEXT = "-target_kra_naming_context";
- private static final String TARGET_DRM_NAMING_CONTEXT_DESCRIPTION = " <target DRM naming context>";
+ private static final String TARGET_KRA_NAMING_CONTEXT_DESCRIPTION = " <target KRA naming context>";
- private static final String TARGET_DRM_NAMING_CONTEXT_EXAMPLE = TARGET_DRM_NAMING_CONTEXT
+ private static final String TARGET_KRA_NAMING_CONTEXT_EXAMPLE = TARGET_KRA_NAMING_CONTEXT
+ " "
+ TIC
+ "omega.example.com-pki-kra"
@@ -690,171 +690,171 @@ public class DRMTool {
private static final String PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY =
"-process_requests_and_key_records_only";
- // Constants: DRMTOOL Config File
- private static final String DRMTOOL_CFG_PREFIX = "drmtool.ldif";
- private static final String DRMTOOL_CFG_ENROLLMENT = "caEnrollmentRequest";
- private static final String DRMTOOL_CFG_CA_KEY_RECORD = "caKeyRecord";
- private static final String DRMTOOL_CFG_RECOVERY = "recoveryRequest";
- private static final String DRMTOOL_CFG_TPS_KEY_RECORD = "tpsKeyRecord";
- private static final String DRMTOOL_CFG_KEYGEN = "tpsNetkeyKeygenRequest";
+ // Constants: KRATOOL Config File
+ private static final String KRATOOL_CFG_PREFIX = "kratool.ldif";
+ private static final String KRATOOL_CFG_ENROLLMENT = "caEnrollmentRequest";
+ private static final String KRATOOL_CFG_CA_KEY_RECORD = "caKeyRecord";
+ private static final String KRATOOL_CFG_RECOVERY = "recoveryRequest";
+ private static final String KRATOOL_CFG_TPS_KEY_RECORD = "tpsKeyRecord";
+ private static final String KRATOOL_CFG_KEYGEN = "tpsNetkeyKeygenRequest";
- // Constants: DRMTOOL Config File (DRM CA Enrollment Request Fields)
- private static final String DRMTOOL_CFG_ENROLLMENT_CN = DRMTOOL_CFG_PREFIX
+ // Constants: KRATOOL Config File (KRA CA Enrollment Request Fields)
+ private static final String KRATOOL_CFG_ENROLLMENT_CN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_ENROLLMENT
+ + KRATOOL_CFG_ENROLLMENT
+ DOT
+ "cn";
- private static final String DRMTOOL_CFG_ENROLLMENT_DATE_OF_MODIFY = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_ENROLLMENT_DATE_OF_MODIFY = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_ENROLLMENT
+ + KRATOOL_CFG_ENROLLMENT
+ DOT
+ "dateOfModify";
- private static final String DRMTOOL_CFG_ENROLLMENT_DN = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_ENROLLMENT_DN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_ENROLLMENT
+ + KRATOOL_CFG_ENROLLMENT
+ DOT
+ "dn";
- private static final String DRMTOOL_CFG_ENROLLMENT_EXTDATA_KEY_RECORD = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_ENROLLMENT_EXTDATA_KEY_RECORD = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_ENROLLMENT
+ + KRATOOL_CFG_ENROLLMENT
+ DOT
+ "extdata.keyRecord";
- private static final String DRMTOOL_CFG_ENROLLMENT_EXTDATA_REQUEST_NOTES = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_ENROLLMENT_EXTDATA_REQUEST_NOTES = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_ENROLLMENT
+ + KRATOOL_CFG_ENROLLMENT
+ DOT
+ "extdata.requestNotes";
- private static final String DRMTOOL_CFG_ENROLLMENT_REQUEST_ID = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_ENROLLMENT_REQUEST_ID = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_ENROLLMENT
+ + KRATOOL_CFG_ENROLLMENT
+ DOT
+ "requestId";
- // Constants: DRMTOOL Config File (DRM CA Key Record Fields)
- private static final String DRMTOOL_CFG_CA_KEY_RECORD_CN = DRMTOOL_CFG_PREFIX
+ // Constants: KRATOOL Config File (KRA CA Key Record Fields)
+ private static final String KRATOOL_CFG_CA_KEY_RECORD_CN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_CA_KEY_RECORD
+ + KRATOOL_CFG_CA_KEY_RECORD
+ DOT
+ "cn";
- private static final String DRMTOOL_CFG_CA_KEY_RECORD_DATE_OF_MODIFY = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_CA_KEY_RECORD_DATE_OF_MODIFY = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_CA_KEY_RECORD
+ + KRATOOL_CFG_CA_KEY_RECORD
+ DOT
+ "dateOfModify";
- private static final String DRMTOOL_CFG_CA_KEY_RECORD_DN = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_CA_KEY_RECORD_DN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_ENROLLMENT
+ + KRATOOL_CFG_ENROLLMENT
+ DOT
+ "dn";
- private static final String DRMTOOL_CFG_CA_KEY_RECORD_PRIVATE_KEY_DATA = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_CA_KEY_RECORD_PRIVATE_KEY_DATA = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_CA_KEY_RECORD
+ + KRATOOL_CFG_CA_KEY_RECORD
+ DOT
+ "privateKeyData";
- private static final String DRMTOOL_CFG_CA_KEY_RECORD_SERIAL_NO = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_CA_KEY_RECORD_SERIAL_NO = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_CA_KEY_RECORD
+ + KRATOOL_CFG_CA_KEY_RECORD
+ DOT
+ "serialno";
- // Constants: DRMTOOL Config File (DRM CA / TPS Recovery Request Fields)
- private static final String DRMTOOL_CFG_RECOVERY_CN = DRMTOOL_CFG_PREFIX
+ // Constants: KRATOOL Config File (KRA CA / TPS Recovery Request Fields)
+ private static final String KRATOOL_CFG_RECOVERY_CN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_RECOVERY
+ + KRATOOL_CFG_RECOVERY
+ DOT
+ "cn";
- private static final String DRMTOOL_CFG_RECOVERY_DATE_OF_MODIFY = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_RECOVERY_DATE_OF_MODIFY = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_RECOVERY
+ + KRATOOL_CFG_RECOVERY
+ DOT
+ "dateOfModify";
- private static final String DRMTOOL_CFG_RECOVERY_DN = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_RECOVERY_DN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_RECOVERY
+ + KRATOOL_CFG_RECOVERY
+ DOT
+ "dn";
- private static final String DRMTOOL_CFG_RECOVERY_EXTDATA_REQUEST_ID = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_RECOVERY_EXTDATA_REQUEST_ID = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_RECOVERY
+ + KRATOOL_CFG_RECOVERY
+ DOT
+ "extdata.requestId";
- private static final String DRMTOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_RECOVERY
+ + KRATOOL_CFG_RECOVERY
+ DOT
+ "extdata.requestNotes";
- private static final String DRMTOOL_CFG_RECOVERY_EXTDATA_SERIAL_NUMBER = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_RECOVERY_EXTDATA_SERIAL_NUMBER = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_RECOVERY
+ + KRATOOL_CFG_RECOVERY
+ DOT
+ "extdata.serialnumber";
- private static final String DRMTOOL_CFG_RECOVERY_REQUEST_ID = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_RECOVERY_REQUEST_ID = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_RECOVERY
+ + KRATOOL_CFG_RECOVERY
+ DOT
+ "requestId";
- // Constants: DRMTOOL Config File (DRM TPS Key Record Fields)
- private static final String DRMTOOL_CFG_TPS_KEY_RECORD_CN = DRMTOOL_CFG_PREFIX
+ // Constants: KRATOOL Config File (KRA TPS Key Record Fields)
+ private static final String KRATOOL_CFG_TPS_KEY_RECORD_CN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_TPS_KEY_RECORD
+ + KRATOOL_CFG_TPS_KEY_RECORD
+ DOT
+ "cn";
- private static final String DRMTOOL_CFG_TPS_KEY_RECORD_DATE_OF_MODIFY = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_TPS_KEY_RECORD_DATE_OF_MODIFY = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_TPS_KEY_RECORD
+ + KRATOOL_CFG_TPS_KEY_RECORD
+ DOT
+ "dateOfModify";
- private static final String DRMTOOL_CFG_TPS_KEY_RECORD_DN = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_TPS_KEY_RECORD_DN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_TPS_KEY_RECORD
+ + KRATOOL_CFG_TPS_KEY_RECORD
+ DOT
+ "dn";
- private static final String DRMTOOL_CFG_TPS_KEY_RECORD_PRIVATE_KEY_DATA = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_TPS_KEY_RECORD_PRIVATE_KEY_DATA = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_TPS_KEY_RECORD
+ + KRATOOL_CFG_TPS_KEY_RECORD
+ DOT
+ "privateKeyData";
- private static final String DRMTOOL_CFG_TPS_KEY_RECORD_SERIAL_NO = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_TPS_KEY_RECORD_SERIAL_NO = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_TPS_KEY_RECORD
+ + KRATOOL_CFG_TPS_KEY_RECORD
+ DOT
+ "serialno";
- // Constants: DRMTOOL Config File (DRM TPS Netkey Keygen Request Fields)
- private static final String DRMTOOL_CFG_KEYGEN_CN = DRMTOOL_CFG_PREFIX
+ // Constants: KRATOOL Config File (KRA TPS Netkey Keygen Request Fields)
+ private static final String KRATOOL_CFG_KEYGEN_CN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_KEYGEN
+ + KRATOOL_CFG_KEYGEN
+ DOT
+ "cn";
- private static final String DRMTOOL_CFG_KEYGEN_DATE_OF_MODIFY = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_KEYGEN_DATE_OF_MODIFY = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_KEYGEN
+ + KRATOOL_CFG_KEYGEN
+ DOT
+ "dateOfModify";
- private static final String DRMTOOL_CFG_KEYGEN_DN = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_KEYGEN_DN = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_KEYGEN
+ + KRATOOL_CFG_KEYGEN
+ DOT
+ "dn";
- private static final String DRMTOOL_CFG_KEYGEN_EXTDATA_KEY_RECORD = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_KEYGEN_EXTDATA_KEY_RECORD = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_KEYGEN
+ + KRATOOL_CFG_KEYGEN
+ DOT
+ "extdata.keyRecord";
- private static final String DRMTOOL_CFG_KEYGEN_EXTDATA_REQUEST_ID = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_KEYGEN_EXTDATA_REQUEST_ID = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_KEYGEN
+ + KRATOOL_CFG_KEYGEN
+ DOT
+ "extdata.requestId";
- private static final String DRMTOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_KEYGEN
+ + KRATOOL_CFG_KEYGEN
+ DOT
+ "extdata.requestNotes";
- private static final String DRMTOOL_CFG_KEYGEN_REQUEST_ID = DRMTOOL_CFG_PREFIX
+ private static final String KRATOOL_CFG_KEYGEN_REQUEST_ID = KRATOOL_CFG_PREFIX
+ DOT
- + DRMTOOL_CFG_KEYGEN
+ + KRATOOL_CFG_KEYGEN
+ DOT
+ "requestId";
@@ -862,57 +862,57 @@ public class DRMTool {
private static final String HEADER = "-----BEGIN";
private static final String TRAILER = "-----END";
- // Constants: DRM LDIF Record Fields
- private static final String DRM_LDIF_ARCHIVED_BY = "archivedBy:";
- private static final String DRM_LDIF_CN = "cn:";
- private static final String DRM_LDIF_DATE_OF_MODIFY = "dateOfModify:";
- private static final String DRM_LDIF_DN = "dn:";
- private static final String DRM_LDIF_DN_EMBEDDED_CN_DATA = "dn: cn";
- private static final String DRM_LDIF_EXTDATA_AUTH_TOKEN_USER = "extdata-auth--005ftoken;user:";
- private static final String DRM_LDIF_EXTDATA_AUTH_TOKEN_USER_DN = "extdata-auth--005ftoken;userdn:";
- private static final String DRM_LDIF_EXTDATA_KEY_RECORD = "extdata-keyrecord:";
- private static final String DRM_LDIF_EXTDATA_REQUEST_ID = "extdata-requestid:";
- private static final String DRM_LDIF_EXTDATA_REQUEST_NOTES = "extdata-requestnotes:";
- private static final String DRM_LDIF_EXTDATA_REQUEST_TYPE = "extdata-requesttype:";
- private static final String DRM_LDIF_EXTDATA_SERIAL_NUMBER = "extdata-serialnumber:";
- private static final String DRM_LDIF_PRIVATE_KEY_DATA = "privateKeyData::";
- private static final String DRM_LDIF_REQUEST_ID = "requestId:";
- private static final String DRM_LDIF_REQUEST_TYPE = "requestType:";
- private static final String DRM_LDIF_SERIAL_NO = "serialno:";
-
- // Constants: DRM LDIF Record Values
+ // Constants: KRA LDIF Record Fields
+ private static final String KRA_LDIF_ARCHIVED_BY = "archivedBy:";
+ private static final String KRA_LDIF_CN = "cn:";
+ private static final String KRA_LDIF_DATE_OF_MODIFY = "dateOfModify:";
+ private static final String KRA_LDIF_DN = "dn:";
+ private static final String KRA_LDIF_DN_EMBEDDED_CN_DATA = "dn: cn";
+ private static final String KRA_LDIF_EXTDATA_AUTH_TOKEN_USER = "extdata-auth--005ftoken;user:";
+ private static final String KRA_LDIF_EXTDATA_AUTH_TOKEN_USER_DN = "extdata-auth--005ftoken;userdn:";
+ private static final String KRA_LDIF_EXTDATA_KEY_RECORD = "extdata-keyrecord:";
+ private static final String KRA_LDIF_EXTDATA_REQUEST_ID = "extdata-requestid:";
+ private static final String KRA_LDIF_EXTDATA_REQUEST_NOTES = "extdata-requestnotes:";
+ private static final String KRA_LDIF_EXTDATA_REQUEST_TYPE = "extdata-requesttype:";
+ private static final String KRA_LDIF_EXTDATA_SERIAL_NUMBER = "extdata-serialnumber:";
+ private static final String KRA_LDIF_PRIVATE_KEY_DATA = "privateKeyData::";
+ private static final String KRA_LDIF_REQUEST_ID = "requestId:";
+ private static final String KRA_LDIF_REQUEST_TYPE = "requestType:";
+ private static final String KRA_LDIF_SERIAL_NO = "serialno:";
+
+ // Constants: KRA LDIF Record Values
private static final int INITIAL_LDIF_RECORD_CAPACITY = 0;
private static final int EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH = 56;
private static final int PRIVATE_KEY_DATA_FIRST_LINE_DATA_LENGTH = 60;
- private static final String DRM_LDIF_RECORD = "Generic";
- private static final String DRM_LDIF_CA_KEY_RECORD = "CA";
- private static final String DRM_LDIF_ENROLLMENT = "enrollment";
- private static final String DRM_LDIF_KEYGEN = "netkeyKeygen";
- private static final String DRM_LDIF_RECOVERY = "recovery";
- private static final String DRM_LDIF_TPS_KEY_RECORD = "TPS";
-
- // Constants: DRM LDIF Record Messages
- private static final String DRM_LDIF_REWRAP_MESSAGE = "REWRAPPED the '"
+ private static final String KRA_LDIF_RECORD = "Generic";
+ private static final String KRA_LDIF_CA_KEY_RECORD = "CA";
+ private static final String KRA_LDIF_ENROLLMENT = "enrollment";
+ private static final String KRA_LDIF_KEYGEN = "netkeyKeygen";
+ private static final String KRA_LDIF_RECOVERY = "recovery";
+ private static final String KRA_LDIF_TPS_KEY_RECORD = "TPS";
+
+ // Constants: KRA LDIF Record Messages
+ private static final String KRA_LDIF_REWRAP_MESSAGE = "REWRAPPED the '"
+ "existing DES3 "
+ "symmetric "
+ "session key"
+ "' with the '";
- private static final String DRM_LDIF_RSA_MESSAGE = "-bit RSA public key' "
+ private static final String KRA_LDIF_RSA_MESSAGE = "-bit RSA public key' "
+ "obtained from the "
+ "target storage "
+ "certificate";
- private static final String DRM_LDIF_USED_PWDFILE_MESSAGE =
+ private static final String KRA_LDIF_USED_PWDFILE_MESSAGE =
"USED source PKI security database "
+ "password file";
- private static final String DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE =
+ private static final String KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE =
"APPENDED ID offset";
- private static final String DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE =
+ private static final String KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE =
"REMOVED ID offset";
- private static final String DRM_LDIF_SOURCE_NAME_CONTEXT_MESSAGE =
- "RENAMED source DRM naming context '";
- private static final String DRM_LDIF_TARGET_NAME_CONTEXT_MESSAGE =
- "' to target DRM naming context '";
- private static final String DRM_LDIF_PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY_MESSAGE =
+ private static final String KRA_LDIF_SOURCE_NAME_CONTEXT_MESSAGE =
+ "RENAMED source KRA naming context '";
+ private static final String KRA_LDIF_TARGET_NAME_CONTEXT_MESSAGE =
+ "' to target KRA naming context '";
+ private static final String KRA_LDIF_PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY_MESSAGE =
"PROCESSED requests and key records ONLY!";
/*************/
@@ -927,17 +927,17 @@ public class DRMTool {
private static boolean mPwdfileFlag = false;
private static boolean mAppendIdOffsetFlag = false;
private static boolean mRemoveIdOffsetFlag = false;
- private static boolean mDrmNamingContextsFlag = false;
+ private static boolean mKraNamingContextsFlag = false;
private static boolean mProcessRequestsAndKeyRecordsOnlyFlag = false;
private static int mMandatoryNameValuePairs = 0;
private static int mRewrapNameValuePairs = 0;
private static int mPKISecurityDatabasePwdfileNameValuePairs = 0;
private static int mAppendIdOffsetNameValuePairs = 0;
private static int mRemoveIdOffsetNameValuePairs = 0;
- private static int mDrmNamingContextNameValuePairs = 0;
+ private static int mKraNamingContextNameValuePairs = 0;
// Variables: Command-Line Values (Mandatory)
- private static String mDrmtoolCfgFilename = null;
+ private static String mKratoolCfgFilename = null;
private static String mSourceLdifFilename = null;
private static String mTargetLdifFilename = null;
private static String mLogFilename = null;
@@ -955,14 +955,14 @@ public class DRMTool {
private static BigInteger mAppendIdOffset = null;
private static BigInteger mRemoveIdOffset = null;
- // Variables: Command-Line Values (DRM Naming Contexts)
- private static String mSourceDrmNamingContext = null;
- private static String mTargetDrmNamingContext = null;
+ // Variables: Command-Line Values (KRA Naming Contexts)
+ private static String mSourceKraNamingContext = null;
+ private static String mTargetKraNamingContext = null;
- // Variables: DRMTOOL Config File Parameters of Interest
- private static Hashtable<String, Boolean> drmtoolCfg = null;
+ // Variables: KRATOOL Config File Parameters of Interest
+ private static Hashtable<String, Boolean> kratoolCfg = null;
- // Variables: DRMTOOL LDIF File Parameters of Interest
+ // Variables: KRATOOL LDIF File Parameters of Interest
private static Vector<String> record = null;
private static Iterator<String> ldif_record = null;
@@ -978,9 +978,9 @@ public class DRMTool {
private static PublicKey mWrapPublicKey = null;
private static int mPublicKeySize = 0;
- // Variables: DRM LDIF Record Messages
+ // Variables: KRA LDIF Record Messages
private static String mSourcePKISecurityDatabasePwdfileMessage = null;
- private static String mDrmNamingContextMessage = null;
+ private static String mKraNamingContextMessage = null;
private static String mProcessRequestsAndKeyRecordsOnlyMessage = null;
/********************/
@@ -1006,17 +1006,17 @@ public class DRMTool {
/**
* This method prints out the proper command-line usage required to
- * execute DRMTool.
+ * execute KRATool.
*/
private static void printUsage() {
System.out.println("Usage: "
- + DRM_TOOL
+ + KRA_TOOL
+ NEWLINE
+ " "
- + DRMTOOL_CFG_FILE
+ + KRATOOL_CFG_FILE
+ NEWLINE
+ " "
- + DRMTOOL_CFG_DESCRIPTION
+ + KRATOOL_CFG_DESCRIPTION
+ NEWLINE
+ " "
+ SOURCE_LDIF_FILE
@@ -1094,18 +1094,18 @@ public class DRMTool {
+ NEWLINE
+ " "
+ "["
- + SOURCE_DRM_NAMING_CONTEXT
+ + SOURCE_KRA_NAMING_CONTEXT
+ NEWLINE
+ " "
- + SOURCE_DRM_NAMING_CONTEXT_DESCRIPTION
+ + SOURCE_KRA_NAMING_CONTEXT_DESCRIPTION
+ "]"
+ NEWLINE
+ " "
+ "["
- + TARGET_DRM_NAMING_CONTEXT
+ + TARGET_KRA_NAMING_CONTEXT
+ NEWLINE
+ " "
- + TARGET_DRM_NAMING_CONTEXT_DESCRIPTION
+ + TARGET_KRA_NAMING_CONTEXT_DESCRIPTION
+ "]"
+ NEWLINE
+ " "
@@ -1118,10 +1118,10 @@ public class DRMTool {
+ NEWLINE
+ NEWLINE
+ " "
- + DRM_TOOL
+ + KRA_TOOL
+ NEWLINE
+ " "
- + DRMTOOL_CFG_FILE_EXAMPLE
+ + KRATOOL_CFG_FILE_EXAMPLE
+ NEWLINE
+ " "
+ SOURCE_LDIF_FILE_EXAMPLE
@@ -1151,10 +1151,10 @@ public class DRMTool {
+ APPEND_ID_OFFSET_EXAMPLE
+ NEWLINE
+ " "
- + SOURCE_DRM_NAMING_CONTEXT_EXAMPLE
+ + SOURCE_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
- + TARGET_DRM_NAMING_CONTEXT_EXAMPLE
+ + TARGET_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
+ PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY
@@ -1164,10 +1164,10 @@ public class DRMTool {
+ NEWLINE
+ NEWLINE
+ " "
- + DRM_TOOL
+ + KRA_TOOL
+ NEWLINE
+ " "
- + DRMTOOL_CFG_FILE_EXAMPLE
+ + KRATOOL_CFG_FILE_EXAMPLE
+ NEWLINE
+ " "
+ SOURCE_LDIF_FILE_EXAMPLE
@@ -1197,10 +1197,10 @@ public class DRMTool {
+ REMOVE_ID_OFFSET_EXAMPLE
+ NEWLINE
+ " "
- + SOURCE_DRM_NAMING_CONTEXT_EXAMPLE
+ + SOURCE_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
- + TARGET_DRM_NAMING_CONTEXT_EXAMPLE
+ + TARGET_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
+ PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY
@@ -1210,10 +1210,10 @@ public class DRMTool {
+ NEWLINE
+ NEWLINE
+ " "
- + DRM_TOOL
+ + KRA_TOOL
+ NEWLINE
+ " "
- + DRMTOOL_CFG_FILE_EXAMPLE
+ + KRATOOL_CFG_FILE_EXAMPLE
+ NEWLINE
+ " "
+ SOURCE_LDIF_FILE_EXAMPLE
@@ -1240,10 +1240,10 @@ public class DRMTool {
+ SOURCE_NSS_DB_PWDFILE_EXAMPLE
+ NEWLINE
+ " "
- + SOURCE_DRM_NAMING_CONTEXT_EXAMPLE
+ + SOURCE_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
- + TARGET_DRM_NAMING_CONTEXT_EXAMPLE
+ + TARGET_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
+ PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY
@@ -1253,10 +1253,10 @@ public class DRMTool {
+ NEWLINE
+ NEWLINE
+ " "
- + DRM_TOOL
+ + KRA_TOOL
+ NEWLINE
+ " "
- + DRMTOOL_CFG_FILE_EXAMPLE
+ + KRATOOL_CFG_FILE_EXAMPLE
+ NEWLINE
+ " "
+ SOURCE_LDIF_FILE_EXAMPLE
@@ -1271,10 +1271,10 @@ public class DRMTool {
+ APPEND_ID_OFFSET_EXAMPLE
+ NEWLINE
+ " "
- + SOURCE_DRM_NAMING_CONTEXT_EXAMPLE
+ + SOURCE_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
- + TARGET_DRM_NAMING_CONTEXT_EXAMPLE
+ + TARGET_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
+ PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY
@@ -1284,10 +1284,10 @@ public class DRMTool {
+ NEWLINE
+ NEWLINE
+ " "
- + DRM_TOOL
+ + KRA_TOOL
+ NEWLINE
+ " "
- + DRMTOOL_CFG_FILE_EXAMPLE
+ + KRATOOL_CFG_FILE_EXAMPLE
+ NEWLINE
+ " "
+ SOURCE_LDIF_FILE_EXAMPLE
@@ -1302,10 +1302,10 @@ public class DRMTool {
+ REMOVE_ID_OFFSET_EXAMPLE
+ NEWLINE
+ " "
- + SOURCE_DRM_NAMING_CONTEXT_EXAMPLE
+ + SOURCE_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
- + TARGET_DRM_NAMING_CONTEXT_EXAMPLE
+ + TARGET_KRA_NAMING_CONTEXT_EXAMPLE
+ NEWLINE
+ " "
+ PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY
@@ -1402,12 +1402,12 @@ public class DRMTool {
/**
* This method is used to obtain the private RSA storage key from
- * the "source" DRM instance's security databases.
+ * the "source" KRA instance's security databases.
*
* This method is based upon code from 'com.netscape.kra.StorageKeyUnit'.
* <P>
*
- * @return the private RSA storage key from the "source" DRM
+ * @return the private RSA storage key from the "source" KRA
*/
private static PrivateKey getPrivateKey() {
try {
@@ -1434,14 +1434,14 @@ public class DRMTool {
/**
* This method gets the public key from the certificate stored
- * in the "target" DRM storage certificate file. It also obtains
+ * in the "target" KRA storage certificate file. It also obtains
* the keysize of this RSA key.
*
* This method is based upon code from
* 'com.netscape.cmstools.PrettyPrintCert'.
* <P>
*
- * @return the public RSA storage key from the "target" DRM
+ * @return the public RSA storage key from the "target" KRA
*/
private static PublicKey getPublicKey() {
BufferedReader inputCert = null;
@@ -1560,9 +1560,9 @@ public class DRMTool {
/**
* This method is used to obtain the private RSA storage key
- * from the "source" DRM instance's security databases and
+ * from the "source" KRA instance's security databases and
* the public RSA storage key from the certificate stored in
- * the "target" DRM storage certificate file.
+ * the "target" KRA storage certificate file.
* <P>
*
* @return true if successfully able to obtain both keys
@@ -2114,13 +2114,13 @@ public class DRMTool {
* An "attribute" consists of one of the following values:
*
* <PRE>
- * DRM_LDIF_CN = "cn:";
- * DRM_LDIF_DN_EMBEDDED_CN_DATA = "dn: cn";
- * DRM_LDIF_EXTDATA_KEY_RECORD = "extdata-keyrecord:";
- * DRM_LDIF_EXTDATA_REQUEST_ID = "extdata-requestid:";
- * DRM_LDIF_EXTDATA_SERIAL_NUMBER = "extdata-serialnumber:";
- * DRM_LDIF_REQUEST_ID = "requestId:";
- * DRM_LDIF_SERIAL_NO = "serialno:";
+ * KRA_LDIF_CN = "cn:";
+ * KRA_LDIF_DN_EMBEDDED_CN_DATA = "dn: cn";
+ * KRA_LDIF_EXTDATA_KEY_RECORD = "extdata-keyrecord:";
+ * KRA_LDIF_EXTDATA_REQUEST_ID = "extdata-requestid:";
+ * KRA_LDIF_EXTDATA_SERIAL_NUMBER = "extdata-serialnumber:";
+ * KRA_LDIF_REQUEST_ID = "requestId:";
+ * KRA_LDIF_SERIAL_NO = "serialno:";
*
*
* NOTE: Indexed data means that the numeric data
@@ -2271,7 +2271,7 @@ public class DRMTool {
/***********************/
/**
- * Helper method which composes the output line for DRM_LDIF_CN.
+ * Helper method which composes the output line for KRA_LDIF_CN.
* <P>
*
* @param record_type the string representation of the input record type
@@ -2282,52 +2282,52 @@ public class DRMTool {
String line) {
String output = null;
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_ENROLLMENT_CN)) {
- output = compose_numeric_line(DRM_LDIF_CN,
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ if (kratoolCfg.get(KRATOOL_CFG_ENROLLMENT_CN)) {
+ output = compose_numeric_line(KRA_LDIF_CN,
SPACE,
line,
false);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_CA_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_CA_KEY_RECORD_CN)) {
- output = compose_numeric_line(DRM_LDIF_CN,
+ } else if (record_type.equals(KRA_LDIF_CA_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_CA_KEY_RECORD_CN)) {
+ output = compose_numeric_line(KRA_LDIF_CN,
SPACE,
line,
false);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_CN)) {
- output = compose_numeric_line(DRM_LDIF_CN,
+ } else if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_CN)) {
+ output = compose_numeric_line(KRA_LDIF_CN,
SPACE,
line,
false);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_TPS_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_TPS_KEY_RECORD_CN)) {
- output = compose_numeric_line(DRM_LDIF_CN,
+ } else if (record_type.equals(KRA_LDIF_TPS_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_TPS_KEY_RECORD_CN)) {
+ output = compose_numeric_line(KRA_LDIF_CN,
SPACE,
line,
false);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_CN)) {
- output = compose_numeric_line(DRM_LDIF_CN,
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_CN)) {
+ output = compose_numeric_line(KRA_LDIF_CN,
SPACE,
line,
false);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECORD)) {
+ } else if (record_type.equals(KRA_LDIF_RECORD)) {
// Non-Request / Non-Key Record:
// Pass through the original
// 'cn' line UNCHANGED
@@ -2335,7 +2335,7 @@ public class DRMTool {
output = line;
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_CN
+ + KRA_LDIF_CN
+ "' for record type='"
+ record_type
+ "'!"
@@ -2346,7 +2346,7 @@ public class DRMTool {
}
/**
- * Helper method which composes the output line for DRM_LDIF_DATE_OF_MODIFY.
+ * Helper method which composes the output line for KRA_LDIF_DATE_OF_MODIFY.
* <P>
*
* @param record_type the string representation of the input record type
@@ -2357,9 +2357,9 @@ public class DRMTool {
String line) {
String output = null;
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_ENROLLMENT_DATE_OF_MODIFY)) {
- output = DRM_LDIF_DATE_OF_MODIFY
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ if (kratoolCfg.get(KRATOOL_CFG_ENROLLMENT_DATE_OF_MODIFY)) {
+ output = KRA_LDIF_DATE_OF_MODIFY
+ SPACE
+ mDateOfModify;
@@ -2372,9 +2372,9 @@ public class DRMTool {
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_CA_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_CA_KEY_RECORD_DATE_OF_MODIFY)) {
- output = DRM_LDIF_DATE_OF_MODIFY
+ } else if (record_type.equals(KRA_LDIF_CA_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_CA_KEY_RECORD_DATE_OF_MODIFY)) {
+ output = KRA_LDIF_DATE_OF_MODIFY
+ SPACE
+ mDateOfModify;
@@ -2387,9 +2387,9 @@ public class DRMTool {
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_DATE_OF_MODIFY)) {
- output = DRM_LDIF_DATE_OF_MODIFY
+ } else if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_DATE_OF_MODIFY)) {
+ output = KRA_LDIF_DATE_OF_MODIFY
+ SPACE
+ mDateOfModify;
@@ -2402,9 +2402,9 @@ public class DRMTool {
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_TPS_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_TPS_KEY_RECORD_DATE_OF_MODIFY)) {
- output = DRM_LDIF_DATE_OF_MODIFY
+ } else if (record_type.equals(KRA_LDIF_TPS_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_TPS_KEY_RECORD_DATE_OF_MODIFY)) {
+ output = KRA_LDIF_DATE_OF_MODIFY
+ SPACE
+ mDateOfModify;
@@ -2417,9 +2417,9 @@ public class DRMTool {
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_DATE_OF_MODIFY)) {
- output = DRM_LDIF_DATE_OF_MODIFY
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_DATE_OF_MODIFY)) {
+ output = KRA_LDIF_DATE_OF_MODIFY
+ SPACE
+ mDateOfModify;
@@ -2434,7 +2434,7 @@ public class DRMTool {
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_DATE_OF_MODIFY
+ + KRA_LDIF_DATE_OF_MODIFY
+ "' for record type='"
+ record_type
+ "'!"
@@ -2445,7 +2445,7 @@ public class DRMTool {
}
/**
- * Helper method which composes the output line for DRM_LDIF_DN.
+ * Helper method which composes the output line for KRA_LDIF_DN.
* <P>
*
* @param record_type the string representation of the input record type
@@ -2460,12 +2460,12 @@ public class DRMTool {
String output = null;
try {
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_ENROLLMENT_DN)) {
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ if (kratoolCfg.get(KRATOOL_CFG_ENROLLMENT_DN)) {
// First check for an embedded "cn=<value>"
// name-value pair
- if (line.startsWith(DRM_LDIF_DN_EMBEDDED_CN_DATA)) {
+ if (line.startsWith(KRA_LDIF_DN_EMBEDDED_CN_DATA)) {
// At this point, always extract
// the embedded "cn=<value>" name-value pair
// which will ALWAYS be the first
@@ -2473,7 +2473,7 @@ public class DRMTool {
embedded_cn_data = line.split(COMMA, 2);
embedded_cn_output = compose_numeric_line(
- DRM_LDIF_DN_EMBEDDED_CN_DATA,
+ KRA_LDIF_DN_EMBEDDED_CN_DATA,
EQUAL_SIGN,
embedded_cn_data[0],
false);
@@ -2485,25 +2485,25 @@ public class DRMTool {
input = line;
}
- // Since "-source_drm_naming_context", and
- // "-target_drm_naming_context" are OPTIONAL
+ // Since "-source_kra_naming_context", and
+ // "-target_kra_naming_context" are OPTIONAL
// parameters, ONLY process this portion of the field
// if both of these options have been selected
- if (mDrmNamingContextsFlag) {
- output = input.replace(mSourceDrmNamingContext,
- mTargetDrmNamingContext);
+ if (mKraNamingContextsFlag) {
+ output = input.replace(mSourceKraNamingContext,
+ mTargetKraNamingContext);
} else {
output = input;
}
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_CA_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_CA_KEY_RECORD_DN)) {
+ } else if (record_type.equals(KRA_LDIF_CA_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_CA_KEY_RECORD_DN)) {
// First check for an embedded "cn=<value>"
// name-value pair
- if (line.startsWith(DRM_LDIF_DN_EMBEDDED_CN_DATA)) {
+ if (line.startsWith(KRA_LDIF_DN_EMBEDDED_CN_DATA)) {
// At this point, always extract
// the embedded "cn=<value>" name-value pair
// which will ALWAYS be the first
@@ -2511,7 +2511,7 @@ public class DRMTool {
embedded_cn_data = line.split(COMMA, 2);
embedded_cn_output = compose_numeric_line(
- DRM_LDIF_DN_EMBEDDED_CN_DATA,
+ KRA_LDIF_DN_EMBEDDED_CN_DATA,
EQUAL_SIGN,
embedded_cn_data[0],
false);
@@ -2523,25 +2523,25 @@ public class DRMTool {
input = line;
}
- // Since "-source_drm_naming_context", and
- // "-target_drm_naming_context" are OPTIONAL
+ // Since "-source_kra_naming_context", and
+ // "-target_kra_naming_context" are OPTIONAL
// parameters, ONLY process this portion of the field
// if both of these options have been selected
- if (mDrmNamingContextsFlag) {
- output = input.replace(mSourceDrmNamingContext,
- mTargetDrmNamingContext);
+ if (mKraNamingContextsFlag) {
+ output = input.replace(mSourceKraNamingContext,
+ mTargetKraNamingContext);
} else {
output = input;
}
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_DN)) {
+ } else if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_DN)) {
// First check for an embedded "cn=<value>"
// name-value pair
- if (line.startsWith(DRM_LDIF_DN_EMBEDDED_CN_DATA)) {
+ if (line.startsWith(KRA_LDIF_DN_EMBEDDED_CN_DATA)) {
// At this point, always extract
// the embedded "cn=<value>" name-value pair
// which will ALWAYS be the first
@@ -2549,7 +2549,7 @@ public class DRMTool {
embedded_cn_data = line.split(COMMA, 2);
embedded_cn_output = compose_numeric_line(
- DRM_LDIF_DN_EMBEDDED_CN_DATA,
+ KRA_LDIF_DN_EMBEDDED_CN_DATA,
EQUAL_SIGN,
embedded_cn_data[0],
false);
@@ -2561,25 +2561,25 @@ public class DRMTool {
input = line;
}
- // Since "-source_drm_naming_context", and
- // "-target_drm_naming_context" are OPTIONAL
+ // Since "-source_kra_naming_context", and
+ // "-target_kra_naming_context" are OPTIONAL
// parameters, ONLY process this portion of the field
// if both of these options have been selected
- if (mDrmNamingContextsFlag) {
- output = input.replace(mSourceDrmNamingContext,
- mTargetDrmNamingContext);
+ if (mKraNamingContextsFlag) {
+ output = input.replace(mSourceKraNamingContext,
+ mTargetKraNamingContext);
} else {
output = input;
}
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_TPS_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_TPS_KEY_RECORD_DN)) {
+ } else if (record_type.equals(KRA_LDIF_TPS_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_TPS_KEY_RECORD_DN)) {
// First check for an embedded "cn=<value>"
// name-value pair
- if (line.startsWith(DRM_LDIF_DN_EMBEDDED_CN_DATA)) {
+ if (line.startsWith(KRA_LDIF_DN_EMBEDDED_CN_DATA)) {
// At this point, always extract
// the embedded "cn=<value>" name-value pair
// which will ALWAYS be the first
@@ -2587,7 +2587,7 @@ public class DRMTool {
embedded_cn_data = line.split(COMMA, 2);
embedded_cn_output = compose_numeric_line(
- DRM_LDIF_DN_EMBEDDED_CN_DATA,
+ KRA_LDIF_DN_EMBEDDED_CN_DATA,
EQUAL_SIGN,
embedded_cn_data[0],
false);
@@ -2599,25 +2599,25 @@ public class DRMTool {
input = line;
}
- // Since "-source_drm_naming_context", and
- // "-target_drm_naming_context" are OPTIONAL
+ // Since "-source_kra_naming_context", and
+ // "-target_kra_naming_context" are OPTIONAL
// parameters, ONLY process this portion of the field
// if both of these options have been selected
- if (mDrmNamingContextsFlag) {
- output = input.replace(mSourceDrmNamingContext,
- mTargetDrmNamingContext);
+ if (mKraNamingContextsFlag) {
+ output = input.replace(mSourceKraNamingContext,
+ mTargetKraNamingContext);
} else {
output = input;
}
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_DN)) {
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_DN)) {
// First check for an embedded "cn=<value>"
// name-value pair
- if (line.startsWith(DRM_LDIF_DN_EMBEDDED_CN_DATA)) {
+ if (line.startsWith(KRA_LDIF_DN_EMBEDDED_CN_DATA)) {
// At this point, always extract
// the embedded "cn=<value>" name-value pair
// which will ALWAYS be the first
@@ -2625,7 +2625,7 @@ public class DRMTool {
embedded_cn_data = line.split(COMMA, 2);
embedded_cn_output = compose_numeric_line(
- DRM_LDIF_DN_EMBEDDED_CN_DATA,
+ KRA_LDIF_DN_EMBEDDED_CN_DATA,
EQUAL_SIGN,
embedded_cn_data[0],
false);
@@ -2637,20 +2637,20 @@ public class DRMTool {
input = line;
}
- // Since "-source_drm_naming_context", and
- // "-target_drm_naming_context" are OPTIONAL
+ // Since "-source_kra_naming_context", and
+ // "-target_kra_naming_context" are OPTIONAL
// parameters, ONLY process this portion of the field
// if both of these options have been selected
- if (mDrmNamingContextsFlag) {
- output = input.replace(mSourceDrmNamingContext,
- mTargetDrmNamingContext);
+ if (mKraNamingContextsFlag) {
+ output = input.replace(mSourceKraNamingContext,
+ mTargetKraNamingContext);
} else {
output = input;
}
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECORD)) {
+ } else if (record_type.equals(KRA_LDIF_RECORD)) {
// Non-Request / Non-Key Record:
// Pass through the original
// 'dn' line UNCHANGED
@@ -2658,7 +2658,7 @@ public class DRMTool {
output = line;
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_DN
+ + KRA_LDIF_DN
+ "' for record type='"
+ record_type
+ "'!"
@@ -2672,10 +2672,10 @@ public class DRMTool {
+ "'"
+ NEWLINE, true);
} catch (NullPointerException exNullPointerException) {
- log("ERROR: Unable to replace source DRM naming context '"
- + mSourceDrmNamingContext
- + "' with target DRM naming context '"
- + mTargetDrmNamingContext
+ log("ERROR: Unable to replace source KRA naming context '"
+ + mSourceKraNamingContext
+ + "' with target KRA naming context '"
+ + mTargetKraNamingContext
+ "' NullPointerException: '"
+ exNullPointerException.toString()
+ "'"
@@ -2687,7 +2687,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_EXTDATA_KEY_RECORD.
+ * KRA_LDIF_EXTDATA_KEY_RECORD.
* <P>
*
* @param record_type the string representation of the input record type
@@ -2698,18 +2698,18 @@ public class DRMTool {
String line) {
String output = null;
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_ENROLLMENT_EXTDATA_KEY_RECORD)) {
- output = compose_numeric_line(DRM_LDIF_EXTDATA_KEY_RECORD,
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ if (kratoolCfg.get(KRATOOL_CFG_ENROLLMENT_EXTDATA_KEY_RECORD)) {
+ output = compose_numeric_line(KRA_LDIF_EXTDATA_KEY_RECORD,
SPACE,
line,
false);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_EXTDATA_KEY_RECORD)) {
- output = compose_numeric_line(DRM_LDIF_EXTDATA_KEY_RECORD,
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_EXTDATA_KEY_RECORD)) {
+ output = compose_numeric_line(KRA_LDIF_EXTDATA_KEY_RECORD,
SPACE,
line,
false);
@@ -2718,7 +2718,7 @@ public class DRMTool {
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_EXTDATA_KEY_RECORD
+ + KRA_LDIF_EXTDATA_KEY_RECORD
+ "' for record type='"
+ record_type
+ "'!"
@@ -2730,7 +2730,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_EXTDATA_REQUEST_ID.
+ * KRA_LDIF_EXTDATA_REQUEST_ID.
* <P>
*
* @param record_type the string representation of the input record type
@@ -2741,23 +2741,23 @@ public class DRMTool {
String line) {
String output = null;
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
// ALWAYS pass-through "extdata-requestId" for
- // DRM_LDIF_ENROLLMENT records UNCHANGED because the
+ // KRA_LDIF_ENROLLMENT records UNCHANGED because the
// value in this field is associated with the issuing CA!
output = line;
- } else if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_EXTDATA_REQUEST_ID)) {
- output = compose_numeric_line(DRM_LDIF_EXTDATA_REQUEST_ID,
+ } else if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_EXTDATA_REQUEST_ID)) {
+ output = compose_numeric_line(KRA_LDIF_EXTDATA_REQUEST_ID,
SPACE,
line,
false);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_EXTDATA_REQUEST_ID)) {
- output = compose_numeric_line(DRM_LDIF_EXTDATA_REQUEST_ID,
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_EXTDATA_REQUEST_ID)) {
+ output = compose_numeric_line(KRA_LDIF_EXTDATA_REQUEST_ID,
SPACE,
line,
false);
@@ -2766,7 +2766,7 @@ public class DRMTool {
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_EXTDATA_REQUEST_ID
+ + KRA_LDIF_EXTDATA_REQUEST_ID
+ "' for record type='"
+ record_type
+ "'!"
@@ -2778,7 +2778,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_EXTDATA_REQUEST_NOTES.
+ * KRA_LDIF_EXTDATA_REQUEST_NOTES.
* <P>
*
* @param record_type the string representation of the input record type
@@ -2795,13 +2795,13 @@ public class DRMTool {
String next_line = null;
// extract the data
- if (line.length() > DRM_LDIF_EXTDATA_REQUEST_NOTES.length()) {
+ if (line.length() > KRA_LDIF_EXTDATA_REQUEST_NOTES.length()) {
input.append(line.substring(
- DRM_LDIF_EXTDATA_REQUEST_NOTES.length() + 1
+ KRA_LDIF_EXTDATA_REQUEST_NOTES.length() + 1
).trim());
} else {
input.append(line.substring(
- DRM_LDIF_EXTDATA_REQUEST_NOTES.length()
+ KRA_LDIF_EXTDATA_REQUEST_NOTES.length()
).trim());
}
@@ -2817,8 +2817,8 @@ public class DRMTool {
}
}
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_ENROLLMENT_EXTDATA_REQUEST_NOTES)) {
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ if (kratoolCfg.get(KRATOOL_CFG_ENROLLMENT_EXTDATA_REQUEST_NOTES)) {
// write out a revised 'extdata-requestnotes' line
if (mRewrapFlag && mAppendIdOffsetFlag) {
data = input.toString()
@@ -2827,18 +2827,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -2846,7 +2846,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -2858,18 +2858,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -2877,7 +2877,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -2889,11 +2889,11 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -2901,7 +2901,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -2913,12 +2913,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -2926,7 +2926,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -2938,12 +2938,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -2951,7 +2951,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -2962,7 +2962,7 @@ public class DRMTool {
log("Changed:"
+ NEWLINE
+ TIC
- + DRM_LDIF_EXTDATA_REQUEST_NOTES
+ + KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -2978,8 +2978,8 @@ public class DRMTool {
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES)) {
+ } else if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES)) {
// write out a revised 'extdata-requestnotes' line
if (mRewrapFlag && mAppendIdOffsetFlag) {
data = input.toString()
@@ -2988,18 +2988,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3007,7 +3007,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3019,18 +3019,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3038,7 +3038,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3050,11 +3050,11 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3062,7 +3062,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3074,12 +3074,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3087,7 +3087,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3099,12 +3099,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3112,7 +3112,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3123,7 +3123,7 @@ public class DRMTool {
log("Changed:"
+ NEWLINE
+ TIC
- + DRM_LDIF_EXTDATA_REQUEST_NOTES
+ + KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3139,8 +3139,8 @@ public class DRMTool {
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES)) {
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES)) {
// write out a revised 'extdata-requestnotes' line
if (mRewrapFlag && mAppendIdOffsetFlag) {
data = input.toString()
@@ -3149,18 +3149,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3168,7 +3168,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3180,18 +3180,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3199,7 +3199,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3211,11 +3211,11 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3223,7 +3223,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3235,12 +3235,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3248,7 +3248,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3260,12 +3260,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3273,7 +3273,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3284,7 +3284,7 @@ public class DRMTool {
log("Changed:"
+ NEWLINE
+ TIC
- + DRM_LDIF_EXTDATA_REQUEST_NOTES
+ + KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3302,7 +3302,7 @@ public class DRMTool {
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_EXTDATA_REQUEST_NOTES
+ + KRA_LDIF_EXTDATA_REQUEST_NOTES
+ "' for record type='"
+ record_type
+ "'!"
@@ -3318,7 +3318,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_EXTDATA_REQUEST_NOTES.
+ * KRA_LDIF_EXTDATA_REQUEST_NOTES.
* <P>
*
* @param record_type the string representation of the input record type
@@ -3333,27 +3333,27 @@ public class DRMTool {
String unformatted_data = null;
String output = null;
- if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES)) {
- if (!previous_line.startsWith(DRM_LDIF_EXTDATA_REQUEST_NOTES)) {
+ if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES)) {
+ if (!previous_line.startsWith(KRA_LDIF_EXTDATA_REQUEST_NOTES)) {
// write out the missing 'extdata-requestnotes' line
if (mRewrapFlag && mAppendIdOffsetFlag) {
data = LEFT_BRACE
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3361,7 +3361,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3371,18 +3371,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3390,7 +3390,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3400,11 +3400,11 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3412,7 +3412,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3422,12 +3422,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3435,7 +3435,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3445,12 +3445,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3458,7 +3458,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3480,27 +3480,27 @@ public class DRMTool {
System.out.print(".");
}
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES)) {
- if (!previous_line.startsWith(DRM_LDIF_EXTDATA_REQUEST_NOTES)) {
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES)) {
+ if (!previous_line.startsWith(KRA_LDIF_EXTDATA_REQUEST_NOTES)) {
// write out the missing 'extdata-requestnotes' line
if (mRewrapFlag && mAppendIdOffsetFlag) {
data = LEFT_BRACE
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3508,7 +3508,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3518,18 +3518,18 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
+ SPACE
+ PLUS + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3537,7 +3537,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3547,11 +3547,11 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REWRAP_MESSAGE
+ + KRA_LDIF_REWRAP_MESSAGE
+ mPublicKeySize
- + DRM_LDIF_RSA_MESSAGE
+ + KRA_LDIF_RSA_MESSAGE
+ mSourcePKISecurityDatabasePwdfileMessage
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3559,7 +3559,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3569,12 +3569,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_APPENDED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mAppendIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3582,7 +3582,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3592,12 +3592,12 @@ public class DRMTool {
+ mDateOfModify
+ RIGHT_BRACE
+ COLON + SPACE
- + DRM_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ + KRA_LDIF_REMOVED_ID_OFFSET_MESSAGE
+ SPACE
+ TIC
+ mRemoveIdOffset.toString()
+ TIC
- + mDrmNamingContextMessage
+ + mKraNamingContextMessage
+ mProcessRequestsAndKeyRecordsOnlyMessage;
// Unformat the data
@@ -3605,7 +3605,7 @@ public class DRMTool {
// Format the unformatted_data
// to match the desired LDIF format
- output = DRM_LDIF_EXTDATA_REQUEST_NOTES
+ output = KRA_LDIF_EXTDATA_REQUEST_NOTES
+ SPACE
+ format_ldif_data(
EXTDATA_REQUEST_NOTES_FIRST_LINE_DATA_LENGTH,
@@ -3632,7 +3632,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_EXTDATA_SERIAL_NUMBER.
+ * KRA_LDIF_EXTDATA_SERIAL_NUMBER.
* <P>
*
* @param record_type the string representation of the input record type
@@ -3643,9 +3643,9 @@ public class DRMTool {
String line) {
String output = null;
- if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_EXTDATA_SERIAL_NUMBER)) {
- output = compose_numeric_line(DRM_LDIF_EXTDATA_SERIAL_NUMBER,
+ if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_EXTDATA_SERIAL_NUMBER)) {
+ output = compose_numeric_line(KRA_LDIF_EXTDATA_SERIAL_NUMBER,
SPACE,
line,
false);
@@ -3654,7 +3654,7 @@ public class DRMTool {
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_EXTDATA_SERIAL_NUMBER
+ + KRA_LDIF_EXTDATA_SERIAL_NUMBER
+ "' for record type='"
+ record_type
+ "'!"
@@ -3666,7 +3666,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_PRIVATE_KEY_DATA.
+ * KRA_LDIF_PRIVATE_KEY_DATA.
* <P>
*
* @param record_type the string representation of the input record type
@@ -3684,8 +3684,8 @@ public class DRMTool {
String output = null;
try {
- if (record_type.equals(DRM_LDIF_CA_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_CA_KEY_RECORD_PRIVATE_KEY_DATA)) {
+ if (record_type.equals(KRA_LDIF_CA_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_CA_KEY_RECORD_PRIVATE_KEY_DATA)) {
// Since "-source_pki_security_database_path",
// "-source_storage_token_name",
// "-source_storage_certificate_nickname", and
@@ -3695,7 +3695,7 @@ public class DRMTool {
if (mRewrapFlag) {
// extract the data
data.append(line.substring(
- DRM_LDIF_PRIVATE_KEY_DATA.length() + 1
+ KRA_LDIF_PRIVATE_KEY_DATA.length() + 1
).trim());
while ((line = ldif_record.next()) != null) {
@@ -3733,7 +3733,7 @@ public class DRMTool {
unformatted_data);
// construct a revised 'privateKeyData' line
- output = DRM_LDIF_PRIVATE_KEY_DATA
+ output = KRA_LDIF_PRIVATE_KEY_DATA
+ SPACE
+ formatted_data
+ NEWLINE
@@ -3758,8 +3758,8 @@ public class DRMTool {
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_TPS_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_TPS_KEY_RECORD_PRIVATE_KEY_DATA)) {
+ } else if (record_type.equals(KRA_LDIF_TPS_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_TPS_KEY_RECORD_PRIVATE_KEY_DATA)) {
// Since "-source_pki_security_database_path",
// "-source_storage_token_name",
// "-source_storage_certificate_nickname", and
@@ -3769,7 +3769,7 @@ public class DRMTool {
if (mRewrapFlag) {
// extract the data
data.append(line.substring(
- DRM_LDIF_PRIVATE_KEY_DATA.length() + 1
+ KRA_LDIF_PRIVATE_KEY_DATA.length() + 1
).trim());
while ((line = ldif_record.next()) != null) {
@@ -3807,7 +3807,7 @@ public class DRMTool {
unformatted_data);
// construct a revised 'privateKeyData' line
- output = DRM_LDIF_PRIVATE_KEY_DATA
+ output = KRA_LDIF_PRIVATE_KEY_DATA
+ SPACE
+ formatted_data
+ NEWLINE
@@ -3834,7 +3834,7 @@ public class DRMTool {
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_PRIVATE_KEY_DATA
+ + KRA_LDIF_PRIVATE_KEY_DATA
+ "' for record type='"
+ record_type
+ "'!"
@@ -3852,7 +3852,7 @@ public class DRMTool {
}
/**
- * Helper method which composes the output line for DRM_LDIF_REQUEST_ID.
+ * Helper method which composes the output line for KRA_LDIF_REQUEST_ID.
* <P>
*
* @param record_type the string representation of the input record type
@@ -3863,27 +3863,27 @@ public class DRMTool {
String line) {
String output = null;
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_ENROLLMENT_REQUEST_ID)) {
- output = compose_numeric_line(DRM_LDIF_REQUEST_ID,
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ if (kratoolCfg.get(KRATOOL_CFG_ENROLLMENT_REQUEST_ID)) {
+ output = compose_numeric_line(KRA_LDIF_REQUEST_ID,
SPACE,
line,
true);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECOVERY)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_RECOVERY_REQUEST_ID)) {
- output = compose_numeric_line(DRM_LDIF_REQUEST_ID,
+ } else if (record_type.equals(KRA_LDIF_RECOVERY)) {
+ if (kratoolCfg.get(KRATOOL_CFG_RECOVERY_REQUEST_ID)) {
+ output = compose_numeric_line(KRA_LDIF_REQUEST_ID,
SPACE,
line,
true);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_KEYGEN)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_KEYGEN_REQUEST_ID)) {
- output = compose_numeric_line(DRM_LDIF_REQUEST_ID,
+ } else if (record_type.equals(KRA_LDIF_KEYGEN)) {
+ if (kratoolCfg.get(KRATOOL_CFG_KEYGEN_REQUEST_ID)) {
+ output = compose_numeric_line(KRA_LDIF_REQUEST_ID,
SPACE,
line,
true);
@@ -3892,7 +3892,7 @@ public class DRMTool {
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_REQUEST_ID
+ + KRA_LDIF_REQUEST_ID
+ "' for record type='"
+ record_type
+ "'!"
@@ -3903,7 +3903,7 @@ public class DRMTool {
}
/**
- * Helper method which composes the output line for DRM_LDIF_SERIAL_NO.
+ * Helper method which composes the output line for KRA_LDIF_SERIAL_NO.
* <P>
*
* @param record_type the string representation of the input record type
@@ -3914,25 +3914,25 @@ public class DRMTool {
String line) {
String output = null;
- if (record_type.equals(DRM_LDIF_CA_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_CA_KEY_RECORD_SERIAL_NO)) {
- output = compose_numeric_line(DRM_LDIF_SERIAL_NO,
+ if (record_type.equals(KRA_LDIF_CA_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_CA_KEY_RECORD_SERIAL_NO)) {
+ output = compose_numeric_line(KRA_LDIF_SERIAL_NO,
SPACE,
line,
true);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_TPS_KEY_RECORD)) {
- if (drmtoolCfg.get(DRMTOOL_CFG_TPS_KEY_RECORD_SERIAL_NO)) {
- output = compose_numeric_line(DRM_LDIF_SERIAL_NO,
+ } else if (record_type.equals(KRA_LDIF_TPS_KEY_RECORD)) {
+ if (kratoolCfg.get(KRATOOL_CFG_TPS_KEY_RECORD_SERIAL_NO)) {
+ output = compose_numeric_line(KRA_LDIF_SERIAL_NO,
SPACE,
line,
true);
} else {
output = line;
}
- } else if (record_type.equals(DRM_LDIF_RECORD)) {
+ } else if (record_type.equals(KRA_LDIF_RECORD)) {
// Non-Request / Non-Key Record:
// Pass through the original
// 'serialno' line UNCHANGED
@@ -3940,7 +3940,7 @@ public class DRMTool {
output = line;
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_SERIAL_NO
+ + KRA_LDIF_SERIAL_NO
+ "' for record type='"
+ record_type
+ "'!"
@@ -3952,7 +3952,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_EXTDATA_AUTH_TOKEN_USER.
+ * KRA_LDIF_EXTDATA_AUTH_TOKEN_USER.
* <P>
*
* @param record_type the string representation of the input record type
@@ -3964,30 +3964,30 @@ public class DRMTool {
String output = null;
try {
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- // Since "-source_drm_naming_context", and
- // "-target_drm_naming_context" are OPTIONAL
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ // Since "-source_kra_naming_context", and
+ // "-target_kra_naming_context" are OPTIONAL
// parameters, ONLY process this field if both of
// these options have been selected
- if (mDrmNamingContextsFlag) {
- output = line.replace(mSourceDrmNamingContext,
- mTargetDrmNamingContext);
+ if (mKraNamingContextsFlag) {
+ output = line.replace(mSourceKraNamingContext,
+ mTargetKraNamingContext);
} else {
output = line;
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_EXTDATA_AUTH_TOKEN_USER
+ + KRA_LDIF_EXTDATA_AUTH_TOKEN_USER
+ "' for record type='"
+ record_type
+ "'!"
+ NEWLINE, true);
}
} catch (NullPointerException exNullPointerException) {
- log("ERROR: Unable to replace source DRM naming context '"
- + mSourceDrmNamingContext
- + "' with target DRM naming context '"
- + mTargetDrmNamingContext
+ log("ERROR: Unable to replace source KRA naming context '"
+ + mSourceKraNamingContext
+ + "' with target KRA naming context '"
+ + mTargetKraNamingContext
+ "' NullPointerException: '"
+ exNullPointerException.toString()
+ "'"
@@ -3999,7 +3999,7 @@ public class DRMTool {
/**
* Helper method which composes the output line for
- * DRM_LDIF_EXTDATA_AUTH_TOKEN_USER_DN.
+ * KRA_LDIF_EXTDATA_AUTH_TOKEN_USER_DN.
* <P>
*
* @param record_type the string representation of the input record type
@@ -4011,30 +4011,30 @@ public class DRMTool {
String output = null;
try {
- if (record_type.equals(DRM_LDIF_ENROLLMENT)) {
- // Since "-source_drm_naming_context", and
- // "-target_drm_naming_context" are OPTIONAL
+ if (record_type.equals(KRA_LDIF_ENROLLMENT)) {
+ // Since "-source_kra_naming_context", and
+ // "-target_kra_naming_context" are OPTIONAL
// parameters, ONLY process this field if both of
// these options have been selected
- if (mDrmNamingContextsFlag) {
- output = line.replace(mSourceDrmNamingContext,
- mTargetDrmNamingContext);
+ if (mKraNamingContextsFlag) {
+ output = line.replace(mSourceKraNamingContext,
+ mTargetKraNamingContext);
} else {
output = line;
}
} else {
log("ERROR: Mismatched record field='"
- + DRM_LDIF_EXTDATA_AUTH_TOKEN_USER_DN
+ + KRA_LDIF_EXTDATA_AUTH_TOKEN_USER_DN
+ "' for record type='"
+ record_type
+ "'!"
+ NEWLINE, true);
}
} catch (NullPointerException exNullPointerException) {
- log("ERROR: Unable to replace source DRM naming context '"
- + mSourceDrmNamingContext
- + "' with target DRM naming context '"
- + mTargetDrmNamingContext
+ log("ERROR: Unable to replace source KRA naming context '"
+ + mSourceKraNamingContext
+ + "' with target KRA naming context '"
+ + mTargetKraNamingContext
+ "' NullPointerException: '"
+ exNullPointerException.toString()
+ "'"
@@ -4096,40 +4096,40 @@ public class DRMTool {
// Check for the end of an LDIF record
if (!input.equals("")) {
// Check to see if input line identifies the record type
- if (input.startsWith(DRM_LDIF_REQUEST_TYPE)) {
+ if (input.startsWith(KRA_LDIF_REQUEST_TYPE)) {
// set the record type:
//
- // * DRM_LDIF_ENROLLMENT
- // * DRM_LDIF_KEYGEN
- // * DRM_LDIF_RECOVERY
+ // * KRA_LDIF_ENROLLMENT
+ // * KRA_LDIF_KEYGEN
+ // * KRA_LDIF_RECOVERY
//
record_type = input.substring(
- DRM_LDIF_REQUEST_TYPE.length() + 1
+ KRA_LDIF_REQUEST_TYPE.length() + 1
).trim();
- if (!record_type.equals(DRM_LDIF_ENROLLMENT) &&
- !record_type.equals(DRM_LDIF_KEYGEN) &&
- !record_type.equals(DRM_LDIF_RECOVERY)) {
+ if (!record_type.equals(KRA_LDIF_ENROLLMENT) &&
+ !record_type.equals(KRA_LDIF_KEYGEN) &&
+ !record_type.equals(KRA_LDIF_RECOVERY)) {
log("ERROR: Unknown LDIF record type='"
+ record_type
+ "'!"
+ NEWLINE, true);
return FAILURE;
}
- } else if (input.startsWith(DRM_LDIF_ARCHIVED_BY)) {
+ } else if (input.startsWith(KRA_LDIF_ARCHIVED_BY)) {
// extract the data
data = input.substring(
- DRM_LDIF_ARCHIVED_BY.length() + 1
+ KRA_LDIF_ARCHIVED_BY.length() + 1
).trim();
// set the record type:
//
- // * DRM_LDIF_CA_KEY_RECORD
- // * DRM_LDIF_TPS_KEY_RECORD
+ // * KRA_LDIF_CA_KEY_RECORD
+ // * KRA_LDIF_TPS_KEY_RECORD
//
- if (data.startsWith(DRM_LDIF_TPS_KEY_RECORD)) {
- record_type = DRM_LDIF_TPS_KEY_RECORD;
- } else if (data.startsWith(DRM_LDIF_CA_KEY_RECORD)) {
- record_type = DRM_LDIF_CA_KEY_RECORD;
+ if (data.startsWith(KRA_LDIF_TPS_KEY_RECORD)) {
+ record_type = KRA_LDIF_TPS_KEY_RECORD;
+ } else if (data.startsWith(KRA_LDIF_CA_KEY_RECORD)) {
+ record_type = KRA_LDIF_CA_KEY_RECORD;
} else {
log("ERROR: Unable to determine LDIF record type "
+ "from data='"
@@ -4167,16 +4167,16 @@ public class DRMTool {
continue;
} else if (record_type == null) {
// Set record type to specify a "generic" LDIF record
- record_type = DRM_LDIF_RECORD;
+ record_type = KRA_LDIF_RECORD;
}
ldif_record = record.iterator();
// Process each line of the record:
// * If LDIF Record Type for this line is 'valid'
- // * If DRMTOOL Configuration File Parameter is 'true'
+ // * If KRATOOL Configuration File Parameter is 'true'
// * Process this data
- // * Else If DRMTOOL Configuration File Parameter is 'false'
+ // * Else If KRATOOL Configuration File Parameter is 'false'
// * Pass through this data unchanged
// * Else If LDIF Record Type for this line is 'invalid'
// * Log error and leave method returning 'false'
@@ -4184,40 +4184,40 @@ public class DRMTool {
line = ldif_record.next();
- if (line.startsWith(DRM_LDIF_CN)) {
+ if (line.startsWith(KRA_LDIF_CN)) {
output = output_cn(record_type, line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_DATE_OF_MODIFY)) {
+ } else if (line.startsWith(KRA_LDIF_DATE_OF_MODIFY)) {
output = output_date_of_modify(record_type, line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_DN)) {
+ } else if (line.startsWith(KRA_LDIF_DN)) {
output = output_dn(record_type, line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_EXTDATA_KEY_RECORD)) {
+ } else if (line.startsWith(KRA_LDIF_EXTDATA_KEY_RECORD)) {
output = output_extdata_key_record(record_type,
line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_EXTDATA_REQUEST_ID)) {
+ } else if (line.startsWith(KRA_LDIF_EXTDATA_REQUEST_ID)) {
output = output_extdata_request_id(record_type,
line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_EXTDATA_REQUEST_NOTES)) {
+ } else if (line.startsWith(KRA_LDIF_EXTDATA_REQUEST_NOTES)) {
output = output_extdata_request_notes(record_type,
line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_EXTDATA_REQUEST_TYPE)) {
+ } else if (line.startsWith(KRA_LDIF_EXTDATA_REQUEST_TYPE)) {
// if one is not already present,
// compose and write out the missing
// 'extdata_requestnotes' line
@@ -4233,31 +4233,31 @@ public class DRMTool {
// 'extdata-requesttype' line UNCHANGED
// so that it is ALWAYS written
output = line;
- } else if (line.startsWith(DRM_LDIF_EXTDATA_SERIAL_NUMBER)) {
+ } else if (line.startsWith(KRA_LDIF_EXTDATA_SERIAL_NUMBER)) {
output = output_extdata_serial_number(record_type,
line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_PRIVATE_KEY_DATA)) {
+ } else if (line.startsWith(KRA_LDIF_PRIVATE_KEY_DATA)) {
output = output_private_key_data(record_type,
line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_REQUEST_ID)) {
+ } else if (line.startsWith(KRA_LDIF_REQUEST_ID)) {
output = output_request_id(record_type, line);
if (output == null) {
return FAILURE;
}
- } else if (line.startsWith(DRM_LDIF_SERIAL_NO)) {
+ } else if (line.startsWith(KRA_LDIF_SERIAL_NO)) {
output = output_serial_no(record_type, line);
if (output == null) {
return FAILURE;
}
} else if (previous_line != null &&
previous_line.startsWith(
- DRM_LDIF_EXTDATA_AUTH_TOKEN_USER)) {
+ KRA_LDIF_EXTDATA_AUTH_TOKEN_USER)) {
output = output_extdata_auth_token_user(record_type,
line);
if (output == null) {
@@ -4265,7 +4265,7 @@ public class DRMTool {
}
} else if (previous_line != null &&
previous_line.startsWith(
- DRM_LDIF_EXTDATA_AUTH_TOKEN_USER_DN)) {
+ KRA_LDIF_EXTDATA_AUTH_TOKEN_USER_DN)) {
output = output_extdata_auth_token_user_dn(record_type,
line);
if (output == null) {
@@ -4318,17 +4318,17 @@ public class DRMTool {
}
/**************************************/
- /* DRMTOOL Config File Parser Methods */
+ /* KRATOOL Config File Parser Methods */
/**************************************/
/**
- * This method performs the actual parsing of the DRMTOOL config file
- * and initializes how the DRM Record Fields should be processed.
+ * This method performs the actual parsing of the KRATOOL config file
+ * and initializes how the KRA Record Fields should be processed.
* <P>
*
- * @return true if the DRMTOOL config file is successfully processed
+ * @return true if the KRATOOL config file is successfully processed
*/
- private static boolean process_drmtool_config_file() {
+ private static boolean process_kratool_config_file() {
BufferedReader reader = null;
String line = null;
String name_value_pair[] = null;
@@ -4336,18 +4336,18 @@ public class DRMTool {
Boolean value = null;
// Process each line containing a name/value pair
- // in the DRMTOOL config file
+ // in the KRATOOL config file
try {
- // Open DRMTOOL config file for reading
+ // Open KRATOOL config file for reading
reader = new BufferedReader(
- new FileReader(mDrmtoolCfgFilename));
+ new FileReader(mKratoolCfgFilename));
// Create a hashtable for relevant name/value pairs
- drmtoolCfg = new Hashtable<String, Boolean>();
+ kratoolCfg = new Hashtable<String, Boolean>();
- System.out.print("PROCESSING DRMTOOL CONFIG FILE: ");
+ System.out.print("PROCESSING KRATOOL CONFIG FILE: ");
while ((line = reader.readLine()) != null) {
- if (line.startsWith(DRMTOOL_CFG_PREFIX)) {
+ if (line.startsWith(KRATOOL_CFG_PREFIX)) {
// obtain "name=value" pair
name_value_pair = line.split(EQUAL_SIGN);
@@ -4361,64 +4361,64 @@ public class DRMTool {
value = Boolean.FALSE;
}
- // store relevant DRM LDIF fields for processing
- if (name.equals(DRMTOOL_CFG_ENROLLMENT_CN)
- || name.equals(DRMTOOL_CFG_ENROLLMENT_DATE_OF_MODIFY)
- || name.equals(DRMTOOL_CFG_ENROLLMENT_DN)
- || name.equals(DRMTOOL_CFG_ENROLLMENT_EXTDATA_KEY_RECORD)
- || name.equals(DRMTOOL_CFG_ENROLLMENT_EXTDATA_REQUEST_NOTES)
- || name.equals(DRMTOOL_CFG_ENROLLMENT_REQUEST_ID)
- || name.equals(DRMTOOL_CFG_CA_KEY_RECORD_CN)
- || name.equals(DRMTOOL_CFG_CA_KEY_RECORD_DATE_OF_MODIFY)
- || name.equals(DRMTOOL_CFG_CA_KEY_RECORD_DN)
- || name.equals(DRMTOOL_CFG_CA_KEY_RECORD_PRIVATE_KEY_DATA)
- || name.equals(DRMTOOL_CFG_CA_KEY_RECORD_SERIAL_NO)
- || name.equals(DRMTOOL_CFG_RECOVERY_CN)
- || name.equals(DRMTOOL_CFG_RECOVERY_DATE_OF_MODIFY)
- || name.equals(DRMTOOL_CFG_RECOVERY_DN)
- || name.equals(DRMTOOL_CFG_RECOVERY_EXTDATA_REQUEST_ID)
- || name.equals(DRMTOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES)
- || name.equals(DRMTOOL_CFG_RECOVERY_EXTDATA_SERIAL_NUMBER)
- || name.equals(DRMTOOL_CFG_RECOVERY_REQUEST_ID)
- || name.equals(DRMTOOL_CFG_TPS_KEY_RECORD_CN)
- || name.equals(DRMTOOL_CFG_TPS_KEY_RECORD_DATE_OF_MODIFY)
- || name.equals(DRMTOOL_CFG_TPS_KEY_RECORD_DN)
- || name.equals(DRMTOOL_CFG_TPS_KEY_RECORD_PRIVATE_KEY_DATA)
- || name.equals(DRMTOOL_CFG_TPS_KEY_RECORD_SERIAL_NO)
- || name.equals(DRMTOOL_CFG_KEYGEN_CN)
- || name.equals(DRMTOOL_CFG_KEYGEN_DATE_OF_MODIFY)
- || name.equals(DRMTOOL_CFG_KEYGEN_DN)
- || name.equals(DRMTOOL_CFG_KEYGEN_EXTDATA_KEY_RECORD)
- || name.equals(DRMTOOL_CFG_KEYGEN_EXTDATA_REQUEST_ID)
- || name.equals(DRMTOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES)
- || name.equals(DRMTOOL_CFG_KEYGEN_REQUEST_ID)) {
- drmtoolCfg.put(name, value);
+ // store relevant KRA LDIF fields for processing
+ if (name.equals(KRATOOL_CFG_ENROLLMENT_CN)
+ || name.equals(KRATOOL_CFG_ENROLLMENT_DATE_OF_MODIFY)
+ || name.equals(KRATOOL_CFG_ENROLLMENT_DN)
+ || name.equals(KRATOOL_CFG_ENROLLMENT_EXTDATA_KEY_RECORD)
+ || name.equals(KRATOOL_CFG_ENROLLMENT_EXTDATA_REQUEST_NOTES)
+ || name.equals(KRATOOL_CFG_ENROLLMENT_REQUEST_ID)
+ || name.equals(KRATOOL_CFG_CA_KEY_RECORD_CN)
+ || name.equals(KRATOOL_CFG_CA_KEY_RECORD_DATE_OF_MODIFY)
+ || name.equals(KRATOOL_CFG_CA_KEY_RECORD_DN)
+ || name.equals(KRATOOL_CFG_CA_KEY_RECORD_PRIVATE_KEY_DATA)
+ || name.equals(KRATOOL_CFG_CA_KEY_RECORD_SERIAL_NO)
+ || name.equals(KRATOOL_CFG_RECOVERY_CN)
+ || name.equals(KRATOOL_CFG_RECOVERY_DATE_OF_MODIFY)
+ || name.equals(KRATOOL_CFG_RECOVERY_DN)
+ || name.equals(KRATOOL_CFG_RECOVERY_EXTDATA_REQUEST_ID)
+ || name.equals(KRATOOL_CFG_RECOVERY_EXTDATA_REQUEST_NOTES)
+ || name.equals(KRATOOL_CFG_RECOVERY_EXTDATA_SERIAL_NUMBER)
+ || name.equals(KRATOOL_CFG_RECOVERY_REQUEST_ID)
+ || name.equals(KRATOOL_CFG_TPS_KEY_RECORD_CN)
+ || name.equals(KRATOOL_CFG_TPS_KEY_RECORD_DATE_OF_MODIFY)
+ || name.equals(KRATOOL_CFG_TPS_KEY_RECORD_DN)
+ || name.equals(KRATOOL_CFG_TPS_KEY_RECORD_PRIVATE_KEY_DATA)
+ || name.equals(KRATOOL_CFG_TPS_KEY_RECORD_SERIAL_NO)
+ || name.equals(KRATOOL_CFG_KEYGEN_CN)
+ || name.equals(KRATOOL_CFG_KEYGEN_DATE_OF_MODIFY)
+ || name.equals(KRATOOL_CFG_KEYGEN_DN)
+ || name.equals(KRATOOL_CFG_KEYGEN_EXTDATA_KEY_RECORD)
+ || name.equals(KRATOOL_CFG_KEYGEN_EXTDATA_REQUEST_ID)
+ || name.equals(KRATOOL_CFG_KEYGEN_EXTDATA_REQUEST_NOTES)
+ || name.equals(KRATOOL_CFG_KEYGEN_REQUEST_ID)) {
+ kratoolCfg.put(name, value);
System.out.print(".");
}
}
}
System.out.println(" FINISHED." + NEWLINE);
- } catch (FileNotFoundException exDrmtoolCfgFileNotFound) {
- log("ERROR: No DRMTOOL config file named '"
- + mDrmtoolCfgFilename
+ } catch (FileNotFoundException exKratoolCfgFileNotFound) {
+ log("ERROR: No KRATOOL config file named '"
+ + mKratoolCfgFilename
+ "' exists! FileNotFoundException: '"
- + exDrmtoolCfgFileNotFound.toString()
+ + exKratoolCfgFileNotFound.toString()
+ "'"
+ NEWLINE, true);
return FAILURE;
- } catch (IOException exDrmtoolCfgIO) {
+ } catch (IOException exKratoolCfgIO) {
log("ERROR: line='"
+ line
+ "' IOException: '"
- + exDrmtoolCfgIO.toString()
+ + exKratoolCfgIO.toString()
+ "'"
+ NEWLINE, true);
return FAILURE;
- } catch (PatternSyntaxException exDrmtoolCfgNameValuePattern) {
+ } catch (PatternSyntaxException exKratoolCfgNameValuePattern) {
log("ERROR: line='"
+ line
+ "' PatternSyntaxException: '"
- + exDrmtoolCfgNameValuePattern.toString()
+ + exKratoolCfgNameValuePattern.toString()
+ "'"
+ NEWLINE, true);
return FAILURE;
@@ -4436,20 +4436,20 @@ public class DRMTool {
}
/************/
- /* DRM Tool */
+ /* KRA Tool */
/************/
/**
- * The main DRMTool method.
+ * The main KRATool method.
* <P>
*
- * @param args DRMTool options
+ * @param args KRATool options
*/
public static void main(String[] args) {
// Variables
String append_id_offset = null;
String remove_id_offset = null;
- String process_drm_naming_context_fields = null;
+ String process_kra_naming_context_fields = null;
String process_requests_and_key_records_only = null;
String use_PKI_security_database_pwdfile = null;
File cfgFile = null;
@@ -4494,8 +4494,8 @@ public class DRMTool {
// Process command-line arguments
for (int i = 0; i < args.length; i += 2) {
- if (args[i].equals(DRMTOOL_CFG_FILE)) {
- mDrmtoolCfgFilename = args[i + 1];
+ if (args[i].equals(KRATOOL_CFG_FILE)) {
+ mKratoolCfgFilename = args[i + 1];
mMandatoryNameValuePairs++;
} else if (args[i].equals(SOURCE_LDIF_FILE)) {
mSourceLdifFilename = args[i + 1];
@@ -4527,12 +4527,12 @@ public class DRMTool {
} else if (args[i].equals(REMOVE_ID_OFFSET)) {
remove_id_offset = args[i + 1];
mRemoveIdOffsetNameValuePairs++;
- } else if (args[i].equals(SOURCE_DRM_NAMING_CONTEXT)) {
- mSourceDrmNamingContext = args[i + 1];
- mDrmNamingContextNameValuePairs++;
- } else if (args[i].equals(TARGET_DRM_NAMING_CONTEXT)) {
- mTargetDrmNamingContext = args[i + 1];
- mDrmNamingContextNameValuePairs++;
+ } else if (args[i].equals(SOURCE_KRA_NAMING_CONTEXT)) {
+ mSourceKraNamingContext = args[i + 1];
+ mKraNamingContextNameValuePairs++;
+ } else if (args[i].equals(TARGET_KRA_NAMING_CONTEXT)) {
+ mTargetKraNamingContext = args[i + 1];
+ mKraNamingContextNameValuePairs++;
} else if (args[i].equals(PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY)) {
mProcessRequestsAndKeyRecordsOnlyFlag = true;
i -= 1;
@@ -4549,8 +4549,8 @@ public class DRMTool {
// Verify that correct number of valid mandatory
// arguments were submitted to the program
if (mMandatoryNameValuePairs != MANDATORY_NAME_VALUE_PAIRS ||
- mDrmtoolCfgFilename == null ||
- mDrmtoolCfgFilename.length() == 0 ||
+ mKratoolCfgFilename == null ||
+ mKratoolCfgFilename.length() == 0 ||
mSourceLdifFilename == null ||
mSourceLdifFilename.length() == 0 ||
mTargetLdifFilename == null ||
@@ -4562,13 +4562,13 @@ public class DRMTool {
printUsage();
System.exit(0);
} else {
- // Check for a valid DRMTOOL config file
- cfgFile = new File(mDrmtoolCfgFilename);
+ // Check for a valid KRATOOL config file
+ cfgFile = new File(mKratoolCfgFilename);
if (!cfgFile.exists() ||
!cfgFile.isFile() ||
(cfgFile.length() == 0)) {
System.err.println("ERROR: '"
- + mDrmtoolCfgFilename
+ + mKratoolCfgFilename
+ "' does NOT exist, is NOT a file, "
+ "or is empty!"
+ NEWLINE);
@@ -4811,7 +4811,7 @@ public class DRMTool {
mSourcePKISecurityDatabasePwdfileMessage = SPACE
+ PLUS
+ SPACE
- + DRM_LDIF_USED_PWDFILE_MESSAGE;
+ + KRA_LDIF_USED_PWDFILE_MESSAGE;
// Mark the 'Password File' flag true
mPwdfileFlag = true;
@@ -4832,50 +4832,50 @@ public class DRMTool {
mSourcePKISecurityDatabasePwdfileMessage = "";
}
- // Check to see that if the OPTIONAL 'DRM Naming Context' command-line
+ // Check to see that if the OPTIONAL 'KRA Naming Context' command-line
// options were specified, that they are all present and accounted for
- if (mDrmNamingContextNameValuePairs > 0) {
- if (mDrmNamingContextNameValuePairs !=
+ if (mKraNamingContextNameValuePairs > 0) {
+ if (mKraNamingContextNameValuePairs !=
NAMING_CONTEXT_NAME_VALUE_PAIRS ||
- mSourceDrmNamingContext == null ||
- mSourceDrmNamingContext.length() == 0 ||
- mTargetDrmNamingContext == null ||
- mTargetDrmNamingContext.length() == 0) {
- System.err.println("ERROR: Both 'source DRM naming context' "
- + "and 'target DRM naming context' "
+ mSourceKraNamingContext == null ||
+ mSourceKraNamingContext.length() == 0 ||
+ mTargetKraNamingContext == null ||
+ mTargetKraNamingContext.length() == 0) {
+ System.err.println("ERROR: Both 'source KRA naming context' "
+ + "and 'target KRA naming context' "
+ "options MUST be specified!"
+ NEWLINE);
printUsage();
System.exit(0);
} else {
- process_drm_naming_context_fields = SPACE
- + SOURCE_DRM_NAMING_CONTEXT
+ process_kra_naming_context_fields = SPACE
+ + SOURCE_KRA_NAMING_CONTEXT
+ SPACE
+ TIC
- + mSourceDrmNamingContext
+ + mSourceKraNamingContext
+ TIC
+ SPACE
- + TARGET_DRM_NAMING_CONTEXT
+ + TARGET_KRA_NAMING_CONTEXT
+ SPACE
+ TIC
- + mTargetDrmNamingContext
+ + mTargetKraNamingContext
+ TIC;
- mDrmNamingContextMessage = SPACE
+ mKraNamingContextMessage = SPACE
+ PLUS
+ SPACE
- + DRM_LDIF_SOURCE_NAME_CONTEXT_MESSAGE
- + mSourceDrmNamingContext
- + DRM_LDIF_TARGET_NAME_CONTEXT_MESSAGE
- + mTargetDrmNamingContext
+ + KRA_LDIF_SOURCE_NAME_CONTEXT_MESSAGE
+ + mSourceKraNamingContext
+ + KRA_LDIF_TARGET_NAME_CONTEXT_MESSAGE
+ + mTargetKraNamingContext
+ TIC;
- // Mark the 'DRM Naming Contexts' flag true
- mDrmNamingContextsFlag = true;
+ // Mark the 'KRA Naming Contexts' flag true
+ mKraNamingContextsFlag = true;
}
} else {
- process_drm_naming_context_fields = "";
- mDrmNamingContextMessage = "";
+ process_kra_naming_context_fields = "";
+ mKraNamingContextMessage = "";
}
// Check for OPTIONAL "Process Requests and Key Records ONLY" option
@@ -4883,7 +4883,7 @@ public class DRMTool {
process_requests_and_key_records_only = SPACE
+ PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY;
mProcessRequestsAndKeyRecordsOnlyMessage = SPACE + PLUS + SPACE +
- DRM_LDIF_PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY_MESSAGE;
+ KRA_LDIF_PROCESS_REQUESTS_AND_KEY_RECORDS_ONLY_MESSAGE;
} else {
process_requests_and_key_records_only = "";
mProcessRequestsAndKeyRecordsOnlyMessage = "";
@@ -4895,9 +4895,9 @@ public class DRMTool {
// Begin logging progress . . .
if (mRewrapFlag && mAppendIdOffsetFlag) {
log("BEGIN \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -4915,15 +4915,15 @@ public class DRMTool {
+ use_PKI_security_database_pwdfile
+ APPEND_ID_OFFSET + SPACE
+ append_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\" . . ."
+ NEWLINE, true);
} else if (mRewrapFlag && mRemoveIdOffsetFlag) {
log("BEGIN \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -4941,15 +4941,15 @@ public class DRMTool {
+ use_PKI_security_database_pwdfile
+ REMOVE_ID_OFFSET + SPACE
+ remove_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\" . . ."
+ NEWLINE, true);
} else if (mRewrapFlag) {
log("BEGIN \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -4965,15 +4965,15 @@ public class DRMTool {
+ TARGET_STORAGE_CERTIFICATE_FILE + SPACE
+ mTargetStorageCertificateFilename
+ use_PKI_security_database_pwdfile
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\" . . ."
+ NEWLINE, true);
} else if (mAppendIdOffsetFlag) {
log("BEGIN \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -4982,15 +4982,15 @@ public class DRMTool {
+ mLogFilename + SPACE
+ APPEND_ID_OFFSET + SPACE
+ append_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\" . . ."
+ NEWLINE, true);
} else if (mRemoveIdOffsetFlag) {
log("BEGIN \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -4999,19 +4999,19 @@ public class DRMTool {
+ mLogFilename + SPACE
+ REMOVE_ID_OFFSET + SPACE
+ remove_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\" . . ."
+ NEWLINE, true);
}
- // Process the DRMTOOL config file
- success = process_drmtool_config_file();
+ // Process the KRATOOL config file
+ success = process_kratool_config_file();
if (!success) {
- log("FAILED processing drmtool config file!"
+ log("FAILED processing kratool config file!"
+ NEWLINE, true);
} else {
- log("SUCCESSFULLY processed drmtool config file!"
+ log("SUCCESSFULLY processed kratool config file!"
+ NEWLINE, true);
// Convert the source LDIF file to a target LDIF file
@@ -5029,9 +5029,9 @@ public class DRMTool {
// Finish logging progress
if (mRewrapFlag && mAppendIdOffsetFlag) {
log("FINISHED \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -5049,15 +5049,15 @@ public class DRMTool {
+ use_PKI_security_database_pwdfile
+ APPEND_ID_OFFSET + SPACE
+ append_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\"."
+ NEWLINE, true);
} else if (mRewrapFlag && mRemoveIdOffsetFlag) {
log("FINISHED \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -5075,15 +5075,15 @@ public class DRMTool {
+ use_PKI_security_database_pwdfile
+ REMOVE_ID_OFFSET + SPACE
+ remove_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\"."
+ NEWLINE, true);
} else if (mRewrapFlag) {
log("FINISHED \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -5099,15 +5099,15 @@ public class DRMTool {
+ TARGET_STORAGE_CERTIFICATE_FILE + SPACE
+ mTargetStorageCertificateFilename
+ use_PKI_security_database_pwdfile
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\"."
+ NEWLINE, true);
} else if (mAppendIdOffsetFlag) {
log("FINISHED \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -5116,15 +5116,15 @@ public class DRMTool {
+ mLogFilename + SPACE
+ APPEND_ID_OFFSET + SPACE
+ append_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\"."
+ NEWLINE, true);
} else if (mRemoveIdOffsetFlag) {
log("FINISHED \""
- + DRM_TOOL + SPACE
- + DRMTOOL_CFG_FILE + SPACE
- + mDrmtoolCfgFilename + SPACE
+ + KRA_TOOL + SPACE
+ + KRATOOL_CFG_FILE + SPACE
+ + mKratoolCfgFilename + SPACE
+ SOURCE_LDIF_FILE + SPACE
+ mSourceLdifFilename + SPACE
+ TARGET_LDIF_FILE + SPACE
@@ -5133,7 +5133,7 @@ public class DRMTool {
+ mLogFilename + SPACE
+ REMOVE_ID_OFFSET + SPACE
+ remove_id_offset
- + process_drm_naming_context_fields
+ + process_kra_naming_context_fields
+ process_requests_and_key_records_only
+ "\"."
+ NEWLINE, true);
diff --git a/base/java-tools/templates/CMakeLists.txt b/base/java-tools/templates/CMakeLists.txt
index b7c6e891c..1c422f4ab 100644
--- a/base/java-tools/templates/CMakeLists.txt
+++ b/base/java-tools/templates/CMakeLists.txt
@@ -10,12 +10,12 @@ set(PKI_COMMANDS
CMCResponse
CMCRevoke
CRMFPopClient
- DRMTool
ExtJoiner
GenExtKeyUsage
GenIssuerAltNameExt
GenSubjectAltNameExt
HttpClient
+ KRATool
OCSPClient
PKCS10Client
PKCS12Export