Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Problem decoding digital signature file, stored in user model

Daniel Blanco
on 2/15/16, 6:53 AM 462 views

I have a certificate (p12) supplied by an authority, with a passphrase. The idea is to let the user himself to upload the certificate inside odoo (in his own profile), to sign things inside Odoo, using cryptography libraries.. anyway the first step to give the user an easy method to upload his file.

I've wrote a custom module inheriting res.user, in order to store a digital signature, owned by each user.

I can't decode the file. When making this:

    kfile = base64.b64decode(r.key_file)

I get "incorrect padding".

Already tried different approaches, found in stackoverflow, like adding '===', or adding '_-' without success.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 2/15/16, 6:53 AM
Seen: 462 times
Last updated: 2/15/16, 11:37 AM