aboutsummaryrefslogtreecommitdiffstats
path: root/ossl_x509req.c
diff options
context:
space:
mode:
authorMichal Rokos <m.rokos@sh.cvut.cz>2002-04-07 16:34:43 +0000
committerMichal Rokos <m.rokos@sh.cvut.cz>2002-04-07 16:34:43 +0000
commitbc603852659675cd0c7420dd4d126780f7ba6ee2 (patch)
treeb3d68ace93981e8f961f8b2a3451df3d53eac993 /ossl_x509req.c
parentfcb0234e46e8fc656748f364148754a1cc80ea4b (diff)
downloadruby-openssl-history-bc603852659675cd0c7420dd4d126780f7ba6ee2.tar.gz
* Macros fixupsossl1-ossl2-branch-point
* X509ExtFactory cleanup * fixed strptime warning on Linux * X509::Certificate#version has been changed! !!! WARNING !!! x509.version = 2 -> defines X509v3, (0 for v1, 1 for v2, ...) p x509.version -> 2, means that it is X509v3 !!! WARNING !!!
Diffstat (limited to 'ossl_x509req.c')
-rw-r--r--ossl_x509req.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ossl_x509req.c b/ossl_x509req.c
index 2a43542..ee7e76d 100644
--- a/ossl_x509req.c
+++ b/ossl_x509req.c
@@ -181,10 +181,10 @@ ossl_x509req_set_version(VALUE self, VALUE version)
GetX509Req(self, req);
- if ((ver = NUM2INT(version)) <= 0) {
- rb_raise(eX509RequestError, "version must be > 0!");
+ if ((ver = NUM2INT(version)) < 0) {
+ rb_raise(eX509RequestError, "version must be >= 0!");
}
- if (!X509_REQ_set_version(req, version)) {
+ if (!X509_REQ_set_version(req, ver)) {
OSSL_Raise(eX509RequestError, "");
}