incrementing string/hex value from file and write back

2009-08-20 Thread Matthias Güntert
Hello guys I would like to read a hex number from an ASCII file, increment it and write it back. How can this be performed? I have tried several approaches: my file serial.txt contains: 0C -- f = open('serial.txt', 'r') val = f.read() val = val.encode('hex') p

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-10 Thread Matthias Güntert
Hello once again Now I have the extension-patch [0] applied to the M2Crypto SVN branch (revision 704). Creating a root and an subRoot CA certificate now works great including the SKID/AKID extensions. I am also able to verify those created certificates using: $ openssl verify -CAfile rootCA.crt

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-10 Thread Matthias Güntert
Now I have this patch applied to the M2Crypto SVN branch -- http://mail.python.org/mailman/listinfo/python-list

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-05 Thread Matthias Güntert
> M2Crypto has a couple of bugs open related that, with potential > workarounds that I haven't yet deemed polished enough to checkin, but > which might help you out: > > https://bugzilla.osafoundation.org/show_bug.cgi?id=7530 > https://bugzilla.osafoundation.org/show_bug.cgi?id=12151 Thanks, that

M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-04 Thread Matthias Güntert
Hello I am trying to add the extensions "subjectKeyIdentifier" and "authorityKeyIdentifier" to a x509v3 certificate. Regarding rfc5280, section 4.2.1.2 the key identifier is composed of the 160-bit SHA-1 hash of the BIT STRING subjectPublicKey http://tools.ietf.org/html/rfc5280#section-4.2.1.2

Re: M2Crypto: X509.X509_Extension_Stack() throws AssertionError

2009-08-04 Thread Matthias Güntert
> > cert_extension_2 = X509.new_extension("keyUsage", "10100") > > Maybe your OpenSSL is too old. keyUsage needs to be defined in OpenSSL > obj_dat.h file for this to work. I am using OpenSSL version 0.9.8k-fips which is the latest version. I replaced: cert_extension_2 = X509.new_ext

M2Crypto: X509.X509_Extension_Stack() throws AssertionError

2009-08-03 Thread Matthias Güntert
Hello python-list members Why is the following code snippet throwing an AssertionError? Is that behavior a bug within X509.X509_Extension_Stack()? How would you suggest popping every element from the stack? Regards, Matthias Güntert - from

M2Crypto: AttributeError: 'CSR' object has no attribute 'pkey'

2009-08-01 Thread Matthias Güntert
Hello python-guys I am trying to build a python based certificate authority using m2crypto. I am quite new to python and I am asking myself why my code snippets below throw the following Traceback: $ python csr.py ... ... Traceback (most recent call last): F

Re: wired md5 hashing problem

2006-03-26 Thread Matthias Güntert
e mysql module it didn't fit my needs. -- Mit freundlichen Grüßen Matthias Güntert -- http://mail.python.org/mailman/listinfo/python-list

wired md5 hashing problem

2006-03-26 Thread Matthias Güntert
1 of 1 computed checksum did NOT match [EMAIL PROTECTED] > cat backup.tar.bz2.md5 d41d8cd98f00b204e9800998ecf8427e /fileservice/temp/backup.tar.bz2 so the format should be okay, but whats wrong with my piece of code?! Greetings -- Mit freundlichen Grüßen Matthias