The initial build process for Gutenprint was smooth - no error what so ever. But when I tried to print - nothing happen. After much reading and Google around, I found the problem was due to dependency issues. This simply means I had to re-build my Gimp and Ghostscript to newer versions (and also I took the opportunity to re-build CUPS). Only after all those re-built I managed to print again. I just wish there is an easier way to resolve dependency in the future.
Thursday, March 29, 2007
Linux Printing with CUPS - sucked into dependency hell
The initial build process for Gutenprint was smooth - no error what so ever. But when I tried to print - nothing happen. After much reading and Google around, I found the problem was due to dependency issues. This simply means I had to re-build my Gimp and Ghostscript to newer versions (and also I took the opportunity to re-build CUPS). Only after all those re-built I managed to print again. I just wish there is an easier way to resolve dependency in the future.
Posted by
E A Faisal
at
14:07
0
comments
Labels: Linux
Monday, March 26, 2007
A Simple Step-By-Step Guide of SSL Key Management With OpenSSL
This is a simplified step by step guide to manage SSL key using OpenSSL. For further information do man openssl.
1. Become a root certificate authority(CA)
- $openssl req -new -x509 -keyout ca.key -out ca.crt -days 3650
- This will request for (-)new self-signed(-x509) root certificate with private key(-keyout) named "ca.key") and certificate file(-out) named "ca.crt" which is certified for 10 years(-days 3650).
2. View the contents of the certificate
- $openssl x509 -in ca.crt -noout -text
- $openssl x509 -in ca.crt -noout -dates
- $openssl x509 -in ca.crt -noout -purpose
3. Create the certificate signing request
- This request is actually generated by those who want their certificate to be signed by root CA
- $openssl req -new -nodes -keyout my.key -out my.csr -days 365
- If paranoid, remove -nodes option to make the private key encrypted and password protected.
4. Signing a certificate
- $openssl ca -out my.crt -in my.csr
- Optionally, remove the human-readable portions of the certificate :
- $openssl x509 -in my.crt -out my-nohuman-readable.crt
5. Deployment of certificates
- The following certificates my.key, my.crt and ca.crt are needed by application using SSL.
- Some applications require both the key and certificate in one file, which can be achived by running:
- $cat server.key server.crt > key-cert.pem
- For applications using SSL/TLS, the Diffie Hellman parameters may be required on the server side. Create the DH (using 2048 bits) by issuing:
- $openssl dhparam -out dh2048.pem 2048
6. Certification Revocation List (CRL)
- $openssl ca -gencrl -crldays 30 -out rootca.crl
7. Renewing and revoking certificates
- Both root certificate and other signed certificates are subjected to expiry.
- If root certificate expires, a new root CA certificate must be created and distributed. All other certificate that it signed must also be re-created and signed.
- For other certificates, those certificates can be renewed by first revoking the old certificate, then re-signed the original request or do another round of request and sign procedure. To revoke a certificate, issue the following command:
- $openssl ca -revoke expire.crt
- Regenerate CRL again if necessary.
Posted by
E A Faisal
at
14:54
0
comments
Labels: Security
Tuesday, March 20, 2007
Wow! del.icio.us
Just open an account at del.icio.us :) It's a rather late entry into social bookmarking. I already formed an initial impression of social bookmarking - it's pretty cool.
You can view my bookmarks at http://del.icio.us/efaisal
Posted by
E A Faisal
at
21:21
0
comments
Labels: Web
Wednesday, March 14, 2007
Posting source code
I not really satisfied the way source code is being displayed. Currently I'm just putting the <pre> tag around the code. No fancy formatting, just plain <pre>. So, is there a better way to format source code? May be use <pre> tag with some cool CSS hacks?
Posted by
E A Faisal
at
15:34
0
comments
Scheduleable Event Loop for asyncore/asynchat
Been a while since I write a blog. Below is the Python code which is quite usable to replace the default asyncore loop. It's based on Sam Rushing code which can be found at http://squirl.nightmare.com/medusa/async_sockets.html
import sys, time, asyncore
map = asyncore.socket_map
class EventLoop:
def __init__(self):
self.events = {}
self.poll = asyncore.poll3
self.__quit = None
def loop(self, timeout=30.0):
while map:
if self.__quit is True: break
now = int(time.time())
for k, v in self.events.iteritems():
if now >= k:
for o in v:
try:
o[0](*o[1][0], **o[1][1])
except:
type, value, tb = sys.exc_info()
parm = str(o[1])
logstr = "Error in Evenloop processing " + \
"scheduled task."
logstr = "Error details: %s: %s" % (type, value)
logstr = "Error details(parm): %s" % parm
logstr = "Error details(tb): %s" % \
tb.tb_frame.f_code
del self.events[k]
self.poll(timeout)
def schedule(self, delta, callback, *args, **kargs):
now = int(time.time())
if self.events.has_key(now + delta) is False:
self.events[now + delta] = []
self.events[now + delta].append((callback, (args, kargs)))
def unschedule(self, callback):
for k, v in self.events.iteritems():
for o in v:
if o[0] is callback:
del self.events[k][v][self.events[k][v].index(o)]
if len(v) == 0:
del self.events[k]
def quit(self):
self.__quit = True
Posted by
E A Faisal
at
11:22
0
comments
Labels: Development, Programming, python
Wednesday, August 16, 2006
Hylafax protocol experimentation ended
I finally wrote a kind of middleware that sits between a web-based procurement system (written in PHP) and Hylafax server. Among other things that the procurement system does is mass faxing to various vendors - in this case up to a few hundred vendors a day.
My initial test went pretty smooth - well, a bit of hiccup though. Few fax machines apparently received the distorted document due to some unknown reasons. I'm still investigating. Apart from that I would say the prototype was a success, able to handle hundreds of documents to fax simultaneously. The decision to do the communication part asynchronously paid off - no noticeable load on the server which runs the middleware.
So anybody interested in integrating your webbased system with Hylafax? :)
Posted by
E A Faisal
at
21:02
0
comments
Wednesday, August 09, 2006
Hylafax protocol: Administrative function
Today while testing bulk faxing, I encountered a failure due to blacklisted number.
Is there a way, or rather a protocol verb which I can use to query the Hylafax server for sending modem command - e.g. to check modem status or to reset modem blacklisted number
Posted by
E A Faisal
at
20:00
0
comments
Tuesday, August 01, 2006
Understanding Hylafax protocol
It's been a while since my last blog post. I've been kept busy a number of things - mainly at work.
OK, so I've learnt one or two things since then. I've managed to build a prototype Hylafax client - and yes - it's making use of asynchronous communication mechanism. The prototype currently able to send a fax job and query the status of a job. The code right now is rather crude. The next course of action is make some administrative query. I just hope I have the spare time for this :)
Posted by
E A Faisal
at
20:05
0
comments
Friday, June 30, 2006
Hylafax protocol prototype update
Basic login mechanism is now working. All I did was to follow the same way any FTP client handles login as noted by Bernstein here. Next would be testing to login as admin.
Posted by
E A Faisal
at
20:43
0
comments
Tuesday, June 27, 2006
Hylafax protocol prototype
This is an update of the previous post. For the prototype, I'll just focused on 3 things:
- Able to login, both as users and admin
- Able to post fax job
- Able to query the fax server the status of fax job
I've played around with asyncore/asynchat and looks that this is a feasible project.
Posted by
E A Faisal
at
20:22
0
comments
Monday, June 26, 2006
The new Hylafax protocol adventure begins
Posted by
E A Faisal
at
19:53
0
comments
Wednesday, June 14, 2006
Another reminder
Please be reminded to check out Bazaar-NG - a next generation distributed version control system. I think I might have one or two projects which is suitable for using distributed version control system. Furthermore, this one is written in Python and still under active development. This could be a nice alternative to centralized version control system that I'm used to - CVS and SVN.
Posted by
E A Faisal
at
20:04
0
comments
Tuesday, June 13, 2006
Hylafax protocol for Python
Posted by
E A Faisal
at
20:30
0
comments
Monday, June 12, 2006
FIFA World Cup - got time to blog?
- Most of the seeded teams which have played produced a sub-standard performance.
- Many of the teams which were expected to lose to the seeded teams fought in a spirited manner and played extremely well.
So, what happened to the seeded teams? Over confidence? Ego - thinking that they're star players which make them unable to play as a team? Poorly prepared? Or all the above?
Posted by
E A Faisal
at
13:35
0
comments
Friday, June 09, 2006
Open Source: Beyond Software
Another thing to do beside hacking the codes - sew!
Posted by
E A Faisal
at
20:02
0
comments
Thursday, June 08, 2006
My little rant on Python
Posted by
E A Faisal
at
20:25
0
comments
Labels: Development, Programming
Tuesday, June 06, 2006
IPv6 has finally come
This is a wake up call for me to ensure that all the boxens I'm using and their corresponding network apps support IPv6. With this, comes a task of learning how to use IPv6 and its tips-and-tricks. Bye-bye 6Bone, Welcome IPv6.
Posted by
E A Faisal
at
13:59
0
comments
Monday, June 05, 2006
2 weeks full of events
First, ITTutor was defaced on 31 May 2006 and up till now is still closed. Apparently the Admin is taking the opportunity, while fixing the defaced page(s), to do some upgrade works.
Secondly, the Klang Valley in Malaysia was shocked by a landslide which claimed 4 lives. A series of finger-pointing trying to find the fault followed right after. The local authority, however, has the lion share for blames - due to repeated complaint by the affected residences months before the incident happend.
Next news, I still couldn't find an SSL library for Python which is easy to use and less confusing for newbies like me. The existing libraries is either too complex for newbies or simply out of date with the current C version.
Finally, the talk in the office is to integrate the procurement system with the fax server, which is running Hylafax. It is very likely I'll be assigned to figure out how to do it.
Posted by
E A Faisal
at
20:53
0
comments
Friday, June 02, 2006
Managing user account using OpenLDAP
IBM developerWorks features a nice article on implementing a centralize user management using OpenLDAP. Although it's Red Hat specifics, but most of the steps described also applicable to other Linux distributions. I might even try to test the steps in the article myself when I have a free time - may be after the FIFA World Cup is over :)
Posted by
E A Faisal
at
11:28
0
comments
Thursday, June 01, 2006
The first day of June 2006
Today marks the month of June 2006, the month of FIFA World Cup. Along with it come plenty of sleepless night - since all the live telecast would be in the early morning in Malaysia.
Also a very interesting start:
Linux.com featured 2 nice articles on GNU grep and Emacs tips.
Newsforge brought an article on OCSNG - which could be a nice complement to WPKG I'm currently evaluating.
Posted by
E A Faisal
at
10:06
1 comments
