node.js - creating certificate for android volley and nodejs -


i developing android application can connect multiple node server. connection needs secure need certificates. cant pay certificates. researches, create certificates each server , sign them own root certificate(i need that). pin root certificate android application. can connect multiple server 1 android app. dont know create certificates , how pin android application.

a ca can generate certificate bound ip, not usual. agree in case more appropriate use self-generated certificates. need

1) create ca certificate , ssl certificate

extracted here need openssl

create ca certificate

openssl genrsa -out rootca.key 2048 openssl genrsa -des3 -out rootca.key 2048 openssl req -x509 -new -nodes -key rootca.key -sha256 -days 1024 -out rootca.pem 

this start interactive script ask various bits of information. rootca.pem

create 1 certificate each device

 openssl genrsa -out device.key 2048  openssl req -new -key device.key -out device.csr        openssl x509 -req -in device.csr -ca rootca.pem -cakey rootca.key -cacreateserial -out device.crt -days 500 -sha256 

you’ll asked various questions (country, state/province, etc.) in second step insert in 'common name' ip or name of device. important match real name because browser or android device validate it

2) configure nodejs server use https have no enough knowledge of node.js provide explanation or link, use official documentation. maybe reader edit , provide link

3) add public key , chain of certificate truststore of android application.

extracted here

you need

1) public part of ca certificate

2) create bks keystore , import certificate (only root needed)

3) use keystore in app. create custom apache http client uses keystore configure de ssl connection

the details in link, in community wiki.

for android volley. using android volley self-signed ssl certificate


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -