Progress
Programming
Handbook
RCODE–INFO Handle
The RCODE–INFO handle allows you to read the r-code CRC from an r-code file. You can use this value to build a procedure security table, and then to verify the integrity of your application r-code against it. You can also use this value in a deployment procedure that you run in a secure context to automatically install database schema trigger definitions.
Getting the R-code CRC
To read the r-code CRC from an r-code file, first set the FILE–NAME attribute of the RCODE–INFO handle to the pathname of your r-code file. Then read the value of the CRC–VALUE attribute.
NOTE: The RCODE–INFO handle cannot read the r-code CRC from a session compile. For source (.p) procedures, the CRC–VALUE attribute returns the unknown value (?).Example — Verifying Application R-code Integrity
This example shows how you might provide r-code integrity and security in your application.
- Build the procedure security table, RcodeSecurity, with these fields:
- Construct a text file,
crctable.dat
, that contains a list of the relative pathnames for all the secure procedures called by your application.- Compile and save the r-code for all the secure procedures in your application.
- Run a procedure that contains code like this to build the RcodeSecurity table.
- At each point where you call a secure procedure in your application, insert this code.
Example — Deploying Schema Triggers
The following procedure installs new schema trigger definitions in an existing database. It reads dump files that contain the new data for table and field metaschema trigger records and updates these records with the new trigger procedure names and CRCs.
NOTE: As this example shows, you must use the RECID function rather than the ROWID function to reference metschema table record locations.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |