AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() You should see "Build Successful" message like below. If "Maven\bin" is not in path, please add it. Within "Command Prompt", change directory ("cd") to "auth-client-source-1.5" Navigate to "auth-client-source-1.5" directory. You should now see a directory named "auth-client-source-1.5" there Unzip "auth-client-source-1.5.zip" into a directory. You can use the source code and setup environment if you want it in other IDEs and build environments. Java 1.6.20 or above, Apache Maven 2.2.1 or above, and Eclipse Java IDE installed on your computerto setup environment based on this page. If you are using Linux or other OS, you may make appropriate modification to the instructions below. Follow steps below to setup the client as a development environment. When you download the source distribution using downlink above, you get "auth-client-source-1.5.zip". Sample Java application (both binary and source code zip files) to test Aadhaar authentication can be downloaded from here. ![]() This chapter covers details about downloading and setting up development environment. This application is provided on an "AS-IS" basis and should not be considered as a supported, production strength software. This application is written in Java and demonstrates various features of Aadhaar authentication. During compilation if the "-D XML_SECURITY" flag is set, then the Digital Signature will be created along with Auth Xml.Īs explained in previous chapter, sample Java client with source code is provided to help the community rapidly develop applications that use Aadhaar authentication. On a successful make, you should see the executable file AuthClient. Sample Makefile included in the build for Geoamida and gcc version. Within "Command Prompt", change directory ("cd") to "c-auth-client-source-1.5 You may use any editor tool (Eclipse, emacs or vim) installed on your development machine and setup the environment variable, LD_LIBRARY_PATH in order to find libraries. The below DEFINES values are need to modify before compiling:ĪUA_PRIVATE_CERTIFICATE - Required for Digital SignatureĪuth Xml API documentation is available under the doc folder You should see the following listing.ĭigital Signature Generation requires an additional libraries: Navigate to "c-auth-client-source-1.5" directory. You should now see a directory named "c-auth-client-source-1.5" there Unzip "c-auth-client-source-1.5.zip" into a directory. If you are using Windows or other OS, you may make appropriate modification to the instructions below. These directions are for Linux OS and ARM devices. Please follow steps below to setup the client as a development environment. When you download the source distribution from the link above, you get "c-auth-client-source-1.5.zip". This sample application is written in C for the GeoAmida device and it demonstrates various features of Aadhaar authentication. Sample C application to test Aadhaar authentication can be downloaded from here.Ī sample C client with source code is provided to help the community rapidly develop applications that use Aadhaar authentication. NOTE: This code is contributed by Geodesic team and is available on as-is basis. MessageBox.Show("XML Validation Failed") MessageBox.Show("XML Validate Successfully") Signer.BlockUpdate(msgBytes, 0, msgBytes.Length) īool Flag = signer.VerifySignature(expectedSig) * Calculate the signature and see if it matches */ Var msgBytes = (ObjXmlDocument.InnerXml) * Get the bytes to be signed from the string */ Var expectedSig = Convert.FromBase64String(SignatureValue) Signer.Init(false, objX509Certificate.GetPublicKey()) ISigner signer = SignerUtilities.GetSigner("SHA256withRSA") ObjX509Certificate = objX509CertificateParser.ReadCertificate(ObjX509Certificate2.GetRawCertData()) X509CertificateParser objX509CertificateParser = new X509CertificateParser() Org.Bounc圜509Certificate objX509Certificate X509Certificate2 ObjX509Certificate2 = new X509Certificate2(KeyFilePath, "public") //Initialize the public ket certificate file *-Read and parse the public key as string-*/ SignatureElement.RemoveNamedItem("s") //Remove the signature "s" attribute from XML and get the new XML to validate String SignatureValue = SignatureElement.GetNamedItem("s").InnerXml // Get Signature value XmlAttributeCollection SignatureElement = //Get the all XML attribute ObjXmlDocument.Load(XMLFilePath) //Load the XML XmlDocument ObjXmlDocument = new XmlDocument() String KeyFilePath = "" //Get the public key certificate file String XMLFilePath = "" //Get the XML file This can be verified by using the below public key ![]()
0 Comments
Read More
Leave a Reply. |