ecs_asn1.c revision 296341
1204076Spjd/* crypto/ecdsa/ecs_asn1.c */ 2204076Spjd/* ==================================================================== 3219887Spjd * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. 4204076Spjd * 5204076Spjd * Redistribution and use in source and binary forms, with or without 6204076Spjd * modification, are permitted provided that the following conditions 7204076Spjd * are met: 8204076Spjd * 9204076Spjd * 1. Redistributions of source code must retain the above copyright 10204076Spjd * notice, this list of conditions and the following disclaimer. 11204076Spjd * 12204076Spjd * 2. Redistributions in binary form must reproduce the above copyright 13204076Spjd * notice, this list of conditions and the following disclaimer in 14204076Spjd * the documentation and/or other materials provided with the 15204076Spjd * distribution. 16204076Spjd * 17204076Spjd * 3. All advertising materials mentioning features or use of this 18204076Spjd * software must display the following acknowledgment: 19204076Spjd * "This product includes software developed by the OpenSSL Project 20204076Spjd * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 21204076Spjd * 22204076Spjd * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23204076Spjd * endorse or promote products derived from this software without 24204076Spjd * prior written permission. For written permission, please contact 25204076Spjd * licensing@OpenSSL.org. 26204076Spjd * 27204076Spjd * 5. Products derived from this software may not be called "OpenSSL" 28204076Spjd * nor may "OpenSSL" appear in their names without prior written 29204076Spjd * permission of the OpenSSL Project. 30204076Spjd * 31204076Spjd * 6. Redistributions of any form whatsoever must retain the following 32204076Spjd * acknowledgment: 33204076Spjd * "This product includes software developed by the OpenSSL Project 34204076Spjd * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 35204076Spjd * 36204076Spjd * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37204076Spjd * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38204076Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39204076Spjd * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40204076Spjd * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41204076Spjd * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42204076Spjd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43204076Spjd * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44204076Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45204076Spjd * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46204076Spjd * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47204076Spjd * OF THE POSSIBILITY OF SUCH DAMAGE. 48204076Spjd * ==================================================================== 49219815Spjd * 50219815Spjd * This product includes cryptographic software written by Eric Young 51219815Spjd * (eay@cryptsoft.com). This product includes software written by Tim 52204076Spjd * Hudson (tjh@cryptsoft.com). 53204076Spjd * 54231017Strociny */ 55204076Spjd 56204076Spjd#include "ecs_locl.h" 57#include <openssl/err.h> 58#include <openssl/asn1t.h> 59 60ASN1_SEQUENCE(ECDSA_SIG) = { 61 ASN1_SIMPLE(ECDSA_SIG, r, CBIGNUM), 62 ASN1_SIMPLE(ECDSA_SIG, s, CBIGNUM) 63} ASN1_SEQUENCE_END(ECDSA_SIG) 64 65DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG) 66DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG) 67IMPLEMENT_ASN1_FUNCTIONS_const(ECDSA_SIG) 68