Link to home
Start Free TrialLog in
Avatar of FlipTrip
FlipTripFlag for Belgium

asked on

MS Self signed certificate on Mac

Does anyone have an idea of how to install a Microsoft Self signed certificate on Mac OSX Leopard (10.5 onwards)?
I found this on the internet:
Follow these steps to add the certificate using the UNIX interface on Mac OS X:
 
1.Copy the certificate file (zie bijlage) to the root of the Macintosh hard disk drive. Do not rename the file.
2.Start the Terminal program. To do this, click Macintosh HD, click Applications, click Utilities, and then click Terminal.
3.Type “cd /” and then press Enter.
4.Type “sudo certtool i citrixCert.cer d k=/System/Library/Keychains/X509Anchors” (without the quotes) and then press Enter
5.When prompted, enter the password for the local Macintosh account.
6.To verify the certificate was added correctly, type “sudo certtool y k=/System/Library/Keychains/X509Anchors | grep bofimacbvba.local” (without the quotes) and then press Enter. If the certificate was added correctly, you will see two or more lines starting with Common Name that display the name of the server.

When I try this, I receive the following error:
"Last login: Mon Jul  5 10:15:57 on console
iMac-van-Koen-Tengrootenhuysen:~ koentgh$ cd/
-bash: cd/: No such file or directory
iMac-van-Koen-Tengrootenhuysen:~ koentgh$ sudo certtool i citrixCert.cer d k=/System/Library/Keychains/X509Anchors

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
***************************************************************
                         WARNING

The keychain you are accessing, X509Anchors, is no longer
used by Mac OS X as the system root certificate store.
Please read the security man page for information on the
add-trusted-cert command. New system root certificates should
be added to the Admin Trust Settings domain and to the
System keychain in /Library/Keychains.
***************************************************************
***Error reading certificate from file citrixCert.cer. Aborting.
iMac-van-Koen-Tengrootenhuysen:~ koentgh$ "

We are using this certificate with our Citrix Webpage. It works perfectly on all windows machines.

Please help.

Grtz
Avatar of Mac2010
Mac2010
Flag of Netherlands image

-bash: cd/: No such file or directory

There should be a space between cd and /
Does this solve the issue?
All this command does it point your terminal window to the root of your startup volume.
iMac-van-Koen-Tengrootenhuysen:~ koentgh$ sudo certtool i citrixCert.cer d k=/System/Library/Keychains/X509Anchors

Your (mick)name is exposed! ;-)

The command looks OK to me, but I have doubts about the location. Does the certificate have to be added on system level? Or does it need to be added to a user account?

From the certtool man page:
"d      Create a CSR in DER format; default is PEM"

Did you double check your typing? Does the "d" option need to be in your command?
[Moderators, please remove my previous comment. Thanks].

iMac-van-Koen-Tengrootenhuysen:~ koentgh$ sudo certtool i citrixCert.cer d k=/System/Library/Keychains/X509Anchors

Your (nick)name is exposed! ;-)

The command looks OK to me, but I have doubts about the location. Does the certificate have to be added on system level? Or does it need to be added to a user account?

From the certtool man page:
"d      Create a CSR in DER format; default is PEM"

Did you double check your typing? Does the "d" option need to be in your command?

Maybe the certificate/command prompt is at the wrong location/directory when importing it into the Keychain.
Avatar of maximus5328
use Keychain in Applications > Utilities to add the certificate
ASKER CERTIFIED SOLUTION
Avatar of FlipTrip
FlipTrip
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial