1*782713e6Schristos /* 2*782713e6Schristos * WARNING: do not edit! 3*782713e6Schristos * Generated by Makefile from providers/common/include/prov/der_sm2.h.in 4*782713e6Schristos * 5*782713e6Schristos * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6*782713e6Schristos * 7*782713e6Schristos * Licensed under the Apache License 2.0 (the "License"). You may not use 8*782713e6Schristos * this file except in compliance with the License. You can obtain a copy 9*782713e6Schristos * in the file LICENSE in the source distribution or at 10*782713e6Schristos * https://www.openssl.org/source/license.html 11*782713e6Schristos */ 12*782713e6Schristos 13*782713e6Schristos #include "crypto/ec.h" 14*782713e6Schristos #include "internal/der.h" 15*782713e6Schristos 16*782713e6Schristos /* Well known OIDs precompiled */ 17*782713e6Schristos 18*782713e6Schristos /* 19*782713e6Schristos * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } 20*782713e6Schristos */ 21*782713e6Schristos #define DER_OID_V_sm2_with_SM3 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75 22*782713e6Schristos #define DER_OID_SZ_sm2_with_SM3 10 23*782713e6Schristos extern const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3]; 24*782713e6Schristos 25*782713e6Schristos /* 26*782713e6Schristos * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } 27*782713e6Schristos */ 28*782713e6Schristos #define DER_OID_V_curveSM2 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D 29*782713e6Schristos #define DER_OID_SZ_curveSM2 10 30*782713e6Schristos extern const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2]; 31*782713e6Schristos 32*782713e6Schristos 33*782713e6Schristos /* Subject Public Key Info */ 34*782713e6Schristos int ossl_DER_w_algorithmIdentifier_SM2(WPACKET *pkt, int cont, EC_KEY *ec); 35*782713e6Schristos /* Signature */ 36*782713e6Schristos int ossl_DER_w_algorithmIdentifier_SM2_with_MD(WPACKET *pkt, int cont, 37*782713e6Schristos EC_KEY *ec, int mdnid); 38