aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGOTOU Yuuzou <gotoyuzo@notwork.org>2003-07-22 08:37:03 +0000
committerGOTOU Yuuzou <gotoyuzo@notwork.org>2003-07-22 08:37:03 +0000
commit826dc59d419bdaa31f1267e75f1ee6079d379280 (patch)
tree38c0cd7a9d3bc6b0e3313c8024a981d32ad60620
parent9fe25f4b06c0f49b6c8a8c7a6eef3ea1d3fb9d9a (diff)
downloadruby-openssl-history-826dc59d419bdaa31f1267e75f1ee6079d379280.tar.gz
v1.0.0
-rw-r--r--ChangeLog5
-rw-r--r--ossl_pkcs7.c99
-rw-r--r--ossl_version.h6
3 files changed, 6 insertions, 104 deletions
diff --git a/ChangeLog b/ChangeLog
index f81a2bd..f8c9d5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue, 22 Jul 2003 17:32:54 +0900 -- GOTOU Yuuzou <gotoyuzo@notwork.org>
+ * ossl_pkcs7.c: get rid of unused function:
+ ossl_pkcs7_data_verify(), ossl_pkcs7_data_decode()
+ * ossl_version.h: version is 1.0.0
+
Tue, 22 Jul 2003 08:59:21 +0200 -- Michal Rokos <m.rokos@sh.cvut.cz>
* config.c: Copy filename to local buf, report correct error when file not found
diff --git a/ossl_pkcs7.c b/ossl_pkcs7.c
index a27ecc7..e8efdf4 100644
--- a/ossl_pkcs7.c
+++ b/ossl_pkcs7.c
@@ -612,101 +612,6 @@ ossl_pkcs7_add_data(VALUE self, VALUE data)
return data;
}
-#if 0
-static VALUE
-ossl_pkcs7_data_verify(int argc, VALUE *argv, VALUE self)
-{
- PKCS7 *pkcs7;
- BIO *bio, *data = NULL;
- char buf[1024 * 4];
- int i, result;
- STACK_OF(PKCS7_SIGNER_INFO) *sk;
- PKCS7_SIGNER_INFO *si;
- X509_STORE *store;
- X509_STORE_CTX ctx;
- VALUE x509store, detached;
-
- GetPKCS7(self, pkcs7);
- if (!PKCS7_type_is_signed(pkcs7)) {
- ossl_raise(ePKCS7Error, "Wrong content type - PKCS7 is not SIGNED");
- }
- rb_scan_args(argc, argv, "11", &x509store, &detached);
- store = GetX509StorePtr(x509store);
- if (!NIL_P(detached)) {
- StringValue(detached);
- data = BIO_new_mem_buf(RSTRING(detached)->ptr, RSTRING(detached)->len);
- if(!data){
- ossl_raise(ePKCS7Error, NULL);
- }
- }
-
- if (PKCS7_get_detached(pkcs7)) {
- if (!data) {
- ossl_raise(ePKCS7Error, "PKCS7 is detached, data needed!");
- }
- bio = PKCS7_dataInit(pkcs7, data);
- } else {
- bio = PKCS7_dataInit(pkcs7, NULL);
- }
- if (!bio) {
- if (data) {
- BIO_free(data);
- }
- ossl_raise(ePKCS7Error, NULL);
- }
-
- /* We have to 'read' from bio to calculate digests etc. */
- for (;;) {
- i = BIO_read(bio, buf, sizeof(buf));
- if (i <= 0) break;
- }
- /* BIO_free(bio); - shall we? */
-
- if (!(sk = PKCS7_get_signer_info(pkcs7))) {
- ossl_raise(ePKCS7Error, "NO SIGNATURES ON THIS DATA");
- }
- for (i=0; i<sk_PKCS7_SIGNER_INFO_num(sk); i++) {
- si = sk_PKCS7_SIGNER_INFO_value(sk, i);
- result = PKCS7_dataVerify(store, &ctx, bio, pkcs7, si);
- if (result <= 0) {
- OSSL_Debug("result < 0! (%s)", OSSL_ErrMsg());
- return Qfalse;
- }
- /* Yield signer info */
- if (rb_block_given_p()) {
- rb_yield(ossl_pkcs7si_new(si));
- }
- }
-
- return Qtrue;
-}
-
-static VALUE
-ossl_pkcs7_data_decode(VALUE self, VALUE key, VALUE cert)
-{
- PKCS7 *pkcs7;
- EVP_PKEY *pkey;
- X509 *x509;
- BIO *bio;
- VALUE str;
- int status = 0;
-
- GetPKCS7(self, pkcs7);
- pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
- x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
- if (!(bio = PKCS7_dataDecode(pkcs7, pkey, NULL, x509))) {
- X509_free(x509);
- ossl_raise(ePKCS7Error, NULL);
- }
- X509_free(x509);
- str = ossl_protect_membio2str(bio, &status);
- BIO_free(bio);
- if(status) rb_jump_tag(status);
-
- return str;
-}
-#endif
-
static VALUE
ossl_pkcs7_to_pem(VALUE self)
{
@@ -845,10 +750,6 @@ Init_ossl_pkcs7()
rb_define_alias(cPKCS7, "data=", "add_data");
rb_define_method(cPKCS7, "verify", ossl_pkcs7_verify, -1);
rb_define_method(cPKCS7, "decrypt", ossl_pkcs7_decrypt, -1);
-#if 0
- rb_define_method(cPKCS7, "verify_data", ossl_pkcs7_data_verify, -1);
- rb_define_method(cPKCS7, "decode_data", ossl_pkcs7_data_decode, 2);
-#endif
rb_define_method(cPKCS7, "to_pem", ossl_pkcs7_to_pem, 0);
rb_define_alias(cPKCS7, "to_s", "to_pem");
diff --git a/ossl_version.h b/ossl_version.h
index 6482a95..63878e0 100644
--- a/ossl_version.h
+++ b/ossl_version.h
@@ -11,10 +11,6 @@
#if !defined(_OSSL_VERSION_H_)
#define _OSSL_VERSION_H_
-#if 0 /* Release */
-#define OSSL_VERSION "0.2.0-pre4"
-#else /* based on */
-#define OSSL_VERSION "OSSL2 - CVS SNAPSHOT ($Date$)"
-#endif
+#define OSSL_VERSION "1.0.0"
#endif /* _OSSL_VERSION_H_ */