w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Update openssl version in the guardianproject/openssl-android
First I don't have any idea of the meaning of the message Reversed (or previously applied) patch detected! Assume -R? and what to answer except y or n. Yeah, that's one of those patch-isms that rates high on the usability scale. When its asking you if you want to reverse it, its asking if you want to remove a previously applied patch from a source file. In my opinion, it should (1) add it if not present, or (2) move on if present. There is no (3) torture the user. If I supply a switch (perhaps -prompt) or run unpatch, then I should be asked 20 questions. Otherwise, just apply the damn patch. Reversed (or previously applied) patch detected! Assume -R? [n] y I believe you should have answered NO here by typing n. It was asking you to remove a previously applied patch.

Categories : Android

Compile Openssl with MinGW on Windows - fatal error: openssl/md4.h: No such file or directory
Find the directory where the included file, openssl/md4.h, is installed and include that directory in the command. For example, if the full path of openssl/md4.h is c:opensslincludeopensslmd4.h, your command would become: g++ -Ic:opensslinclude tst.cpp -lcrypto

Categories : C

OpenSSL in Android
Here are some of the Helpful Links : How to use Open SSL in Android. For AES encryption take a look at javax.crypto package which android supports. javax.crypto supports AES algorithm as well. Here is the link for that javax.crypto in Android. Make sure you do some research before asking question. At least try to present what you have tried and be specific about your problem.

Categories : Android

How to install openssl.so and libssl.so in an android project?
What you need to do is use the PREBUILT_SHARED_LIBRARY directive. In your Android.mk, add the following sections: # Prebuilt libssl include $(CLEAR_VARS) LOCAL_MODULE := ssl LOCAL_SRC_FILES := precompiled/libssl.so include $(PREBUILT_SHARED_LIBRARY) # Prebuilt libcrypto include $(CLEAR_VARS) LOCAL_MODULE := crypto LOCAL_SRC_FILES := precompiled/libcrypto.so include $(PREBUILT_SHARED_LIBRARY) As part the LOCAL_MODULE := security section, add the following: LOCAL_MODULE := security ... LOCAL_SHARED_LIBRARIES= ssl crypto This LOCAL_SHARED_LIBRARIES line will replace the following lines: LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libssl.so LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libcrypto.so Please take a look at the question Calling inner Android.mk file to build prebuilt librarie

Categories : Android

openssl is not recognized in command prompt - Android?
Try this code in your command prompt keytool -exportcert -alias androiddebugkey -keystore "d:.android.keystore" | openssl sha1 -binary | openssl base64 give this before your path c:Program filesGnuWin32>

Categories : Android

OpenSSL + Self Signed Cert = OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Extracted from here So basically all you have to do is this ENV['SSL_CERT_FILE'] = "your certificate path" and I guess all will work You might find this Reference useful : http://mislav.uniqpath.com/2013/07/ruby-openssl/ Who reads the value of ENV['SSL_CERT_FILE']? Hope this help

Categories : Ruby On Rails

openssl as shared library in Android Native Code
Include dirs are set up in compiler flag -I: so, set up LOCAL_CFLAGS variable with appropriate key and header location like this: LOCAL_CFLAGS += $(cf_includes) where cf_includes is defined like cf_includes:= includes/openssl + cf_includes := $(addprefix -Ijni/,$(cf_includes)) In other words you have to defile LOCAL_CFLAGS like this:LOCAL_CFLAGS += -Ijni/includes/openssl Try to replace your android.mk with LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) c_includes := $(LOCAL_PATH) cf_includes:= includes/openssl cf_includes := $(addprefix -Ijni/,$(cf_includes)) export_c_includes := $(c_includes) LOCAL_MODULE := TrialApp LOCAL_SRC_FILES := TrialApp.cpp LOCAL_CFLAGS += $(cf_includes) LOCAL_EXPORT_C_INCLUDES := $(export_c_includes) LOCAL_LDLIBS := -llog LOCAL_LDLIBS += $(LOC

Categories : Android

No Android facet found, issues compiling with Android Studio 0.2
Add an android facet to your module by following below steps. 1) Go To File Menu -> Project Structure, or press (Ctrl+Alt+Shift+S) shortcut to open "Project Structure". 2) Select "Facets" which is under the "Project Settings" tab. (First column) 3) Click on "+" button which is at the top of the Second Column to add new facets. 4) Select "Android" facet from that "Add "menu which will prompt another dialog box to select a module. (Select a module to which you want to apply this facet). 5) Select your module and that's it. :) Hope this will solve your problem.

Categories : Android

Android JNI c++ files compiling
You'll need to start using android-ndk to compile the .c, .cpp files to a .so library object, which you can then use in your android project. Please refer to the Android NDK to get started. http://developer.android.com/tools/sdk/ndk/index.html#GetStarted you can find examples in the NDK download.

Categories : Eclipse

ERROR WHILE COMPILING WITH ANDROID NDK
The error is clear, you are trying to use parameters on sort function that are not matching the available function signature. You should call the sort function with the correct parameters!

Categories : Android

new to android - what is the benefit of compiling with 'ant'?
In basic words you can use ant to compile your Android project and get several apks as output, lets say for different companies. Like build machine. In ant you write all dependences and its easy to manage compilation process. From my experience I used ant to bind Android NDK with SDK but Eclipse can do that pretty well. So If you are not familiar with ant, use Eclipse for Android. It will be enough. Some link to start from

Categories : Java

Android - Processing Build not compiling
I've been experiencing this issue as well, and apparently there are 2 possible causes: Apparently the location of aapt has been changed by a recent version of the SDK tools, v22. I'm not sure if removing that version of the tools would fix it, or if that would be recommended. This thread has some fixes that might work. If this doesn't fix the problem, you may be trying to run the 32 bit aapt on a 64 bit system without the 32 bit runtime installed. In this case the fix from this thread may fix the issue: sudo apt-get --no-install-recommends install ia32-libs-multiarch In my case, only the second of these fixes was necessary. By the way, I should point out that I was building android via Phonegap, so the use case may not match 100%. However, the same problem was occurring on the exact s

Categories : Java

OutOfMemoryError when compiling my android app with gradle
I think I fixed it. I got the solution from this post. i.e: replacing in gradlew: GRADLE_OPTS="$GRADLE_OPTS "-Xdock:name=$APP_NAME" "-Xdock:icon=$APP_HOME/media/gradle.icns"" by GRADLE_OPTS="$GRADLE_OPTS "-Xdock:name=$APP_NAME" "-Xdock:icon=$APP_HOME/media/gradle.icns" "-Xmx1024m" "-Xms256m" "-XX:MaxPermSize=1024m""

Categories : Android

Compiling String as Code during Runtime on Android
You could take a look at dexmaker: https://github.com/crittercism/dexmaker It seems to be an Android friendly equivalent to ASM or cglib; it generates .dex files instead of .class files.

Categories : Java

Maven compiling with wrong version of android
<plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.5.0</version> <extensions>true</extensions> <configuration> <sdk> <platform>17</platform> <!-- since you are dependent on 4.2.2 --> </sdk> <configuration> </plugin> Step by step approach. <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <android.version>2.3.3</android.version> <android.api.level>10</android.api.level> </properties> <dependencies> <de

Categories : Java

Cross-compiling a MPICH library for Android NDK
In Linux, in_port_t is typedefed as uint16_t in netinet/in.h. The only place this typedef is used is in the definition of sockaddr_in. The Android NDK does not define or use in_port_t, but instead uses unsigned short int. To compile code using the Android NDK, either typedef in_port_t or replace it with unsigned short int.

Categories : Android

Flex 4.6 compiler check if compiling for ios or android
The Flash Player AVM2 runtime is a virtual machine which uses a JIT compiler so what you want to do is not possible. However, there are 2 common ways to approach this issue: Compile separately for each deployment target, especially if the embedded, OS-specific support files are large. You can set up your IDE project to contain multiple folders so that compiling for each target is simply opening each folder and compiling the contents. Read Christian Cantrell's Writing multiscreen AIR apps to see how setting up a project for separate deployment targets can be arranged. If the embedded, OS-specific support files are small, or if you only want to manage one project folder, you can direct the runtime to use the appropriate file by determining its target using flash.system.Capabilities: va

Categories : Actionscript

errors while compiling the MuPDF for android platform
You asked this on irc yesterday, and I suggested that you do a complete clean, then rebuild from scratch capturing the logs and post them somewhere. The code as supplied in git builds just fine in android for us. Without more information, no one is going to be able to help you.

Categories : Android

Compiling a C/C++ project that uses external libraries using the Android NDK
When we run ndk-build in the top directory of your project (the parent of the jni directory in your picture), we essentially run gnu make and include jni/Android.mk. In your case, this top jni/Android.mk should only include all child .mk files: include $(call all-subdir-makefiles) The main file is jni/myproject/Android.mk, which refers to the binaries produced by others, like LOCAL_SHARED_LIBRARIES += openssl and so on. Note that the names are not the names of library files, but of the LOCAL_MODULE's that build them. Often, it is easier to use static libraries. For example, you need to load all shared libraries from Java yourself, in the correct dependencies order. main is an informal word here. I just want to say that this is the make file that causes its siblings to do their wor

Categories : Android

DrawerLayout - ClassNotFoundException while compiling with Android Studio and Gradle
This was a little weird, but I could figure it out. I Just replaced the inclusion of DrawerLayout in the layout XML from <DrawerLayout> .... </DrawerLayout> to <android.support.v4.widget.DrawerLayout> ... </android.support.v4.widget.DrawerLayout> And this fixed the issue.

Categories : Android

Makefile needed for compiling the Opus Codec for Android
Here is one, maybe a little outdated (it used opus 0.9.14): https://github.com/haxar/mangler/blob/master/android/jni/Android.mk You're to write some JNI wrappers after getting the library to compile, though...

Categories : Android

Viewpager + Actionbarsherlock not compiling the android-support library
My bet is that ActionBarSherlock is using an older version (it's five months old) of the android-support-library. Replace the android-support-v4.jar i ActionBarSherlock/libs with the one you use in your main project.

Categories : Java

Check API problme when compiling Android (checkapi-current-timestamp)
Look at the dump again. you need to regenerate api/current.txt. You need to run make update-api to regenerate that file. You should be able to build again after that . ****************************** You have tried to change the API from what has been previously approved. To make these errors go away, you have two choices: 1) You can add "@hide" javadoc comments to the methods, etc. listed in the errors above. 2) You can update current.txt by executing the following command: make update-api To submit the revised current.txt to the main Android repository, you will need approval. ******************************

Categories : Android

android.database.sqlite.SQLiteException: no such column : id (code 1) while compiling : s
May this Help you: Replace this line: public static final String KEY_ID = "id"; By public static final String KEY_ID = "_id"; Edit: // change this method public String getName(String s) throws SQLException { // TODO Auto-generated method stub String[] columns = new String[]{KEY_ID,KEY_NAME,KEY_ROLLNO}; Cursor c = ourDatabase.query(DATABASE_TABLE, columns, KEY_ID + "=" + s, null, null, null, null);// change this line in this method if(c!=null) { c.moveToFirst(); String name = c.getString(1); return name; } return null; }

Categories : Android

Android build system. Native library. A lot code errors while compiling
When you build native code in Android build tree (not NDK), you don't have the automagical STL support. You have to add the STL headers and lib manually, e.g. LOCAL_STATIC_LIBRARIES += libstlport_static LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include

Categories : Android

com.android.ddmlib.SyncException: Local path doesn't exist - While compiling app with eclipse
Well finally I make it. there was a program/process that has blockep miapp.apk file, so when I tryed to clean my App it doesn't drop this file. I stop the program/process and delete manually apk file. now its running great.

Categories : Android

Error : android.database.sqlite.SQLiteException; near "student_name" ; syntax error (code 1) ; while compiling : CR
Your CREATE statement is missing a comma after TEXT PRIMARY KEY db.execSQL("CREATE TABLE IF NOT EXISTS " + DATABASE_TABLE + " ( " + KEY_ID + " TEXT PRIMARY KEY , " + KEY_NAME + " TEXT NOT NULL , " + KEY_ROLLNO + " TEXT NOT NULL );" );

Categories : Android

Android gradle project compiling project in a different directory tree
This google group has an answer from Android SDK developer Xavier Ducrohet. https://groups.google.com/forum/#!topic/adt-dev/bPY_Un8BsBY To quote: To depend on a gradle project that's outside of your main project's root folder you can try to do the following: include 'abs' project(':abs').projectDir = new File('/some/path/relative/or/absolute') Note that your app should do a dependency using project(':abs'), since the gradle path is :abs no matter what the on-disk path is.

Categories : Android

Error while compiling C++ kernel module with Android kernel for Nexus 7
To find out the compilation parameters used in gcc (or g++), you should use "make V=1" against the makefile. but the error: error: 'void*' is not a pointer-to-object type looked more like a C++ error, which is inherent in your code (Android kernel does not use C++). This seemed to be solvable by recasting: Error: ‘void*’ is not a pointer-to-object type C++. Error: void is not a pointer-to-object type. etc.

Categories : Android

C++ AES OpenSSL
AES is a block cypher. It takes blocks of 16 bytes, and encrypt them into a block of 16 byets. If you try to use it with data whose length is not a multiple of 16, padding (usually random data) is added to round it up to a multiple of 16 bytes. You need to manage the length of the data yourself. Example: int encryptHelper(const string& msg, ...) { uint32_t msgSize = msg.length(); newMsg.push_back((msgSize >> 0) & 0xFF); newMsg.push_back((msgSize >> 8) & 0xFF); newMsg.push_back((msgSize >> 16) & 0xFF); newMsg.push_back((msgSize >> 24) & 0xFF); string newMsg(reinterpret_cast<const char*>(&msgSize), sizeof(msgSize)); newMsg += msg; return __aesEncrypt(newMsg.c_str(), newMsg.length(), ...); } int decrypt

Categories : C++

How to build OpenSSL for WP8?
here is what you have to do, go to this link and download the VSbuild, now put that into the source files downloaded from the OpenSSL website, the folder structure should look like this: apps bugs certs ..... vsbuild once that is done, open the solution, it should upgrade it to VS12, change the settings to a Windows Phone RT build, to generate DLL's there is no need to build *_lib*, so change the other projects, most changes you need to do are to libeay32, do not compile openssl project, just ignore that, start by building libeay32, and start making changes to the code, as there are some functions we don't have in WinRT, you can either #ifdef them out, or create your own functions, NOTE for rand_win.c change the functions to use rand_s and #ifdef most of the code there is,

Categories : Windows Phone 8

installing openssl on OS X
To prioritize your local copy over the system copy you need to add it to your shell PATH variable export PATH="/usr/local/ssl/bin:$PATH" If you want this to execute every time you start a shell just add it to your .bash_profile in your home directory. However, this is not going to fix your problem because Ruby would need to be recompiled against the new OpenSSL (we'll assume the updated root certificates file that comes with the new OpenSSL would hypothetically fix this issue). I'd recommend installing either rvm or rbenv and rebuilding ruby. Note that both of those tools would prefer you to install openssl via homebrew.

Categories : Osx

Include openssl in app
Py2app should detect a dependency on openssl if there is an import statement for an extension that links with openssl (for example the stdlib SSL support or pyOpenSSL). That said, py2app will not include the copy of openssl from /usr/lib into your application bundle. Files from system locations (such as /usr/lib and /System) are assumed to be operating system files and are never included in bundles created by py2app.

Categories : Python

Can't install OpenSSL 1.0.1e
My guess is that OS X has an older version of openssl in /usr/bin, and Homebrew places it's version in /usr/local/bin Try /usr/local/bin/openssl version Edit: Before you try the above command, run: brew link --force openssl

Categories : Osx

openssl encryption in c++ and php
Your problem is that you are not using CTR mode in the standard way. In init_ctr you are only copying 8 bytes of the provided IV and setting the rest to zero. If instead you use the whole IV, you will get the same result as the PHP code: //don't do this: //memset(state->ivec + 8, 0, 8); //memcpy(state->ivec, iv, 8); //do this: memcpy(state->ivec, iv, AES_BLOCK_SIZE); The lesson is that just because you found some code somewhere, doesn't mean you can copy-n-paste it without understanding what it is doing. This is especially true with crypto code. If you knew even the basics of what a block cipher is and how one works in CTR mode, you would have realized the problem with your code straightaway. Oh, important safety tip: When using CTR mode, never encrypt more than one messa

Categories : PHP

RSAPrivateKey openssl C++ ios
Did you generate the key? In C RSA_new() doesn't generate a key it only allocates the memory for the key. But I don't how it is in objective-C. char szModulus = "1162" ; char *szExp = "827655" ; RSA* rsa1 = RSA_new(); /* added code */ BIGNUMBER* exp = BN_new(); BN_set_word(exp, 17); RSA_generate_key_ex(rsa1, 1024, exp, NULL); /* until here */ FILE *fp; fp = fopen("/Users/ysi/Desktop/privateKey.pem", "wb"); PEM_write_RSAPrivateKey(fp, rsa1, NULL, NULL, 0, 0, NULL).

Categories : C++

OpenSSL 1.0.1 on Heroku
The solution to this problem is to create a custom buildpack. You need to build a version of Ruby linked against the correct version of OpenSSL that will run on Heroku's system. For this, you need to use either a local 64-bit Linux system or a Heroku buildserver. Vulcan has problems building Ruby specifically, so the best way to do this in the absence of an appropriate local machine is to use Heroku push from an empty directory with a source-based buildpack. Then you can extract the binaries from the resulting slug and use them with a much faster binary buildpack. I've posted my buildpack here. It is currently working and provides Ruby 2.0.0 with OpenSSL 1.0.1e.

Categories : Ruby

OpenSSL - LNK 2019
This can be problem with calling conventions. Please check the project setting regarding calling convention. OpenSSL compiles with /Gd option that means function will be of __cdecl calling convention. You can either change your calling convention to /Gd or prefix OpenSSL function signatures which you are using with __cdecl. I believe that this might help. This link explains how to change calling convention. Please confirm if this can help you.

Categories : C++

openssl: how can i get public key from modulus
You can get the public key in a more standardized format using phpseclib, a pure PHP RSA implementation. eg. <?php include('Crypt/RSA.php'); $modulus = 'yEQs2LxSHBZgZCH0rRQQy9kmry8g2tNhQL1B9f5azNz9Ce9pXPgSRjVUo1B9Ggb/FK3jy41wWd2IfS6rse3vBzRsabMj29CVODM/19yZPmwEmjJHCgYd+AA2qweKZanDp4FLsSw/kyV5WoPN16GHEMLmLGkJFNIWtzzH5jV+S80='; $exponent = 'AQAB'; $rsa = new Crypt_RSA(); $modulus = new Math_BigInteger(base64_decode($modulus), 256); $exponent = new Math_BigInteger(base64_decode($exponent), 256); $rsa->loadKey(array('n' => $modulus, 'e' => $exponent)); $rsa->setPublicKey(); echo $rsa->getPublicKey();

Categories : PHP

Getting openssl stream in node.js
I think something like that should solve your problem. var terminal = require('child_process').spawn('bash'); terminal.stdout.on('data', function (data) { console.log('stdout: ' + data); }); terminal.on('exit', function (code) { console.log('child process exited with code ' + code); }); setTimeout(function() { console.log('Sending stdin to terminal'); terminal.stdin.write("openssl s_client -connect 'serveraddress':5000"); terminal.stdin.end(); }, 1000); Edit: Try this for a working example: terminal.stdin.write("ping www.google.de");

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.