Update to version 3.0.0. Take maintainership. Remove regression

tests as they now depend on RSpec 2, and ports still only supports
RSpec 1.

The bcrypt C implementation in 3.0.0 is new, so the previous patches
are no longer necessary.
This commit is contained in:
jeremy 2011-09-07 16:10:49 +00:00
parent 4c1cb9eb6f
commit 2d44f2ec8b
6 changed files with 28 additions and 95 deletions

View File

@ -1,13 +1,14 @@
# $OpenBSD: Makefile,v 1.11 2011/01/06 04:24:24 jeremy Exp $ # $OpenBSD: Makefile,v 1.12 2011/09/07 16:10:49 jeremy Exp $
COMMENT = Ruby binding for the bcrypt() password hashing algorithm COMMENT = Ruby binding for the bcrypt() password hashing algorithm
VERSION = 2.1.2 VERSION = 3.0.0
DISTNAME = bcrypt-ruby-${VERSION} DISTNAME = bcrypt-ruby-${VERSION}
PKGNAME = bcrypt-${VERSION} PKGNAME = bcrypt-${VERSION}
REVISION = 4
CATEGORIES = security CATEGORIES = security
MAINTAINER = Jeremy Evans <jeremy@openbsd.org>
HOMEPAGE = http://bcrypt-ruby.rubyforge.org/ HOMEPAGE = http://bcrypt-ruby.rubyforge.org/
# MIT # MIT
@ -20,10 +21,4 @@ MODULES = lang/ruby
CONFIGURE_STYLE = ruby gem ext CONFIGURE_STYLE = ruby gem ext
REGRESS_DEPENDS = devel/ruby-rcov,${MODRUBY_FLAVOR} \
devel/ruby-diff-lcs,${MODRUBY_FLAVOR} \
${FULLPKGNAME}:${BUILD_PKGPATH}
MODRUBY_REGRESS = rake rspec
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (bcrypt-ruby-2.1.2.gem) = fsSe+e+0F75EQ/kgkq3KmQ== MD5 (bcrypt-ruby-3.0.0.gem) = wpm5+pjrGViXnbFNzN+m+w==
RMD160 (bcrypt-ruby-2.1.2.gem) = SdIgY7FKAA/duY1aVOhPqMPlQec= RMD160 (bcrypt-ruby-3.0.0.gem) = Op+KbldSY7OEbY7bVN7aQ7kT6pA=
SHA1 (bcrypt-ruby-2.1.2.gem) = d/qXGs5PkI1Ki8ARjkOWW6ACOys= SHA1 (bcrypt-ruby-3.0.0.gem) = 6Xq5cuTk8saO2zufIAjMXoW4ZAM=
SHA256 (bcrypt-ruby-2.1.2.gem) = a3FQxqzPXJmo0XC9YFdUKx+SN94b/Qqlt2ESRs7V5PQ= SHA256 (bcrypt-ruby-3.0.0.gem) = 3J228pObP8PMScq15oxW8zh6PwdlvNAJs2DNLSAEHDI=
SIZE (bcrypt-ruby-2.1.2.gem) = 44544 SIZE (bcrypt-ruby-3.0.0.gem) = 41984

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-ext_mri_bcrypt_c,v 1.1 2010/01/01 20:35:34 jcs Exp $
--- ext/mri/bcrypt.c.orig Wed Dec 31 17:00:00 1969
+++ ext/mri/bcrypt.c Thu Dec 31 16:30:45 2009
@@ -150,7 +150,7 @@ encode_salt(char *salt, uint8_t *csalt, uint16_t clen,
*/
char *
-bcrypt_gensalt(char *output, uint8_t log_rounds, uint8_t *rseed)
+_bcrypt_gensalt(char *output, uint8_t log_rounds, uint8_t *rseed)
{
if (log_rounds < 4)
log_rounds = 4;
@@ -164,7 +164,7 @@ bcrypt_gensalt(char *output, uint8_t log_rounds, uint8
i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
char *
-bcrypt(char *output, const char *key, const char *salt)
+_bcrypt(char *output, const char *key, const char *salt)
{
blf_ctx state;
uint32_t rounds, i, k;

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-ext_mri_bcrypt_ext_c,v 1.1 2010/01/01 20:35:34 jcs Exp $
--- ext/mri/bcrypt_ext.c.orig Wed Dec 31 17:00:00 1969
+++ ext/mri/bcrypt_ext.c Thu Dec 31 16:30:45 2009
@@ -30,7 +30,7 @@ static VALUE cBCryptEngine;
static VALUE bcrypt_wrapper(void *_args) {
BCryptArguments *args = (BCryptArguments *)_args;
- return (VALUE)bcrypt(args->output, args->key, args->salt);
+ return (VALUE)_bcrypt(args->output, args->key, args->salt);
}
#endif /* RUBY_1_9 */
@@ -41,7 +41,8 @@ static VALUE bc_salt(VALUE self, VALUE cost, VALUE see
int icost = NUM2INT(cost);
char salt[BCRYPT_SALT_OUTPUT_SIZE];
- bcrypt_gensalt(salt, icost, (uint8_t *)RSTRING_PTR(seed));
+ _bcrypt_gensalt(salt, icost, (uint8_t *)RSTRING_PTR(seed));
+
return rb_str_new2(salt);
}
@@ -70,7 +71,7 @@ static VALUE bc_crypt(VALUE self, VALUE key, VALUE sal
/* otherwise, fallback to the non-GIL-unlocking code, just like on Ruby 1.8 */
#endif
- if (bcrypt(output, safeguarded, (char *)RSTRING_PTR(salt)) != NULL) {
+ if (_bcrypt(output, safeguarded, (char *)RSTRING_PTR(salt)) != NULL) {
return rb_str_new2(output);
} else {
return Qnil;

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-ext_mri_bcrypt_h,v 1.1 2010/01/01 20:35:34 jcs Exp $
--- ext/mri/bcrypt.h.orig Wed Dec 31 17:00:00 1969
+++ ext/mri/bcrypt.h Thu Dec 31 16:30:45 2009
@@ -51,7 +51,7 @@
* cryptographically secure random source.
* Returns: output
*/
-char *bcrypt_gensalt(char *output, uint8_t log_rounds, uint8_t *rseed);
+char *_bcrypt_gensalt(char *output, uint8_t log_rounds, uint8_t *rseed);
/*
* Given a secret and a salt, generates a salted hash (which you can then store safely).
@@ -62,6 +62,6 @@ char *bcrypt_gensalt(char *output, uint8_t log_rounds,
* salt: The salt, as generated by bcrypt_gensalt().
* Returns: output on success, NULL on error.
*/
-char *bcrypt(char *output, const char *key, const char *salt);
+char *_bcrypt(char *output, const char *key, const char *salt);
#endif /* _BCRYPT_H_ */

View File

@ -1,31 +1,41 @@
@comment $OpenBSD: PLIST,v 1.4 2010/11/08 23:24:42 jeremy Exp $ @comment $OpenBSD: PLIST,v 1.5 2011/09/07 16:10:49 jeremy Exp $
${GEM_LIB}/cache/${DISTNAME}.gem ${GEM_LIB}/cache/${DISTNAME}.gem
${GEM_LIB}/gems/${DISTNAME}/ ${GEM_LIB}/gems/${DISTNAME}/
${GEM_LIB}/gems/${DISTNAME}/.gitignore
${GEM_LIB}/gems/${DISTNAME}/.rspec
${GEM_LIB}/gems/${DISTNAME}/CHANGELOG ${GEM_LIB}/gems/${DISTNAME}/CHANGELOG
${GEM_LIB}/gems/${DISTNAME}/COPYING ${GEM_LIB}/gems/${DISTNAME}/COPYING
${GEM_LIB}/gems/${DISTNAME}/README ${GEM_LIB}/gems/${DISTNAME}/Gemfile
${GEM_LIB}/gems/${DISTNAME}/Gemfile.lock
${GEM_LIB}/gems/${DISTNAME}/README.md
${GEM_LIB}/gems/${DISTNAME}/Rakefile ${GEM_LIB}/gems/${DISTNAME}/Rakefile
${GEM_LIB}/gems/${DISTNAME}/bcrypt-ruby.gemspec
${GEM_LIB}/gems/${DISTNAME}/ext/ ${GEM_LIB}/gems/${DISTNAME}/ext/
${GEM_LIB}/gems/${DISTNAME}/ext/jruby/ ${GEM_LIB}/gems/${DISTNAME}/ext/jruby/
${GEM_LIB}/gems/${DISTNAME}/ext/jruby/bcrypt_jruby/ ${GEM_LIB}/gems/${DISTNAME}/ext/jruby/bcrypt_jruby/
${GEM_LIB}/gems/${DISTNAME}/ext/jruby/bcrypt_jruby/BCrypt.class
${GEM_LIB}/gems/${DISTNAME}/ext/jruby/bcrypt_jruby/BCrypt.java ${GEM_LIB}/gems/${DISTNAME}/ext/jruby/bcrypt_jruby/BCrypt.java
${GEM_LIB}/gems/${DISTNAME}/ext/mri/ ${GEM_LIB}/gems/${DISTNAME}/ext/mri/
${GEM_LIB}/gems/${DISTNAME}/ext/mri/Makefile ${GEM_LIB}/gems/${DISTNAME}/ext/mri/Makefile
${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt.c
${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt.h
${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt.o
${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt_ext.c ${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt_ext.c
${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt_ext.o ${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt_ext.o
${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt_ext.so ${GEM_LIB}/gems/${DISTNAME}/ext/mri/bcrypt_ext.so
${GEM_LIB}/gems/${DISTNAME}/ext/mri/blf.h ${GEM_LIB}/gems/${DISTNAME}/ext/mri/crypt.c
${GEM_LIB}/gems/${DISTNAME}/ext/mri/blowfish.c ${GEM_LIB}/gems/${DISTNAME}/ext/mri/crypt.h
${GEM_LIB}/gems/${DISTNAME}/ext/mri/blowfish.o ${GEM_LIB}/gems/${DISTNAME}/ext/mri/crypt.o
${GEM_LIB}/gems/${DISTNAME}/ext/mri/crypt_blowfish.c
${GEM_LIB}/gems/${DISTNAME}/ext/mri/crypt_blowfish.o
${GEM_LIB}/gems/${DISTNAME}/ext/mri/crypt_gensalt.c
${GEM_LIB}/gems/${DISTNAME}/ext/mri/crypt_gensalt.o
${GEM_LIB}/gems/${DISTNAME}/ext/mri/extconf.rb ${GEM_LIB}/gems/${DISTNAME}/ext/mri/extconf.rb
${GEM_LIB}/gems/${DISTNAME}/ext/mri/ow-crypt.h
${GEM_LIB}/gems/${DISTNAME}/ext/mri/wrapper.c
${GEM_LIB}/gems/${DISTNAME}/ext/mri/wrapper.o
${GEM_LIB}/gems/${DISTNAME}/lib/ ${GEM_LIB}/gems/${DISTNAME}/lib/
${GEM_LIB}/gems/${DISTNAME}/lib/bcrypt.rb ${GEM_LIB}/gems/${DISTNAME}/lib/bcrypt.rb
${GEM_LIB}/gems/${DISTNAME}/lib/bcrypt_engine.rb
${GEM_LIB}/gems/${DISTNAME}/lib/bcrypt_ext.so ${GEM_LIB}/gems/${DISTNAME}/lib/bcrypt_ext.so
${GEM_LIB}/gems/${DISTNAME}/spec/ ${GEM_LIB}/gems/${DISTNAME}/spec/
${GEM_LIB}/gems/${DISTNAME}/spec/TestBCrypt.java
${GEM_LIB}/gems/${DISTNAME}/spec/bcrypt/ ${GEM_LIB}/gems/${DISTNAME}/spec/bcrypt/
${GEM_LIB}/gems/${DISTNAME}/spec/bcrypt/engine_spec.rb ${GEM_LIB}/gems/${DISTNAME}/spec/bcrypt/engine_spec.rb
${GEM_LIB}/gems/${DISTNAME}/spec/bcrypt/password_spec.rb ${GEM_LIB}/gems/${DISTNAME}/spec/bcrypt/password_spec.rb