04-09-2010
@Corona688
You are right in general but here i have a simple design.Encrypted password stored in a file,decrypted by my script and directly passed to expect script.Its not a robust design but satisfies what i must do now.
@sysgate
Link helps me understand the concept but does not help my situation.I wish to write a simple-to-moderate (complex) script to decrypt the encrypted password.
Requesting everyone to advise on how can this be done.
Regards
Abhi
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Could someone please help me...I have an expect script. There's a need for a log in during the script and a password is required...right now the password is just a variable in the expect script...what would be the best way to put that in an encrypted flat file and have the expect script pull the... (2 Replies)
Discussion started by: cubs0729
2 Replies
2. Shell Programming and Scripting
To perform a black box testing and get users' feedback, we are planning to deploy a script in a common location and ask users to execute the script. However we do not want them to have a look at the script until the testing is done. I know this is against the open source concept, but it will be for... (7 Replies)
Discussion started by: krishmaths
7 Replies
3. Shell Programming and Scripting
Hi,
I have written a shell script in unix for my customer. Now I want to make it only execute and not to read/write. Can anybody help me how to set password protect/encript my script.
Thanks
Suresh (3 Replies)
Discussion started by: suresh3566
3 Replies
4. Shell Programming and Scripting
Hi
I have following problem Im writing a script (in bash ) , where need to be written login & passwd for databas client .
Its need to in following form login passwd@dbhostname .
The problem is so anybody can read it so the passwd & login are visible and thats not very safety .
Can... (8 Replies)
Discussion started by: kvok
8 Replies
5. Shell Programming and Scripting
Hi,
I have run the below script which is connected to db2 v9.5. There is no issue. The only problem is how to encrypt the dbpwd?
#!/bin/ksh
#---- Set Environment
dbalias="dev1db"
dbuser="user1"
dbpwd="password"
#---- Connect to the Database
cd /opt/ibm/db2/V9.5/bin
db2 "connect to... (1 Reply)
Discussion started by: lookinginfo
1 Replies
6. Shell Programming and Scripting
Hi,
I have a SQL which i want to run through a shell script.
query_result=`/home/oracle/product/11.2.0/bin/sqlplus -S uname/pwd@DBNAME <<!
set heading off feedback off trimspool on
set pagesize 0
set linesize 9999
spool $PARAM_PATH/param_name.txt;
Select sysdate from dual;
spool off;... (6 Replies)
Discussion started by: chetan.c
6 Replies
7. Shell Programming and Scripting
Hi All,
I have stored Oracle database passwords in a hidden file - .pass_file.
My shell script reads the hidden file, gets the password and then logs in to the Oracle database and runs some SQL script.
My requirement is:
I need to provide the shell script to be executed by someone else. So,... (1 Reply)
Discussion started by: sunpraveen
1 Replies
8. Shell Programming and Scripting
Hi All,
very good morning all.
I am trying to connect to informatica repository by using shell script.
I have written pmrep connect command in the script file. But i need to provide repository, domain ,username and password to connect. Username and password are hard coded in the script... (8 Replies)
Discussion started by: SekhaReddy
8 Replies
9. Shell Programming and Scripting
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies
10. Shell Programming and Scripting
Hello,
I have the following UNIX shell script which connects to the teradata database and executes the SQL Queries. For this, I am passing database name, username and password. I don't want to reveal my password to anyone. So, is there any way that I can encrypt my password and read the... (2 Replies)
Discussion started by: ronitreddy
2 Replies
LEARN ABOUT DEBIAN
ne_ssl_clicert_read
NE_SSL_CLIENT_CERT(3) neon API reference NE_SSL_CLIENT_CERT(3)
NAME
ne_ssl_clicert_read, ne_ssl_clicert_name, ne_ssl_clicert_encrypted, ne_ssl_clicert_decrypt, ne_ssl_clicert_owner, ne_ssl_clicert_free - SSL
client certificate handling
SYNOPSIS
#include <ne_ssl.h>
ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename);
const char *ne_ssl_clicert_name(const ne_ssl_client_cert *ccert);
int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *ccert);
int ne_ssl_clicert_decrypt(ne_ssl_client_cert *ccert, const char *password);
const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert *ccert);
void ne_ssl_clicert_free(ne_ssl_client_cert *ccert);
DESCRIPTION
The ne_ssl_clicert_read function reads a client certificate from a PKCS#12-formatted file, and returns an ne_ssl_client_cert object. If the
client certificate is encrypted, it must be decrypted before it is used. An ne_ssl_client_cert object holds a client certificate and the
associated private key, not just a certificate; the term "client certificate" will used to refer to this pair.
A client certificate can be in one of two states: encrypted or decrypted. The ne_ssl_clicert_encrypted function will return non-zero if the
client certificate is in the encrypted state. A client certificate object returned by ne_ssl_clicert_read may be initially in either state,
depending on whether the file was encrypted or not.
ne_ssl_clicert_decrypt can be used to decrypt a client certificate using the appropriate password. This function must only be called if the
object is in the encrypted state; if decryption fails, the certificate state does not change, so decryption can be attempted more than once
using different passwords.
A client certificate can be given a "friendly name" when it is created; ne_ssl_clicert_name will return this name (or NULL if no friendly
name was specified). ne_ssl_clicert_name can be used when the client certificate is in either the encrypted or decrypted state, and will
return the same string for the lifetime of the object.
The function ne_ssl_clicert_owner returns the certificate part of the client certificate; it must only be called if the client certificate
is in the decrypted state.
When the client certificate is no longer needed, the ne_ssl_clicert_free function should be used to destroy the object.
RETURN VALUE
ne_ssl_clicert_read returns a client certificate object, or NULL if the file could not be read. ne_ssl_clicert_encrypted returns zero if
the object is in the decrypted state, or non-zero if it is in the encrypted state. ne_ssl_clicert_name returns a NUL-terminated friendly
name string, or NULL. ne_ssl_clicert_owner returns a certificate object.
EXAMPLES
The following code reads a client certificate and decrypts it if necessary, then loads it into an HTTP session.
ne_ssl_client_cert *ccert;
ccert = ne_ssl_clicert_read("/path/to/client.p12");
if (ccert == NULL) {
/* handle error... */
} else if (ne_ssl_clicert_encrypted(ccert)) {
char *password = prompt_for_password();
if (ne_ssl_clicert_decrypt(ccert, password)) {
/* could not decrypt! handle error... */
}
}
ne_ssl_set_clicert(sess, ccert);
SEE ALSO
ne_ssl_cert_read
AUTHOR
Joe Orton <neon@lists.manyfish.co.uk>
Author.
COPYRIGHT
neon 0.29.6 3 May 2011 NE_SSL_CLIENT_CERT(3)