pgp

Please take a look at http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21820017.html

even though it says vb , we are actaully trying to figure out command line pgp..
Sara_j_11Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sara_j_11Author Commented:
basically I am trying to do this:
 pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force
It still asks me the question that prompts me to enter y/n ( are you sure that u want to use this public key y/n)
and then I have to answer y and then it produces the encrypted file for me. But I want to automate that script so that I do not have to go to c: everytime I want to encrypt the file. so I want to bypass that question (y/n). How do I do this? I thoughht the +force would solve the problem...

0
PanoECommented:
echo y| pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force

That should do it!  Also, the "y" can be replaced with whatever key you're trying to simulate.

Good luck,
Pano
0
Sara_j_11Author Commented:
do you mean type the above mentioned:
echo y| pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force

in the command prompt.. I tried that , but it does not work... Also what do you mean by : "y" can be replaced with whatever key you're trying to simulate.
does that mean i have to do:
echo DOH_PGP_KEY | pgp –s c:\test.txt –e DOH_PGP_KEY -z "my passphrase sentence" +force
I tried both , but does not work..



0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

Sara_j_11Author Commented:
it still asks me that question:
WARNING: Because this public key is not certified with a trusted signature , it is not known with high confidence that it actually belongs to DOH_PGP_KEY(email_id)
Are you sure you want to use this public key(y/N)?
At that point if I pick y , it creates the file, but how do i make it accept it by default
0
Sara_j_11Author Commented:
HOW TO MAKE SURE THAT :  the key is signed/certified ?
0
Sara_j_11Author Commented:
ok I did the following and now it works in command line..
There are 2 steps that I followed:
1) You should change trust parametesrparameters for someone's public key (pgp -ke)
2) Than you should sign this public key with yours (pgp -ks)

Now if i go to command prompt(C:\Program Files\Network Associates\PGPcmdln) and type
pgp –s test.txt –e DOH_PGP_KEY -z  "mypassphrase"

But I dont want to go to the command prompt every time to type this , insteas I want to create a batch file that I can double clcik.
I opened notepad and typed
c:
cd C:\Program Files\Network Associates\PGPcmdln
pgp –s test.txt –e DOH_PGP_KEY -z  "mypassphrase"

and saved it as batch.bat . But wehn I click on it it does not create the encrypted file , but it works if i do the same thing in the command prompt manually... Can you please help with this?
0
Sara_j_11Author Commented:
ok I finally got the batch file to work
0
CetusMODCommented:
PAQed with points refunded (500)

CetusMOD
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Security

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.