TextString="Unable to create 'T:Spot.tempusers'. Please check that"||CR||"the script can find PGP and that you have enough memory! Exiting!"
CALL Error
END
END
foo=OPEN('tempusers','T:Spot.tempusers','R')
IF ~foo THEN
DO
TextString="Unable to open 'T:Spot.tempusers'. Exiting!"
foo=CLOSE('tempusers')
CALL Error
END
DO UNTIL(EOF('tempusers'))
instring=READLN('tempusers')
IF POS(UPPER(KeyIDString),UPPER(instring))~==0 THEN
DO
'getsubject'
Subject=result
'requestresponse TITLE "PGP encryption script" PROMPT "Would you like to encrypt the msg'||CR||'for '||KeyIDString||' about '||Subject||'?" GADGETS "_Yes|_No" CENTER'
IF rc==1 THEN
DO
foo=CLOSE('tempusers')
SAY "Msg to:'"||KeyIDString||"', subject:'"||Subject||"', encryption=ON."
RETURN 1
END
ELSE
DO
foo=CLOSE('tempusers')
SAY "Msg to:'"||KeyIDString||"', subject:'"||Subject||"', encryption=OFF."
RETURN 0
END
END
END
foo=CLOSE('tempusers')
SAY "Msg to:'"||KeyIDString||"', subject:'"||Subject||"', encryption=OFF."
RETURN 0
/* Here we prepare the msg for encypting. */
EncryptMsg:
IF ~EXISTS("Env:PGPPASS") THEN
DO
CALL GetPassWord
IF ~result THEN
DO
TextString="User aborts encryption. Exiting!"
CALL Error
END
END
NewSubject="*** Subj: "||Subject
foo=OPEN('outfile',"T:Spot.pgptemp_temp","W")
IF ~foo THEN
DO
TextString="Unable to open 'T:Spot.pgptemp_temp'. Exiting!"