Run command "openssl s_client -connect ${SERVER}:${PORT} -cipher "EDH" | grep "Server Temp Key"" found in following article
Monday, March 21, 2022
Vulnerability Check of Logjam Attack
Saturday, October 16, 2021
Enable PWA for React App
Sunday, October 10, 2021
Enable Running iOS Simulator with XCode on Mac M1
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Wednesday, May 26, 2021
Install CMake on Mac
Could be achieved with the following steps:
- Download CMake dmg file from https://cmake.org/download/
- Install CMake with dmg file
- sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
Saturday, May 15, 2021
Deploy React App to Firebase
2. Login to Firebase
firebase login
3. Initiate your project
firebase init
(a) Select "Hosting"
(b) Choose "Use an existing project" (if already created)
(c) Choose the desired project
(d) Enter "build" for public directory
(e) Enter "No" for single-page app
(f) Enter "N" to avoid overwritten index.html
4. Perform "npm run build"
5. Deploy with "firebase deploy"
Note: The above command is recommended to be executed in the React project directory
Reference: https://dzone.com/articles/react-apps-firebase
Saturday, April 17, 2021
Setup Unit Test and Code Coverage for C++ in Linux
Setup Unit Test
- Clone Google Test repo https://github.com/google/googletest
- Checkout latest release tag (Optional)
- Install the gtest library with the following commands:
a. mkdir build
b. cd build
c. cmake ..
d. sudo make install
Setup Code Coverage
- Get lcov source code tar bar from http://ltp.sourceforge.net/coverage/lcov.php
- Extract lcov tar ball
- Execute sudo make install
Implementation
Running Unit Test and Generate Code Coverage Report
Friday, January 8, 2021
Enable CocoaPods on Mac M1
- Duplicate the Terminal application in the Utilities folder.
- Right click on the app and choose Get Info.
- Rename the other version of the app as you like.
- Check the option "open with Rosetta".
- Install Cocoapods with the command "sudo gem install cocoapods"
- Type the command line "gem install ffi" to fix the ffi bundle problem. Now you can do a "pod install" without problem.
Friday, August 7, 2020
Secure Remote Password (SRP)
https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
1. Client sends username
2. Server gets username and sends salt and B
3. Client gets salt and B, sends A (randomized number) and M1 (calculate with salt, B, A and password, SCarol = (B − kgx)(a + ux))
4. Server verifies M1
Thursday, August 6, 2020
ppk to pem
From https://tecadmin.net/convert-ppk-to-pem-using-command/
1. sudo apt-get install putty-tools
2. puttygen server1.ppk -O private-openssh -o server1.pem
Convert to private-public key
https://www.tbs-certificates.co.uk/FAQ/en/putty-ppk-vers-openssl-openssh.html
Wednesday, January 8, 2020
Using CocoaPods in IOS
Wednesday, November 27, 2019
Import SSL certication into Java Keystore
Steps to be performed in Windows desktop:
- Rename "cert.crt" to "cert.cer" in Windows
- Double click "cert.cer" and "Ceritificate" popup window should be displayed
- Click "Certification Path" tab
- Double click intermediate certification, eg. "GeoTrust RSA CA 2018", another "Certificate" popup window should be displayed
- Click "Details" tab
- Click "Copy to File..." button and save the content as "intermediate.cer"
- Click "Certification Path" tab again"
- Double click root certification, eg. "DigiCert", another "Certificate" popup window should be displayed
- Click "Details" tab
- Click "Copy to File..." button and save the content as "root.cer"
- Concatenate "intermediate.cer" and "root.cer" into "allca.cer", eg. with command "cat intermediate.cer root.cer > allca.cer"
- Execute command "openssl pkcs12 -export -in cert.crt -inkey cert.key -out cert.p12 -name {aliasname} -CAfile allca.cer -caname root -chain"
- Append "$JAVA_HOME/bin" to "PATH" of cygwin, eg. "export PATH=$PATH:$JAVA_HOME/bin"
- Execute command "keytool -importkeystore -deststorepass {password} -destkeystore cert.jks -srckeystore cert.p12 -srcstoretype PKCS12 -srcstorepass {password} -alias {aliasname}"
To verify, use command "keytool -list -v -keystore cert.jks -storepass {password}".
Saturday, August 10, 2019
Thursday, August 8, 2019
Terms to be checked after Python article reading
Global Interpreter Lock
https://realpython.com/python-gil/
Thursday, July 18, 2019
Tuesday, July 2, 2019
To avoid overlapping during typing, add following lines into .bashrc
TERM=cygwin
export PS1
export TERM
Install sshpass for cygwin
$ md5sum sshpass-1.06.tar.gz
$ tar xvf sshpass-1.06.tar.gz
$ cd sshpass-1.06
$ ./configure
$ make
$ make install
Wednesday, June 26, 2019
Big Fat Jar Compilation
Monday, June 17, 2019
Check whether changes happen in multiple git repositories
for /f "tokens=*" %%a in ('dir /ad /b') do cd %%a & git status & cd ..
Thanks for the answers in https://stackoverflow.com/questions/24352701/check-status-of-all-git-repositories-at-once