Hi all,

well.. I found a solution that works for now, although it might not
be the most elegant. I just coded a new function that lets you create
a new OBJ with a specific NID, in this way other parts of the code
can use the new OBJ and retrieve the same NID for, for example, "P384"
and "secp284r1".

Cheers,
Max

P.S.: I also tried by using the OBJ_NAME_add with OBJ_NAME_ALIAS, but
I could not figure out how to make it work for my purpose... :(


On 01/15/2011 02:06 PM, Massimiliano Pala wrote:
Hi all,

I was wondering if it was possible to add an alias to an object.
In particular, I would like to add the possibility, for example,
to use "P384" instead of "secp384r1" when retrieving an object ID:

name_1 = "P384";
name_2 = "secp384r1";

ret_1 = OBJ_txt2obj ( name_1, 0 );
ret_2 = OBJ_txt2obj ( name_2, 0 );

So that ret_1 and ret_2 point to the same object ? Or, at least,
the following returns the same NID:

nid_1 = OBJ_sn2nid ( name_1);
nid_2 = OBJ_sn2nid ( name_2);

==> nid_1 == nid_2

Is there a way to do that ?

Cheers,
Max



--

Best Regards,

        Massimiliano Pala

--o------------------------------------------------------------------------
Massimiliano Pala [OpenCA Project Manager]                   ope...@acm.org
                                                 project.mana...@openca.org

Dartmouth Computer Science Dept               Home Phone: +1 (603) 369-9332
PKI/Trust Laboratory                          Work Phone: +1 (603) 646-8734
--o------------------------------------------------------------------------
People who think they know everything are a great annoyance to those of us
who do.
                                                           -- Isaac Asimov

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to