certnanny/sscep

nid creation failed OBJ_create:oid exists

u11145 opened this issue · 1 comments

I am running sscep client with openssl 1.1.1f on ubuntu server.
In the init_scep function nid creation for object type messageType is always failing. tried to get error using error functions.

Following is code where it is failing in function init_scep().
nid_messageType = OBJ_create("2.16.840.1.113733.1.9.2", "messageType", "messageType");
err = ERR_get_error();
printf("\nERR: %s \n",ERR_error_string(err, NULL));

output :
ERR: error:08064066:object identifier routines:OBJ_create:oid exists
SSCEP: cannot create OID

Openssl :
OpenSSL 1.1.1h-dev xx XXX xxxx
built on: Tue Jul 28 13:08:47 2020 UTC
platform: linux-x86_64
options: bn(64,64) rc4(8x,int) des(int) idea(int) blowfish(ptr)

With the earlier installation of openssl 1.0.2 and old sscep client this worked fine.

Let me know if you need any more information on my setup.
Thanks in Advance.

Temporary resolved this issue by changing the code to
if(nid_messageType == NID_undef){
nid_messageType = OBJ_create(NIDmessageType, NIDmessageTypeName, NIDmessageTypeName);
if (nid_messageType == 0){
goto err;
}
}
Still no idea that why it worked in the earlier code using Openssl 1.0.2 and is not working with Openssl 1.1.1