Method: OpenSSL::ASN1::ObjectId.register
- Defined in:
- ossl_asn1.c
.OpenSSL::ASN1::ObjectId.register(object_id, short_name, long_name) ⇒ Object
This adds a new ObjectId to the internal tables. Where object_id is the numerical form, short_name is the short name, and long_name is the long name.
Returns true
if successful. Raises an OpenSSL::ASN1::ASN1Error if it fails.
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 |
# File 'ossl_asn1.c', line 1235
static VALUE
ossl_asn1obj_s_register(VALUE self, VALUE oid, VALUE sn, VALUE ln)
{
StringValueCStr(oid);
StringValueCStr(sn);
StringValueCStr(ln);
if(!OBJ_create(RSTRING_PTR(oid), RSTRING_PTR(sn), RSTRING_PTR(ln)))
ossl_raise(eASN1Error, NULL);
return Qtrue;
}
|