diff options
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/ossl_x509name.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c index e716f100c7..417d042740 100644 --- a/ext/openssl/ossl_x509name.c +++ b/ext/openssl/ossl_x509name.c @@ -266,6 +266,14 @@ ossl_x509name_cmp0(VALUE self, VALUE other) return X509_NAME_cmp(name1, name2); } +/* + * call-seq: + * name.cmp other => integer + * name.<=> other => integer + * + * Compares this Name with +other+ and returns 0 if they are the same and -1 or + * +1 if they are greater or less than each other respectively. + */ static VALUE ossl_x509name_cmp(VALUE self, VALUE other) { @@ -292,6 +300,9 @@ ossl_x509name_eql(VALUE self, VALUE other) /* * call-seq: * name.hash => integer + * + * The hash value returned is suitable for use as a certificate's filename in + * a CA path. */ static VALUE ossl_x509name_hash(VALUE self) @@ -342,6 +353,8 @@ Init_ossl_x509name() eX509NameError = rb_define_class_under(mX509, "NameError", eOSSLError); cX509Name = rb_define_class_under(mX509, "Name", rb_cObject); + rb_include_module(cX509Name, rb_mComparable); + rb_define_alloc_func(cX509Name, ossl_x509name_alloc); rb_define_method(cX509Name, "initialize", ossl_x509name_initialize, -1); rb_define_method(cX509Name, "add_entry", ossl_x509name_add_entry, -1); |