当前位置:  编程技术>移动开发
本页文章导读:
    ▪openssl 剪裁        openssl 裁剪 引用自: http://stackoverflow.com/questions/7827836/build-openssl-with-just-rsa-and-aes         Note that some things have dependencies. For example, you cannot build the SSL library without ciphers and digest algorithms becaus.........
    ▪ 便利好用的自定义按钮按下效果        方便好用的自定义按钮按下效果 public static StateListDrawable getClickableDrawable(Context context, Drawable drawable){ ColorDrawable maskDrawable = new ColorDrawable(Color.parseColor("#7de2e2e2"));//EEEEE0 LayerDrawable pressDrawabl.........
    ▪ 自个儿做的一个应用,各位兄弟姐妹,帮小弟顶顶       自己做的一个应用,各位兄弟姐妹,帮小弟顶顶 应用在博客附件中,上架了360手机应用中心 【应用介绍】 女性贴心万年历1.支持中国农历及节日显示且是万年历2.支持显示女性安全周期 .........

[1]openssl 剪裁
    来源: 互联网  发布时间: 2014-02-18
openssl 裁剪

引用自:

http://stackoverflow.com/questions/7827836/build-openssl-with-just-rsa-and-aes

 

 

If you build OpenSSL by running the config or Configure script, you provide no-<cipher> as an argument to exclude the cipher. Run Configure with no options to see the available build options.

The configuration script converts these arguments into options for the preprocessor. Here's a list of nearly everything you can disable at compile time. First is the configuration-script argument, and then the compiler argument it gets converted to.

Ciphers:

no-idea       -DOPENSSL_NO_IDEA
no-aes        -DOPENSSL_NO_AES
no-camellia   -DOPENSSL_NO_CAMELLIA
no-seed       -DOPENSSL_NO_SEED
no-bf         -DOPENSSL_NO_BF
no-cast       -DOPENSSL_NO_CAST
no-des        -DOPENSSL_NO_DES
no-rc2        -DOPENSSL_NO_RC2
no-rc4        -DOPENSSL_NO_RC4
no-rc5        -DOPENSSL_NO_RC5

no-md2        -DOPENSSL_NO_MD2
no-md4        -DOPENSSL_NO_MD4
no-md5        -DOPENSSL_NO_MD5
no-sha        -DOPENSSL_NO_SHA
no-ripemd     -DOPENSSL_NO_RIPEMD
no-mdc2       -DOPENSSL_NO_MDC2

no-rsa        -DOPENSSL_NO_RSA
no-dsa        -DOPENSSL_NO_DSA
no-dh         -DOPENSSL_NO_DH

no-ec         -DOPENSSL_NO_EC
no-ecdsa      -DOPENSSL_NO_ECDSA
no-ecdh       -DOPENSSL_NO_ECDH

Non-cipher functionality:

no-sock       -DOPENSSL_NO_SOCK         No socket code.
no-ssl2       -DOPENSSL_NO_SSL2         No SSLv2.
no-ssl3       -DOPENSSL_NO_SSL3         No SSLv3.
no-err        -DOPENSSL_NO_ERR          No error strings.
no-krb5       -DOPENSSL_NO_KRB5         No Kerberos v5.
no-engine     -DOPENSSL_NO_ENGINE       No dynamic engines.
no-hw         -DOPENSSL_NO_HW           No support for external hardware.

Not documented:

no-tlsext     -DOPENSSL_NO_TLSEXT
no-cms        -DOPENSSL_NO_CMS
no-jpake      -DOPENSSL_NO_JPAKE
no-capieng    -DOPENSSL_NO_CAPIENG

 

 

 

 

Note that some things have dependencies. For example, you cannot build the SSL library without ciphers and digest algorithms because the SSL and TLS protocols demand them. So instead of doingmake all, you want to do make build_crypto so that it only builds libcrypto.a.

Through experimentation, I found (in OpenSSL 0.9.8r) that libcrypto has 2 algorithm dependencies: MD5 for the random-number generator's algorithm (in crypto/rand_lib.c) and SHA-1 for printing certificate hashes (in crypto/asn1/t_x509.c). I'd say these dependencies are oversights by the developers.

This is how I build libcrypto.a with only MD5 and SHA:

./config no-idea no-aes no-camellia no-seed no-bf no-cast no-des no-rc2 no-rc4 no-rc5 \
no-md2 no-md4 no-ripemd no-mdc2 no-rsa no-dsa no-dh no-ec no-ecdsa no-ecdh no-sock \
no-ssl2 no-ssl3 no-err no-krb5 no-engine no-hw
make depend
make build_crypto

I also successfully built it with everything except AES, RSA, SHA, and MD5 as the question asked.

 

 

 

my finally library 1.4M include AES, SHA, and MD5:

./config no-idea no-camellia no-seed no-bf no-cast no-des no-rc2 no-rc4 no-rc5 \

no-md2 no-md4 no-ripemd no-mdc2 no-rsa no-dsa no-dh no-ec no-ecdsa no-ecdh no-sock \

no-ssl2 no-ssl3 no-err no-krb5 no-engine no-hw \

no-cms no-deprecated no-asm no-dso no-ede no-ede3 no-cbc no-cfb no-ofb no-ecb no-base64 \

no-rmd160  no-jpake no-gmp no-psk no-tlsext no-lhash no-stack no-err no-comp


    
[2] 便利好用的自定义按钮按下效果
    来源: 互联网  发布时间: 2014-02-18
方便好用的自定义按钮按下效果
public static StateListDrawable getClickableDrawable(Context context, Drawable drawable){
		ColorDrawable maskDrawable = new ColorDrawable(Color.parseColor("#7de2e2e2"));//EEEEE0
		LayerDrawable pressDrawable = new LayerDrawable(new Drawable[]{drawable, maskDrawable});
		
		return MyView.getBackground(drawable, pressDrawable);
	}

	private static class MyView extends View {

		public MyView(Context context) {
			super(context);
		}

		public static StateListDrawable getBackground(Drawable normal,
				Drawable pressed) {
			StateListDrawable stateListDrawable = new StateListDrawable();
			stateListDrawable.addState(View.PRESSED_ENABLED_STATE_SET, pressed);
			stateListDrawable.addState(View.ENABLED_FOCUSED_STATE_SET, pressed);
			stateListDrawable.addState(View.ENABLED_STATE_SET, normal);
			stateListDrawable.addState(View.FOCUSED_STATE_SET, pressed);
			stateListDrawable.addState(View.EMPTY_STATE_SET, normal);
			return stateListDrawable;
		}
	}

 


    
[3] 自个儿做的一个应用,各位兄弟姐妹,帮小弟顶顶
    来源: 互联网  发布时间: 2014-02-18
自己做的一个应用,各位兄弟姐妹,帮小弟顶顶

应用在博客附件中,上架了360手机应用中心

【应用介绍】

女性贴心万年历
1.支持中国农历及节日显示且是万年历
2.支持显示女性安全周期

1 楼 freezingsky 13 小时前  
还说安全期,太坑爹了。就是安全期把哥给坑了。。。

    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3