[ic] Order route expandable PGP Key

Dan Browning interchange-users@icdevgroup.org
Thu Aug 22 19:42:00 2002


At 05:48 PM 8/22/2002 -0500, you wrote:
>At 04:55 PM 8/22/2002, you wrote:
>>Quoting Nick Hall (NickHall@flashmail.com):
>> > When orders are placed, I need the credit card number encrypted
>> > with a key looked up in a database. I've set the pgp_key in the
>> > order route to try both the scratch and data tags, along with
>> > setting expandable to 1 in the master route. The tmp/pgp.xxxx.err
>> > pgp error file always reports that it can't find the key
>> > "[scratch encryptPGPKey]" or whatever I want it to encrypt
>> > to -- Interchange isn't interpreting the ITL. Note that if I
>> > replace the ITL with one of the actual keys, the credit card
>> > encryption happens properly. I looked through Order.pm and it
>> > looked like the pgp path can't have ITL in it but I didn't see
>> > any reason why the pgp key can't. Has anyone done dynamic pgp/gpg
>> > keys and has some clues? I've tried with IC 4.8.5 and 4.8.6.
>> > Thanks,
>> >
>>
>>This is done with RouteDatabase.
>>
>>     RouteDatabase route
>>     Route main dynamic_routes 1
>>
>>Then in the route table, you would have:
>>
>>code    pgp_key         email
>>main    0x5433445       orders@somevendor.net
>
>I'm not sure if I explained the problem poorly or am just
>misunderstanding Mike's response but my problem is this: for
>one catalog, there are different cases where different pgp keys
>are needed. If the user placing an order is in one class, pgp_key
>0x1234567 needs to be used to encrypt the credit card, but if the
>user is in another class, pgp_key 0x2345678 is used. There are
>many different possible pgp keys so the proper key is looked up
>in a table based on information in the user's session. The
>hangup as far as I can tell is that I cannot get Interchange to
>interpret the ITL in the pgp_key field, even with expandable
>set. Thanks for any help,
>
>Nick

I understood that description better than your last one.  :-)  I don't 
particularly know how to cause interpolation of the key, but you might be 
interested in the [encrypt] tag by Ed LaFrance (you should be able to find 
it somewhere, its been posted to the list).  Said tag can be passed options 
regarding keys, etc.  Good luck,

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies      <dan.browning@kavod.com> |
| (360) 882-7872 x7, 6700 NE 162nd Ave, Suite 210, Vancouver, WA |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
Advice to young men: Be ascetic, and if you can't be ascetic,
then at least be asceptic.