Displaying keyword search results 1 - 10
Created by freyo on February 06, 2013 21:10:47 Last update: February 06, 2013 21:12:18
I have an old Samung phone to be used as a toy. After restoring back to factory image and power on, I was stuck at the activate service screen. Unfortunately, the four corner magic touch did not work. So I did quite a bit of digging and this is what worked on my Samsung Continuum: Press emergency call button, then at the dialer, press * # 8 3 7 8 6 6 3 3 , press the Home key From the home screen, tap phone icon, Dial * # 2 2 7 4 5 9 2 7 Enter SPC code: ______ displays tap in white box to show virtual keyboard, enter 6 digit code (default: 000000), tap OK Select “Hidden menu Enable”, tap OK From...
Created by Dr. Xi on August 15, 2012 12:05:39 Last update: August 15, 2012 12:05:39
Use OpenSSL's s_client command to fetch a page manually:
$ openssl s_client -connect localhost:443 -state -...Sample session for Google:
$ openssl s_client -connect www.google.com:443 -st...Resource: SSL/TLS Strong Encryption: FAQ
Created by Dr. Xi on May 25, 2012 15:47:34 Last update: May 25, 2012 15:49:33
Steps to configure SSL for Apache HTTPD server on Windows: In Apache2.2/conf/httpd.conf , load mod_ssl and include httpd-ssl.conf :
LoadModule ssl_module modules/mod_ssl.so ...In Apache2.2/conf/extra/httpd-ssl.conf , make sure the paths for the cert files point to the cert and key you want to use:
# Server Certificate: # Point SSLCertificat...Start up Apache. If it fails, use the command line to see what the error is. There won't be any log in error.log if there are errors in the conf files:
C:\Program Files (x86)\Apache Software Foundation\...I corrected the previous error by using the alternative line for SSLSessionCache :
# Inter-Process Session Cache: # Configure ...
Created by Dr. Xi on May 02, 2011 15:59:37 Last update: February 25, 2012 09:16:37
This code snippet gets the default keystore used by the Java keytool and displays the list of aliases along with the key type (certificate or private key).
import java.io.File; import java.io.FileInputSt...The default keystore used by the above code is: $HOME/.keystore .
Created by magnum on September 27, 2011 11:57:49 Last update: October 05, 2011 12:20:00
This procedure sets up an IPSec vpn server on Linux with Preshared Key (PSK) using Openswan . Install Openswan:
# yum install openswanEdit /etc/ipsec.conf . This is about the minimum needed to run IPSec server. Instead of running L2TP on port 1701, I'm running TCP on port 8080 so that I can test the setup with nc later.
# /etc/ipsec.conf - Openswan IPsec configurati...Edit /etc/ipsec.secrets .
# # Preshared key for clients connecting from a...Start IPSec:
# /etc/init.d/ipsec startCheck status:
# ipsec auto --statusMonitor IPSec log:
# less /var/log/secureIf IPSec is running KLIPS, you should see a new nic ( ipsec0 ). There's no ipsec0 if IPSec is running NETKEY.
# ifconfig eth0 Link encap:Ethernet HWadd...
Created by freyo on June 28, 2011 11:11:03 Last update: June 28, 2011 11:11:03
This exception occurs when trying to get a private key:
PrivateKey privateKey = (PrivateKey) keyStore.getK...Stack trace:
Exception in thread "main" java.security.Unrecover...which was caused by giving a wrong private key password. The solution is to correct the key password in your code, or change the password in the keystore to match that in your code:
keytool -keypasswd -alias mykey -keypass oldpasswo...
Created by freyo on May 20, 2011 12:09:24 Last update: May 20, 2011 12:09:24
To convert a private key from PEM to DER:
openssl pkey –in privateKey.pem –inform PEM –out p...To convert a private key from DER to PEM:
openssl pkey –in privateKey.der –inform DER –out p...
Created by freyo on May 17, 2011 12:45:18 Last update: May 17, 2011 13:03:57
This works for JDK1.6 and later. Export the key to a PKCS#12 store, using -importkeystore !
keytool -importkeystore -srckeystore ~/.keystore \...Use openssl to convert the key to PEM (which produces a des3 encrypted key):
openssl pkcs12 -in androidplatform.p12 -out androi...If you don't want DES encryption:
openssl pkcs12 -in androidplatform.p12 -out androi...Convert both private key and cert to PEM:
openssl pkcs12 -in androidplatform.p12 -out androi...
Created by freyo on May 06, 2011 16:07:33 Last update: May 06, 2011 16:08:36
-----BEGIN PRIVATE KEY----- MIIEvAIBADANBgkqhki...Certificate:
-----BEGIN CERTIFICATE----- MIIEqDCCA5CgAwIBAgI...Import the key pair to the debug keystore:
$ cat platform.pem platform.x509.pem >platform-key...
Created by freyo on April 20, 2011 12:26:08 Last update: April 20, 2011 12:26:08
When you create a new key with Java keytool , it wraps the public key in a self signed certificate. You can generate a certificate signing request with the keytool -certreq command. After a certificate authority (CA) signs the certificate request, you can import the certificate received (a .crt file) back into the key store. Instead of using a CA, you can sign the certificate request with another key (with openssl, for example). If the certificate is not signed by a CA, you'll receive an error:
$ keytool -import -alias android-root -file androi...To fix the problem, import the certificate of the signer:
$ keytool -import -trustcacerts -file openssl.crt ...Import the certificate again (alias is the alias of the private key whose certificate was...