Hi.

To install an extra certificate you'll need ADB access to the phone (enable
remote debugging in settings if you don't have it yet) and the NSS utils.
You can use something like:

----------------------------------------------------------------------------
--------
certutil -d "sql:." -N
Enter a password which will be used to encrypt your keys.
The password should be at least 8 characters long,
and should contain at least one non-alphabetic character.

Enter new password: 
Re-enter password: 
----------------------------------------------------------------------------
--------

Leave an empty password. Then you can use something like

----------------------------------------------------------------------------
--------
#!/bin/bash

for i in addedcerts/*
do
  echo "Adding $i"
  certutil -d sql:. -A -n "$i" -t "C,C,TC" -i $i
done
----------------------------------------------------------------------------
--------
To add the certificates to the database. And then you can use something
like:

----------------------------------------------------------------------------
--------

#!/bin/sh

ROOT_DIR_DB=/data/b2g/mozilla
CERT=cert9.db
KEY=key4.db
PKCS11=pkcs11.txt
DB_DIR=`adb shell "ls -d ${ROOT_DIR_DB}/*.default 2>/dev/null" | sed
"s/default.*$/default/g"`

if [ "${DB_DIR}" = "" ]; then
  echo "Profile directory does not exists. Please start the b2g process at
least once before running this script."
  exit 1
fi

adb shell stop b2g

echo "copying ${CERT}: adb push ./${CERT} ${DB_DIR}/${CERT}"
adb push ./${CERT} ${DB_DIR}/${CERT}
echo "copying ${KEY}: adb push ./${KEY} ${DB_DIR}/${KEY}"
adb push ./${KEY} ${DB_DIR}/${KEY}
echo "copying ${PKCS11}: adb push ./${PKCS11} ${DB_DIR}/${PKCS11}"
adb push ./${PKCS11} ${DB_DIR}/${PKCS11}

adb shell start b2g

echo "Finished." 

----------------------------------------------------------------------------
--------

To push your new database to the device.

If you need any help with the scripts (or if they don't work for you :) )
let me know and I'll try to help you.

Best regards,

Carmen

-----Mensaje original-----
De: [email protected]
[mailto:[email protected]] En nombre de
Stefan Arentz
Enviado el: viernes, 08 de febrero de 2013 15:55
Para: [email protected]
Asunto: [b2g] Installing an extra certificate

I would like to install an extra certificate on my Unagi phone so that I can
use a http/https proxy for debugging and testing. I'm not sure where to
start with this though.

Does anyone have a pointer to more info?

 S.

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to