m2crypto

Apple iOS MDM开发流程

泄露秘密 提交于 2020-12-24 07:41:55
<div id="cnblogs_post_body" class="blogpost-body"><p>一年前曾参与过中石油的一个移动平台项目,实现了通过MDM对iOS设备进行管理。由于苹果对于mdm这块的接口及开发流程只向几个合作伙伴进行了分享,并没有对具体实现的文档进行公开,所以这方面的资料非常少。现在把实现的过程分享给大家,希望能对大家有所帮助。</p> <h2>MDM介绍</h2> <p>MDM的全称是<span style="text-indent: 30px;">Mobile Device Management,<span style="text-indent: 30px;">是企业IT 向移动互联网过渡的平台技术,帮助企业将IT管理能力从传统的 PC 延伸到移动设备甚至 移动应用APP 。</span></span></p> <p><span style="text-indent: 30px;"><span style="text-indent: 30px;">MDM主要可以实现以下功能:</span></span></p> <p> </p> <ul> <li>保证设备安全:远程锁定设备、远程擦除设备数据等</li> <li>应用分发:非越狱用户可以不通过AppStore下载应用程序</li> <li>设备配置:管理员可以通过远程向iOS设备推送配置文件

On certificates, what type should E-mail addresses be when in subjectAltName

心不动则不痛 提交于 2020-06-12 04:07:48
问题 Little bit of background : I'm building a certificate authority using M2Crypto and Django, so please think twice before voting to close this as off topic! :) My approach is that end-users are identified by e-mail addresses and their self-signed trust-anchors are issued obviously by themselves, but how should I store their 'identity'? I've seen many certificates out there in the wild where the practice has been to store mail addresses as subjectAltName = rfc822:user@domain.test , but googling

On certificates, what type should E-mail addresses be when in subjectAltName

主宰稳场 提交于 2020-06-12 04:05:40
问题 Little bit of background : I'm building a certificate authority using M2Crypto and Django, so please think twice before voting to close this as off topic! :) My approach is that end-users are identified by e-mail addresses and their self-signed trust-anchors are issued obviously by themselves, but how should I store their 'identity'? I've seen many certificates out there in the wild where the practice has been to store mail addresses as subjectAltName = rfc822:user@domain.test , but googling

How to get the signed content from a PKCS7 envelop with M2Crypto?

生来就可爱ヽ(ⅴ<●) 提交于 2020-02-11 08:04:30
问题 I need to get the digest of a PKCS#7 envelop to manually check it. Usually when you want to validate the signature of a pkcs#7 envelop you do that: from M2Crypto import SMIME, X509, BIO sm_obj = SMIME.SMIME() x509 = X509.load_cert(join(PATH, 'QualifiedChain.crt')) sk = X509.X509_Stack() sk.push(x509) sm_obj.set_x509_stack(sk) st = X509.X509_Store() st.load_info(join(PATH, 'QualifiedChain.crt')) sm_obj.set_x509_store(st) # re-wrap signature so that it fits base64 standards cooked_sig = '\n'

How to Install M2crypto on Windows

こ雲淡風輕ζ 提交于 2020-01-28 02:07:14
问题 After installing OpenSSL, downloading the pre-built Swig executable, and ensuring the openssl libraries are located in the default c:\pkg , pip install m2crypto results in: ... C:\Program Files (x86)\gfortran\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Pyth on27\include -IC:\Python27\PC -Ic:\pkg\include -Ic:\users\evbo\appdata\local\tem p\pip_build_evbo\m2crypto\SWIG -c SWIG/_m2crypto_wrap.c -o build\temp.win32-2.7\ Release\swig\_m2crypto_wrap.o -DTHREADING gcc: error: unrecognized command

failed to verify a dsawithSha1 signed message against a DSA public key in python/m2crypto

若如初见. 提交于 2020-01-17 08:06:27
问题 - I'm trying to verify a signed message using a x509 certificate holding a dsa public key. The x509 certificate was provided by an SAP System in PKCS7 encoding and after converting in PEM with openssl I'm able to read the contents (openssl x509 -in sapcert.pem -inform pem -text) It holds a public key in dsaEncryption, showing me the DSA parameters y(pub), p, q and g. Because I did not found a DSA implementation in M2Crypto x509 class, i tried to build the DSA public key by myself. Therefor I

M2Crypto installation

倾然丶 夕夏残阳落幕 提交于 2020-01-17 05:54:08
问题 I am struggling to get my M2Crypto installation to work C:\Python27>python Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from M2Crypto import RSA Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\M2Crypto\__init__.py", line 22, in <module> import __m2crypto ImportError: No module named __m2crypto >>> Not really surprising as there is no _

m2crypto aes-256-cbc not working against encoded openssl files

倾然丶 夕夏残阳落幕 提交于 2020-01-14 03:08:10
问题 $ echo 'this is text' > text.1 $ openssl enc -aes-256-cbc -a -k "thisisapassword" -in text.1 -out text.enc $ openssl enc -d -aes-256-cbc -a -k "thisisapassword" -in text.enc -out text.2 $ cat text.2 this is text I can do this with openssl. Now, how do I do the same in m2crypto. Documentation is lacking this. I looked at the snv test cases, still nothing there. I found one sample, http://passingcuriosity.com/2009/aes-encryption-in-python-with-m2crypto/ (changed to aes_256_cbc), and it will

What is the difference between M2Crypto's set_client_CA_list_from_file() and load_verify_info() and when would you use each?

非 Y 不嫁゛ 提交于 2020-01-05 03:10:46
问题 The M2Crypto library has a few CA-related functions on its SSL.Context object, but the documentation is very unclear as to when you would use certain functions and why. In fact, the docs for almost all of them are, "Load CA certs into the context," so it seems possible that they all do the same thing. There are several examples that use both set_client_CA_list_from_file() and load_verify_info() , but there are also other similar functions like load_client_ca() and load_verify_locations() . I

What is the difference between M2Crypto's set_client_CA_list_from_file() and load_verify_info() and when would you use each?

走远了吗. 提交于 2020-01-05 03:10:14
问题 The M2Crypto library has a few CA-related functions on its SSL.Context object, but the documentation is very unclear as to when you would use certain functions and why. In fact, the docs for almost all of them are, "Load CA certs into the context," so it seems possible that they all do the same thing. There are several examples that use both set_client_CA_list_from_file() and load_verify_info() , but there are also other similar functions like load_client_ca() and load_verify_locations() . I