Add CCM ciphers to tables.
[openssl.git] / crypto / evp / m_dss.c
index 743beacc5bf68de46789d56f04d438de7dba1e80..c9ab07349f2007b8dff42f3e3da635348bb4d4be 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/evp/m_dss.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "evp.h"
-#include "objects.h"
-#include "x509.h"
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/sha.h>
+#ifndef OPENSSL_NO_DSA
+#include <openssl/dsa.h>
+#endif
 
-static EVP_MD dsa_md=
+#ifndef OPENSSL_NO_SHA
+
+static int init(EVP_MD_CTX *ctx)
+       { return SHA1_Init(ctx->md_data); }
+
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
+       { return SHA1_Update(ctx->md_data,data,count); }
+
+static int final(EVP_MD_CTX *ctx,unsigned char *md)
+       { return SHA1_Final(md,ctx->md_data); }
+
+static const EVP_MD dsa_md=
        {
        NID_dsaWithSHA,
        NID_dsaWithSHA,
        SHA_DIGEST_LENGTH,
-       SHA_Init,
-       SHA_Update,
-       SHA_Final,
-       EVP_PKEY_DSA_method,
+       EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_PKEY_DIGEST|EVP_MD_FLAG_FIPS,
+       init,
+       update,
+       final,
+       NULL,
+       NULL,
+       EVP_PKEY_NULL_method,
+       SHA_CBLOCK,
+       sizeof(EVP_MD *)+sizeof(SHA_CTX),
        };
 
-EVP_MD *EVP_dss()
+const EVP_MD *EVP_dss(void)
        {
        return(&dsa_md);
        }
-
+#endif