| OLD | NEW |
| 1 /* crypto/evp/m_ecdsa.c */ | 1 /* crypto/evp/m_ecdsa.c */ |
| 2 /* ==================================================================== | 2 /* ==================================================================== |
| 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 { return SHA1_Update(ctx->md_data,data,count); } | 123 { return SHA1_Update(ctx->md_data,data,count); } |
| 124 | 124 |
| 125 static int final(EVP_MD_CTX *ctx,unsigned char *md) | 125 static int final(EVP_MD_CTX *ctx,unsigned char *md) |
| 126 { return SHA1_Final(md,ctx->md_data); } | 126 { return SHA1_Final(md,ctx->md_data); } |
| 127 | 127 |
| 128 static const EVP_MD ecdsa_md= | 128 static const EVP_MD ecdsa_md= |
| 129 { | 129 { |
| 130 NID_ecdsa_with_SHA1, | 130 NID_ecdsa_with_SHA1, |
| 131 NID_ecdsa_with_SHA1, | 131 NID_ecdsa_with_SHA1, |
| 132 SHA_DIGEST_LENGTH, | 132 SHA_DIGEST_LENGTH, |
| 133 » 0, | 133 » EVP_MD_FLAG_PKEY_DIGEST, |
| 134 init, | 134 init, |
| 135 update, | 135 update, |
| 136 final, | 136 final, |
| 137 NULL, | 137 NULL, |
| 138 NULL, | 138 NULL, |
| 139 EVP_PKEY_ECDSA_method, | 139 EVP_PKEY_ECDSA_method, |
| 140 SHA_CBLOCK, | 140 SHA_CBLOCK, |
| 141 sizeof(EVP_MD *)+sizeof(SHA_CTX), | 141 sizeof(EVP_MD *)+sizeof(SHA_CTX), |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 const EVP_MD *EVP_ecdsa(void) | 144 const EVP_MD *EVP_ecdsa(void) |
| 145 { | 145 { |
| 146 return(&ecdsa_md); | 146 return(&ecdsa_md); |
| 147 } | 147 } |
| 148 #endif | 148 #endif |
| OLD | NEW |