Tuesday, April 30, 2013

what is a csr file

In public key infrastructure (PKI) systems, a certificate signing request (also CSR or certification request) is a message sent from an applicant to a certificate authority in order to apply for adigital identity certificate. The most common format for CSRs is the PKCS#10 specification and another is the Signed Public Key and Challenge Spkac format generated by some web browsers.

You may display the information contained in csr


openssl req -text -in request.csr



Actually PKCS #12 is the successor to Microsoft's "PFX".[6] But confusingly the terms "PKCS #12 file" and "PFX file" are sometimes used interchangeably.[4] [5] [7]
Microsoft's "PFX" has received heavy criticism of being one of the most complex cryptographic protocols.[7]

Many different file types are produced and consumed when creating an SSL certificate.
  • .csr file is a certificate signing request which initiates your certificate request with a certificate provider and contains administrative information about your organization.
  • .key file is the private key used for your site’s SSL-enabled requests.
  • .pem and .crt extensions are often used interchangeably and are both base64 ASCII encoded files. The technical difference is that .pem files contain both the certificate and key whereas a .crt file only contains the certificate. In reality this distinction is often ignored.
  • .cer - certificate stored in the X.509 standard format. This certificate contains information about the certificate's owner... along with public and private keys.
    .pvk - files are used to store private keys for code signing. You can also create a certificate based on .pvk private key file.
    .pfx - stands for personal exchange format. It is used to exchange public and private objects in a single file. A pfx file can be created from .cer file. Can also be used to create a Software Publisher Certificate.

Export private key pem from p12

openssl pkcs12 -nocerts -out private_key.pem -in abc.p12
Export public key pem from p12
openssl pkcs12 -in abc.p12 -out myPublicKey.pem -clcerts -nokeys

KISS - keep it simple or stupid

Design pattern is abused using everywhere now, and KISS is not mentioned recently.


List of software development philosophies

From Wikipedia, the free encyclopedia
This is a list of approaches, styles, and philosophies in software development. It contains also software development processessoftware development methodologies and single practices, principles and laws.

Monday, April 29, 2013

xcode ant build


        Compiling...
failonerror="true">



An XCode build from the command line looks like:
xcodebuild -configuration ${BUILD_TYPE} -target ${TARGET_NAME} -arch ${CPU_ARCHITECTURE} -sdk ${SIMULATOR_OR_IOS_SDK} 
BUILD_TYPE is something like "Release" or "Debug" (those are the defaults, you may have added others to the project)
TARGET_NAME is the name of the target you are building (by default the same name as your project)
CPU_ARCHITECTURE is the CPU you are building for, one of:
i386armv6armv7
Use i386 for simulator builds, and use either armv6 or armv7 for device builds - note that some other devices cannot run armv7 code, so usually when building libraries it's a good idea to build all of these architectures and then glue them together using lipo.
SIMULATOR_OR_IOS_SDK is what you are looking for, it's either iphoneos or iphonesimulator. Those values use the latest version of the SDK that the installed XCode supports, you can get a list of supported SDK's with:
xcodebuild -showsdks
Which returns a list like:
Mac OS X SDKs:
    Current Mac OS                  -sdk 
    Mac OS X 10.6                   -sdk macosx10.6

iOS SDKs:
    iOS 4.2                         -sdk iphoneos4.2

iOS Simulator SDKs:
    Simulator - iOS 3.2             -sdk iphonesimulator3.2
    Simulator - iOS 4.0             -sdk iphonesimulator4.0
    Simulator - iOS 4.1             -sdk iphonesimulator4.1
    Simulator - iOS 4.2             -sdk iphonesimulator4.2
xcodebuild has more flags than that, but those are the ones you'd commonly use after using XCode to set up the build properties. You don't have to use all of them, but it's probably a good idea to be clear about what you are building - otherwise I believe your last settings are used.