Weird "security" bahavior with SSL certificates


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Weird "security" bahavior with SSL certificates
# 1  
Old 01-12-2010
Question Weird "security" bahavior with SSL certificates

Hello,

I have been attempting to automate the addition of SSL certificates to keychains on a MAC using the "security" command. I've noticed two things, 1 of which I don't understand.

1. If I use something like
Code:
"security add-trusted-cert -d -k /System/Library/Keychains/SystemRootCertificates trustRoot "$CERTPATH"

, I get a dialog box to enter the password. Is there anyway I can add the certificate to a keychain (Doesn't matter which as long as it works with Safari) without the password prompt?

2. The strange part - In the above command, if I change the
Code:
/System/Library/Keychains/SystemRootCertificates to $USER/Library/Keychains/login.keychain

, I get the same prompt but even if I do not enter my password and exit from the dialog, the certificate gets added to the keychain (I checked from the GUI). Any idea what is happening?

I would appreciate any help with the above.

Thanks!
-p

Last edited by vbe; 07-14-2010 at 06:47 AM.. Reason: code tags
# 2  
Old 01-15-2010
Try creating one with the -p switch and set a password for it, I think that will not prompt the user.


see this: Mac OS X Manual Page For security(1)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Weird behavior of command "local"

Hi there, I'm running into a very weird situation. Let's forget about the purpose of my initial script please. I noticed the bug whatever I'm trying to do. I'm on an old server running bash 3.1.17. Say we have the following script : foo:~# cat /tmp/test #!/bin/bash f1() { local... (9 Replies)
Discussion started by: chebarbudo
9 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

Commenting out "expr" creates weird behavior

This really puzzles me. The following code gives me the error 'expr: syntax error' when I try to do multi-line comment using here document <<EOF echo "Sum is: `expr $1 + $2`" EOF Even if I explicitly comment out the line containing the expr using "#", the error message would still exist... (3 Replies)
Discussion started by: royalibrahim
3 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

find: "weird" regex behaviour

I have these two files in current dir: oos.txt oos_(copy).txt I execute this find command:find . -regex './oos*.txt'And this outputs only the first file (oos.txt)! :confused: Only if I add another asterisk to the find find . -regex './oos*.*txt' do I also get the second file... (7 Replies)
Discussion started by: courteous
7 Replies

7. UNIX for Dummies Questions & Answers

weird password popup on "admin" mentions

I had a site that sold stock photography and some guys I know set up a shopping cart and gallery system for it. One thing they did was give me an admin page (mysite.net/admin) where I could upload new images and change prices and all that. For that admin page they set a password popup prompt. I... (4 Replies)
Discussion started by: lex0062
4 Replies

8. Shell Programming and Scripting

Shell Script to provide "answers" to SSL Cert Request

Hello, I need assistance with creating a shell script to generate SSL Certificate Requests on remote hosts. Below is my stab at this, but I cannot figure out how to pass the requested arguments into the openssl command correctly. I have a major problem with redirecting the "answers" into the... (2 Replies)
Discussion started by: azvelocat
2 Replies

9. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

10. Shell Programming and Scripting

Weird problem with output from "date '+3600*%H+60*%M+%S' "

Hi, I came across a script a few months ago that allowed you to use the following script to include the current time into your prompt (useful from auditting purposes): # Set Prompt typeset -RZ2 _x1 _x2 _x3 let SECONDS=$(date '+3600*%H+60*%M+%S')... (5 Replies)
Discussion started by: m223464
5 Replies
Login or Register to Ask a Question