Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
4a0840e1
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4a0840e1
编写于
2月 04, 2011
作者:
V
vinnie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6989705: ECC security code native code compiler warnings
Reviewed-by: alanb, ohair
上级
e3b58020
变更
45
隐藏空白更改
内联
并排
Showing
45 changed file
with
69 addition
and
146 deletion
+69
-146
src/share/native/sun/security/ec/ECC_JNI.cpp
src/share/native/sun/security/ec/ECC_JNI.cpp
+3
-3
src/share/native/sun/security/ec/impl/ec.c
src/share/native/sun/security/ec/impl/ec.c
+9
-12
src/share/native/sun/security/ec/impl/ec.h
src/share/native/sun/security/ec/impl/ec.h
+0
-2
src/share/native/sun/security/ec/impl/ec2.h
src/share/native/sun/security/ec/impl/ec2.h
+0
-2
src/share/native/sun/security/ec/impl/ec2_163.c
src/share/native/sun/security/ec/impl/ec2_163.c
+0
-2
src/share/native/sun/security/ec/impl/ec2_193.c
src/share/native/sun/security/ec/impl/ec2_193.c
+0
-2
src/share/native/sun/security/ec/impl/ec2_233.c
src/share/native/sun/security/ec/impl/ec2_233.c
+0
-2
src/share/native/sun/security/ec/impl/ec2_aff.c
src/share/native/sun/security/ec/impl/ec2_aff.c
+0
-2
src/share/native/sun/security/ec/impl/ec2_mont.c
src/share/native/sun/security/ec/impl/ec2_mont.c
+0
-2
src/share/native/sun/security/ec/impl/ec_naf.c
src/share/native/sun/security/ec/impl/ec_naf.c
+0
-2
src/share/native/sun/security/ec/impl/ecc_impl.h
src/share/native/sun/security/ec/impl/ecc_impl.h
+2
-3
src/share/native/sun/security/ec/impl/ecdecode.c
src/share/native/sun/security/ec/impl/ecdecode.c
+3
-4
src/share/native/sun/security/ec/impl/ecl-curve.h
src/share/native/sun/security/ec/impl/ecl-curve.h
+0
-2
src/share/native/sun/security/ec/impl/ecl-exp.h
src/share/native/sun/security/ec/impl/ecl-exp.h
+0
-2
src/share/native/sun/security/ec/impl/ecl-priv.h
src/share/native/sun/security/ec/impl/ecl-priv.h
+13
-2
src/share/native/sun/security/ec/impl/ecl.c
src/share/native/sun/security/ec/impl/ecl.c
+0
-2
src/share/native/sun/security/ec/impl/ecl.h
src/share/native/sun/security/ec/impl/ecl.h
+0
-2
src/share/native/sun/security/ec/impl/ecl_curve.c
src/share/native/sun/security/ec/impl/ecl_curve.c
+0
-2
src/share/native/sun/security/ec/impl/ecl_gf.c
src/share/native/sun/security/ec/impl/ecl_gf.c
+8
-10
src/share/native/sun/security/ec/impl/ecl_mult.c
src/share/native/sun/security/ec/impl/ecl_mult.c
+0
-2
src/share/native/sun/security/ec/impl/ecp.h
src/share/native/sun/security/ec/impl/ecp.h
+0
-2
src/share/native/sun/security/ec/impl/ecp_192.c
src/share/native/sun/security/ec/impl/ecp_192.c
+6
-8
src/share/native/sun/security/ec/impl/ecp_224.c
src/share/native/sun/security/ec/impl/ecp_224.c
+4
-6
src/share/native/sun/security/ec/impl/ecp_256.c
src/share/native/sun/security/ec/impl/ecp_256.c
+7
-9
src/share/native/sun/security/ec/impl/ecp_384.c
src/share/native/sun/security/ec/impl/ecp_384.c
+0
-2
src/share/native/sun/security/ec/impl/ecp_521.c
src/share/native/sun/security/ec/impl/ecp_521.c
+2
-4
src/share/native/sun/security/ec/impl/ecp_aff.c
src/share/native/sun/security/ec/impl/ecp_aff.c
+0
-2
src/share/native/sun/security/ec/impl/ecp_jac.c
src/share/native/sun/security/ec/impl/ecp_jac.c
+0
-2
src/share/native/sun/security/ec/impl/ecp_jm.c
src/share/native/sun/security/ec/impl/ecp_jm.c
+0
-2
src/share/native/sun/security/ec/impl/ecp_mont.c
src/share/native/sun/security/ec/impl/ecp_mont.c
+0
-2
src/share/native/sun/security/ec/impl/logtab.h
src/share/native/sun/security/ec/impl/logtab.h
+0
-2
src/share/native/sun/security/ec/impl/mp_gf2m-priv.h
src/share/native/sun/security/ec/impl/mp_gf2m-priv.h
+0
-2
src/share/native/sun/security/ec/impl/mp_gf2m.c
src/share/native/sun/security/ec/impl/mp_gf2m.c
+0
-2
src/share/native/sun/security/ec/impl/mp_gf2m.h
src/share/native/sun/security/ec/impl/mp_gf2m.h
+0
-2
src/share/native/sun/security/ec/impl/mpi-config.h
src/share/native/sun/security/ec/impl/mpi-config.h
+0
-2
src/share/native/sun/security/ec/impl/mpi-priv.h
src/share/native/sun/security/ec/impl/mpi-priv.h
+0
-2
src/share/native/sun/security/ec/impl/mpi.c
src/share/native/sun/security/ec/impl/mpi.c
+10
-12
src/share/native/sun/security/ec/impl/mpi.h
src/share/native/sun/security/ec/impl/mpi.h
+0
-2
src/share/native/sun/security/ec/impl/mplogic.c
src/share/native/sun/security/ec/impl/mplogic.c
+0
-2
src/share/native/sun/security/ec/impl/mplogic.h
src/share/native/sun/security/ec/impl/mplogic.h
+0
-2
src/share/native/sun/security/ec/impl/mpmontg.c
src/share/native/sun/security/ec/impl/mpmontg.c
+0
-2
src/share/native/sun/security/ec/impl/mpprime.h
src/share/native/sun/security/ec/impl/mpprime.h
+0
-2
src/share/native/sun/security/ec/impl/oid.c
src/share/native/sun/security/ec/impl/oid.c
+2
-7
src/share/native/sun/security/ec/impl/secitem.c
src/share/native/sun/security/ec/impl/secitem.c
+0
-2
src/share/native/sun/security/ec/impl/secoidt.h
src/share/native/sun/security/ec/impl/secoidt.h
+0
-2
未找到文件。
src/share/native/sun/security/ec/ECC_JNI.cpp
浏览文件 @
4a0840e1
...
...
@@ -38,7 +38,7 @@ extern "C" {
/*
* Throws an arbitrary Java exception.
*/
void
ThrowException
(
JNIEnv
*
env
,
char
*
exceptionName
)
void
ThrowException
(
JNIEnv
*
env
,
c
onst
c
har
*
exceptionName
)
{
jclass
exceptionClazz
=
env
->
FindClass
(
exceptionName
);
env
->
ThrowNew
(
exceptionClazz
,
NULL
);
...
...
@@ -89,7 +89,7 @@ JNICALL Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair
// Fill a new ECParams using the supplied OID
if
(
EC_DecodeParams
(
&
params_item
,
&
ecparams
,
0
)
!=
SECSuccess
)
{
/* bad curve OID */
ThrowException
(
env
,
(
char
*
)
INVALID_ALGORITHM_PARAMETER_EXCEPTION
);
ThrowException
(
env
,
INVALID_ALGORITHM_PARAMETER_EXCEPTION
);
goto
cleanup
;
}
...
...
@@ -101,7 +101,7 @@ JNICALL Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair
// Generate the new keypair (using the supplied seed)
if
(
EC_NewKey
(
ecparams
,
&
privKey
,
(
unsigned
char
*
)
pSeedBuffer
,
jSeedLength
,
0
)
!=
SECSuccess
)
{
ThrowException
(
env
,
(
char
*
)
KEY_EXCEPTION
);
ThrowException
(
env
,
KEY_EXCEPTION
);
goto
cleanup
;
}
...
...
src/share/native/sun/security/ec/impl/ec.c
浏览文件 @
4a0840e1
...
...
@@ -51,12 +51,10 @@
*
*********************************************************************** */
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2010,
Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mplogic.h"
#include "ec.h"
#include "ecl.h"
...
...
@@ -67,6 +65,7 @@
#include <string.h>
#ifndef _WIN32
#include <stdio.h>
#include <strings.h>
#endif
/* _WIN32 */
...
...
@@ -116,7 +115,7 @@ ec_points_mul(const ECParams *params, const mp_int *k1, const mp_int *k2,
ECGroup
*
group
=
NULL
;
SECStatus
rv
=
SECFailure
;
mp_err
err
=
MP_OKAY
;
int
len
;
unsigned
int
len
;
#if EC_DEBUG
int
i
;
...
...
@@ -278,10 +277,6 @@ ec_NewKey(ECParams *ecParams, ECPrivateKey **privKey,
printf
(
"ec_NewKey called
\n
"
);
#endif
#ifndef _WIN32
int
printf
();
#endif
/* _WIN32 */
if
(
!
ecParams
||
!
privKey
||
!
privKeyBytes
||
(
privKeyLen
<
0
))
{
PORT_SetError
(
SEC_ERROR_INVALID_ARGS
);
return
SECFailure
;
...
...
@@ -361,8 +356,9 @@ int printf();
cleanup:
mp_clear
(
&
k
);
if
(
rv
)
if
(
rv
)
{
PORT_FreeArena
(
arena
,
PR_TRUE
);
}
#if EC_DEBUG
printf
(
"ec_NewKey returning %s
\n
"
,
...
...
@@ -504,7 +500,7 @@ EC_ValidatePublicKey(ECParams *ecParams, SECItem *publicValue, int kmflag)
ECGroup
*
group
=
NULL
;
SECStatus
rv
=
SECFailure
;
mp_err
err
=
MP_OKAY
;
int
len
;
unsigned
int
len
;
if
(
!
ecParams
||
!
publicValue
)
{
PORT_SetError
(
SEC_ERROR_INVALID_ARGS
);
...
...
@@ -778,7 +774,7 @@ ECDSA_SignDigestWithSeed(ECPrivateKey *key, SECItem *signature,
/* In the definition of EC signing, digests are truncated
* to the length of n in bits.
* (see SEC 1 "Elliptic Curve Digit Signature Algorithm" section 4.1.*/
if
(
digest
->
len
*
8
>
ecParams
->
fieldID
.
size
)
{
if
(
digest
->
len
*
8
>
(
unsigned
int
)
ecParams
->
fieldID
.
size
)
{
mpl_rsh
(
&
s
,
&
s
,
digest
->
len
*
8
-
ecParams
->
fieldID
.
size
);
}
...
...
@@ -993,7 +989,8 @@ ECDSA_VerifyDigest(ECPublicKey *key, const SECItem *signature,
/* In the definition of EC signing, digests are truncated
* to the length of n in bits.
* (see SEC 1 "Elliptic Curve Digit Signature Algorithm" section 4.1.*/
if
(
digest
->
len
*
8
>
ecParams
->
fieldID
.
size
)
{
/* u1 = HASH(M') */
/* u1 = HASH(M') */
if
(
digest
->
len
*
8
>
(
unsigned
int
)
ecParams
->
fieldID
.
size
)
{
mpl_rsh
(
&
u1
,
&
u1
,
digest
->
len
*
8
-
ecParams
->
fieldID
.
size
);
}
...
...
src/share/native/sun/security/ec/impl/ec.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef __ec_h_
#define __ec_h_
#pragma ident "%Z%%M% %I% %E% SMI"
#define EC_DEBUG 0
#define EC_POINT_FORM_COMPRESSED_Y0 0x02
#define EC_POINT_FORM_COMPRESSED_Y1 0x03
...
...
src/share/native/sun/security/ec/impl/ec2.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _EC2_H
#define _EC2_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecl-priv.h"
/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
...
...
src/share/native/sun/security/ec/impl/ec2_163.c
浏览文件 @
4a0840e1
...
...
@@ -56,8 +56,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ec2.h"
#include "mp_gf2m.h"
#include "mp_gf2m-priv.h"
...
...
src/share/native/sun/security/ec/impl/ec2_193.c
浏览文件 @
4a0840e1
...
...
@@ -56,8 +56,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ec2.h"
#include "mp_gf2m.h"
#include "mp_gf2m-priv.h"
...
...
src/share/native/sun/security/ec/impl/ec2_233.c
浏览文件 @
4a0840e1
...
...
@@ -56,8 +56,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ec2.h"
#include "mp_gf2m.h"
#include "mp_gf2m-priv.h"
...
...
src/share/native/sun/security/ec/impl/ec2_aff.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ec2.h"
#include "mplogic.h"
#include "mp_gf2m.h"
...
...
src/share/native/sun/security/ec/impl/ec2_mont.c
浏览文件 @
4a0840e1
...
...
@@ -56,8 +56,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ec2.h"
#include "mplogic.h"
#include "mp_gf2m.h"
...
...
src/share/native/sun/security/ec/impl/ec_naf.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecl-priv.h"
/* Returns 2^e as an integer. This is meant to be used for small powers of
...
...
src/share/native/sun/security/ec/impl/ecc_impl.h
浏览文件 @
4a0840e1
...
...
@@ -51,15 +51,13 @@
*
*********************************************************************** */
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2010,
Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ECC_IMPL_H
#define _ECC_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
@@ -82,6 +80,7 @@ typedef enum { B_FALSE, B_TRUE } boolean_t;
typedef
unsigned
char
uint8_t
;
typedef
unsigned
long
ulong_t
;
typedef
enum
boolean
{
B_FALSE
,
B_TRUE
}
boolean_t
;
#define strdup _strdup
/* Replace POSIX name with ISO C++ name */
#endif
/* _WIN32 */
#ifndef _KERNEL
...
...
src/share/native/sun/security/ec/impl/ecdecode.c
浏览文件 @
4a0840e1
...
...
@@ -55,8 +55,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/types.h>
#ifndef _WIN32
...
...
@@ -90,7 +88,7 @@ hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str,
{
int
i
=
0
;
int
byteval
=
0
;
int
tmp
=
strlen
(
str
);
int
tmp
=
(
int
)
strlen
(
str
);
if
((
tmp
%
2
)
!=
0
)
return
NULL
;
...
...
@@ -134,7 +132,8 @@ gf_populate_params(ECCurveName name, ECFieldType field_type, ECParams *params,
/* 2 ['0'+'4'] + MAX_ECKEY_LEN * 2 [x,y] * 2 [hex string] + 1 ['\0'] */
char
genenc
[
3
+
2
*
2
*
MAX_ECKEY_LEN
];
if
((
name
<
ECCurve_noName
)
||
(
name
>
ECCurve_pastLastCurve
))
goto
cleanup
;
if
(((
int
)
name
<
ECCurve_noName
)
||
(
name
>
ECCurve_pastLastCurve
))
goto
cleanup
;
params
->
name
=
name
;
curveParams
=
ecCurve_map
[
params
->
name
];
CHECK_OK
(
curveParams
);
...
...
src/share/native/sun/security/ec/impl/ecl-curve.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _ECL_CURVE_H
#define _ECL_CURVE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecl-exp.h"
#ifndef _KERNEL
#include <stdlib.h>
...
...
src/share/native/sun/security/ec/impl/ecl-exp.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _ECL_EXP_H
#define _ECL_EXP_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* Curve field type */
typedef
enum
{
ECField_GFp
,
...
...
src/share/native/sun/security/ec/impl/ecl-priv.h
浏览文件 @
4a0840e1
...
...
@@ -58,8 +58,6 @@
#ifndef _ECL_PRIV_H
#define _ECL_PRIV_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecl.h"
#include "mpi.h"
#include "mplogic.h"
...
...
@@ -90,6 +88,10 @@
s = ACCUM(w); \
cout = CARRYOUT(w); }
/* Handle case when carry-in value is zero */
#define MP_ADD_CARRY_ZERO(a1, a2, s, cout) \
MP_ADD_CARRY(a1, a2, s, 0, cout);
#define MP_SUB_BORROW(a1, a2, s, bin, bout) \
{ mp_word w; \
w = ((mp_word)(a1)) - (a2) - (bin); \
...
...
@@ -111,6 +113,15 @@
s = sum += (cin); \
cout = tmp + (sum < (cin)); }
/* Handle case when carry-in value is zero */
#define MP_ADD_CARRY_ZERO(a1, a2, s, cout) \
{ mp_digit tmp,sum; \
tmp = (a1); \
sum = tmp + (a2); \
tmp = (sum < tmp);
/* detect overflow */
\
s = sum; \
cout = tmp; }
#define MP_SUB_BORROW(a1, a2, s, bin, bout) \
{ mp_digit tmp; \
tmp = (a1); \
...
...
src/share/native/sun/security/ec/impl/ecl.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mpi.h"
#include "mplogic.h"
#include "ecl.h"
...
...
src/share/native/sun/security/ec/impl/ecl.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _ECL_H
#define _ECL_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* Although this is not an exported header file, code which uses elliptic
* curve point operations will need to include it. */
...
...
src/share/native/sun/security/ec/impl/ecl_curve.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecl.h"
#include "ecl-curve.h"
#include "ecl-priv.h"
...
...
src/share/native/sun/security/ec/impl/ecl_gf.c
浏览文件 @
4a0840e1
...
...
@@ -55,8 +55,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mpi.h"
#include "mp_gf2m.h"
#include "ecl-priv.h"
...
...
@@ -307,7 +305,7 @@ ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r,
}
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
a0
,
r0
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
a0
,
r0
,
r0
,
carry
);
MP_ADD_CARRY
(
a1
,
r1
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
a2
,
r2
,
r2
,
carry
,
carry
);
#else
...
...
@@ -394,7 +392,7 @@ ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r,
}
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
a0
,
r0
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
a0
,
r0
,
r0
,
carry
);
MP_ADD_CARRY
(
a1
,
r1
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
a2
,
r2
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
a3
,
r3
,
r3
,
carry
,
carry
);
...
...
@@ -491,7 +489,7 @@ ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r,
r0
=
MP_DIGIT
(
b
,
0
);
}
MP_ADD_CARRY
(
a0
,
r0
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
a0
,
r0
,
r0
,
carry
);
MP_ADD_CARRY
(
a1
,
r1
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
a2
,
r2
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
a3
,
r3
,
r3
,
carry
,
carry
);
...
...
@@ -572,7 +570,7 @@ ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r,
r0
=
MP_DIGIT
(
b
,
0
);
}
MP_ADD_CARRY
(
a0
,
r0
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
a0
,
r0
,
r0
,
carry
);
MP_ADD_CARRY
(
a1
,
r1
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
a2
,
r2
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
a3
,
r3
,
r3
,
carry
,
carry
);
...
...
@@ -675,7 +673,7 @@ ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r,
b1
=
MP_DIGIT
(
&
meth
->
irr
,
1
);
b0
=
MP_DIGIT
(
&
meth
->
irr
,
0
);
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
b0
,
r0
,
r0
,
0
,
borrow
);
MP_ADD_CARRY
_ZERO
(
b0
,
r0
,
r0
,
borrow
);
MP_ADD_CARRY
(
b1
,
r1
,
r1
,
borrow
,
borrow
);
MP_ADD_CARRY
(
b2
,
r2
,
r2
,
borrow
,
borrow
);
#else
...
...
@@ -766,7 +764,7 @@ ec_GFp_sub_4(const mp_int *a, const mp_int *b, mp_int *r,
b1
=
MP_DIGIT
(
&
meth
->
irr
,
1
);
b0
=
MP_DIGIT
(
&
meth
->
irr
,
0
);
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
b0
,
r0
,
r0
,
0
,
borrow
);
MP_ADD_CARRY
_ZERO
(
b0
,
r0
,
r0
,
borrow
);
MP_ADD_CARRY
(
b1
,
r1
,
r1
,
borrow
,
borrow
);
MP_ADD_CARRY
(
b2
,
r2
,
r2
,
borrow
,
borrow
);
MP_ADD_CARRY
(
b3
,
r3
,
r3
,
borrow
,
borrow
);
...
...
@@ -850,7 +848,7 @@ ec_GFp_sub_5(const mp_int *a, const mp_int *b, mp_int *r,
b2
=
MP_DIGIT
(
&
meth
->
irr
,
2
);
b1
=
MP_DIGIT
(
&
meth
->
irr
,
1
);
b0
=
MP_DIGIT
(
&
meth
->
irr
,
0
);
MP_ADD_CARRY
(
b0
,
r0
,
r0
,
0
,
borrow
);
MP_ADD_CARRY
_ZERO
(
b0
,
r0
,
r0
,
borrow
);
MP_ADD_CARRY
(
b1
,
r1
,
r1
,
borrow
,
borrow
);
MP_ADD_CARRY
(
b2
,
r2
,
r2
,
borrow
,
borrow
);
MP_ADD_CARRY
(
b3
,
r3
,
r3
,
borrow
,
borrow
);
...
...
@@ -924,7 +922,7 @@ ec_GFp_sub_6(const mp_int *a, const mp_int *b, mp_int *r,
b2
=
MP_DIGIT
(
&
meth
->
irr
,
2
);
b1
=
MP_DIGIT
(
&
meth
->
irr
,
1
);
b0
=
MP_DIGIT
(
&
meth
->
irr
,
0
);
MP_ADD_CARRY
(
b0
,
r0
,
r0
,
0
,
borrow
);
MP_ADD_CARRY
_ZERO
(
b0
,
r0
,
r0
,
borrow
);
MP_ADD_CARRY
(
b1
,
r1
,
r1
,
borrow
,
borrow
);
MP_ADD_CARRY
(
b2
,
r2
,
r2
,
borrow
,
borrow
);
MP_ADD_CARRY
(
b3
,
r3
,
r3
,
borrow
,
borrow
);
...
...
src/share/native/sun/security/ec/impl/ecl_mult.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mpi.h"
#include "mplogic.h"
#include "ecl.h"
...
...
src/share/native/sun/security/ec/impl/ecp.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _ECP_H
#define _ECP_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecl-priv.h"
/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
...
...
src/share/native/sun/security/ec/impl/ecp_192.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "mpi.h"
#include "mplogic.h"
...
...
@@ -210,15 +208,15 @@ ec_GFp_nistp192_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
/* implement r = (a2,a1,a0)+(a5,a5,a5)+(a4,a4,0)+(0,a3,a3) */
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
r0
,
a3
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
a3
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
a3
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
a4
,
r2
,
carry
,
carry
);
r3
=
carry
;
MP_ADD_CARRY
(
r0
,
a5
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
a5
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
a5
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
a5
,
r2
,
carry
,
carry
);
r3
+=
carry
;
MP_ADD_CARRY
(
r1
,
a4
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,
a4
,
r1
,
carry
);
MP_ADD_CARRY
(
r2
,
0
,
r2
,
carry
,
carry
);
r3
+=
carry
;
...
...
@@ -251,7 +249,7 @@ ec_GFp_nistp192_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
/* reduce out the carry */
while
(
r3
)
{
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
r0
,
r3
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
r3
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
r3
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
0
,
r2
,
carry
,
carry
);
r3
=
carry
;
...
...
@@ -335,7 +333,7 @@ ec_GFp_nistp192_add(const mp_int *a, const mp_int *b, mp_int *r,
}
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
a0
,
r0
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
a0
,
r0
,
r0
,
carry
);
MP_ADD_CARRY
(
a1
,
r1
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
a2
,
r2
,
r2
,
carry
,
carry
);
#else
...
...
@@ -357,7 +355,7 @@ ec_GFp_nistp192_add(const mp_int *a, const mp_int *b, mp_int *r,
((
r1
==
MP_DIGIT_MAX
)
||
((
r1
==
(
MP_DIGIT_MAX
-
1
))
&&
(
r0
==
MP_DIGIT_MAX
)))))
{
#ifndef MPI_AMD64_ADD
MP_ADD_CARRY
(
r0
,
1
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
1
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
1
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
0
,
r2
,
carry
,
carry
);
#else
...
...
src/share/native/sun/security/ec/impl/ecp_224.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "mpi.h"
#include "mplogic.h"
...
...
@@ -251,10 +249,10 @@ ec_GFp_nistp224_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
+( 0, a6,a5b, 0)
-( 0 0, 0|a6b, a6a|a5b )
-( a6b, a6a|a5b, a5a|a4b, a4a|a3b ) */
MP_ADD_CARRY
(
r1
,
a3b
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,
a3b
,
r1
,
carry
);
MP_ADD_CARRY
(
r2
,
a4
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
a5a
,
r3
,
carry
,
carry
);
MP_ADD_CARRY
(
r1
,
a5b
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,
a5b
,
r1
,
carry
);
MP_ADD_CARRY
(
r2
,
a6
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
0
,
r3
,
carry
,
carry
);
...
...
@@ -275,7 +273,7 @@ ec_GFp_nistp224_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
r3b
=
(
int
)(
r3
>>
32
);
while
(
r3b
>
0
)
{
r3
&=
0xffffffff
;
MP_ADD_CARRY
(
r1
,((
mp_digit
)
r3b
)
<<
32
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,((
mp_digit
)
r3b
)
<<
32
,
r1
,
carry
);
if
(
carry
)
{
MP_ADD_CARRY
(
r2
,
0
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
0
,
r3
,
carry
,
carry
);
...
...
@@ -290,7 +288,7 @@ ec_GFp_nistp224_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
}
while
(
r3b
<
0
)
{
MP_ADD_CARRY
(
r0
,
1
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
1
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
MP_DIGIT_MAX
<<
32
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
MP_DIGIT_MAX
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
MP_DIGIT_MAX
>>
32
,
r3
,
carry
,
carry
);
...
...
src/share/native/sun/security/ec/impl/ecp_256.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "mpi.h"
#include "mplogic.h"
...
...
@@ -303,32 +301,32 @@ ec_GFp_nistp256_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
r0
=
MP_DIGIT
(
a
,
0
);
/* sum 1 */
MP_ADD_CARRY
(
r1
,
a5h
<<
32
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,
a5h
<<
32
,
r1
,
carry
);
MP_ADD_CARRY
(
r2
,
a6
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
a7
,
r3
,
carry
,
carry
);
r4
=
carry
;
MP_ADD_CARRY
(
r1
,
a5h
<<
32
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,
a5h
<<
32
,
r1
,
carry
);
MP_ADD_CARRY
(
r2
,
a6
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
a7
,
r3
,
carry
,
carry
);
r4
+=
carry
;
/* sum 2 */
MP_ADD_CARRY
(
r1
,
a6l
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,
a6l
,
r1
,
carry
);
MP_ADD_CARRY
(
r2
,
a6h
|
a7l
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
a7h
,
r3
,
carry
,
carry
);
r4
+=
carry
;
MP_ADD_CARRY
(
r1
,
a6l
,
r1
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r1
,
a6l
,
r1
,
carry
);
MP_ADD_CARRY
(
r2
,
a6h
|
a7l
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
a7h
,
r3
,
carry
,
carry
);
r4
+=
carry
;
/* sum 3 */
MP_ADD_CARRY
(
r0
,
a4
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
a4
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
a5l
>>
32
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
0
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
a7
,
r3
,
carry
,
carry
);
r4
+=
carry
;
/* sum 4 */
MP_ADD_CARRY
(
r0
,
a4h
|
a5l
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
a4h
|
a5l
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
a5h
|
(
a6h
<<
32
),
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
a7
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
a6h
|
a4l
,
r3
,
carry
,
carry
);
...
...
@@ -362,7 +360,7 @@ ec_GFp_nistp256_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
while
(
r4
>
0
)
{
mp_digit
r4_long
=
r4
;
mp_digit
r4l
=
(
r4_long
<<
32
);
MP_ADD_CARRY
(
r0
,
r4_long
,
r0
,
0
,
carry
);
MP_ADD_CARRY
_ZERO
(
r0
,
r4_long
,
r0
,
carry
);
MP_ADD_CARRY
(
r1
,
-
r4l
,
r1
,
carry
,
carry
);
MP_ADD_CARRY
(
r2
,
MP_DIGIT_MAX
,
r2
,
carry
,
carry
);
MP_ADD_CARRY
(
r3
,
r4l
-
r4_long
-
1
,
r3
,
carry
,
carry
);
...
...
src/share/native/sun/security/ec/impl/ecp_384.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "mpi.h"
#include "mplogic.h"
...
...
src/share/native/sun/security/ec/impl/ecp_521.c
浏览文件 @
4a0840e1
...
...
@@ -50,12 +50,10 @@
*
*********************************************************************** */
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2010,
Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "mpi.h"
#include "mplogic.h"
...
...
@@ -74,7 +72,7 @@ ec_GFp_nistp521_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
{
mp_err
res
=
MP_OKAY
;
int
a_bits
=
mpl_significant_bits
(
a
);
int
i
;
unsigned
int
i
;
/* m1, m2 are statically-allocated mp_int of exactly the size we need */
mp_int
m1
;
...
...
src/share/native/sun/security/ec/impl/ecp_aff.c
浏览文件 @
4a0840e1
...
...
@@ -59,8 +59,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "mplogic.h"
#ifndef _KERNEL
...
...
src/share/native/sun/security/ec/impl/ecp_jac.c
浏览文件 @
4a0840e1
...
...
@@ -59,8 +59,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "mplogic.h"
#ifndef _KERNEL
...
...
src/share/native/sun/security/ec/impl/ecp_jm.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ecp.h"
#include "ecl-priv.h"
#include "mplogic.h"
...
...
src/share/native/sun/security/ec/impl/ecp_mont.c
浏览文件 @
4a0840e1
...
...
@@ -54,8 +54,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* Uses Montgomery reduction for field arithmetic. See mpi/mpmontg.c for
* code implementation. */
...
...
src/share/native/sun/security/ec/impl/logtab.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _LOGTAB_H
#define _LOGTAB_H
#pragma ident "%Z%%M% %I% %E% SMI"
const
float
s_logv_2
[]
=
{
0
.
000000000
f
,
0
.
000000000
f
,
1
.
000000000
f
,
0
.
630929754
f
,
/* 0 1 2 3 */
0
.
500000000
f
,
0
.
430676558
f
,
0
.
386852807
f
,
0
.
356207187
f
,
/* 4 5 6 7 */
...
...
src/share/native/sun/security/ec/impl/mp_gf2m-priv.h
浏览文件 @
4a0840e1
...
...
@@ -58,8 +58,6 @@
#ifndef _MP_GF2M_PRIV_H_
#define _MP_GF2M_PRIV_H_
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mpi-priv.h"
extern
const
mp_digit
mp_gf2m_sqr_tb
[
16
];
...
...
src/share/native/sun/security/ec/impl/mp_gf2m.c
浏览文件 @
4a0840e1
...
...
@@ -55,8 +55,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mp_gf2m.h"
#include "mp_gf2m-priv.h"
#include "mplogic.h"
...
...
src/share/native/sun/security/ec/impl/mp_gf2m.h
浏览文件 @
4a0840e1
...
...
@@ -58,8 +58,6 @@
#ifndef _MP_GF2M_H_
#define _MP_GF2M_H_
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mpi.h"
mp_err
mp_badd
(
const
mp_int
*
a
,
const
mp_int
*
b
,
mp_int
*
c
);
...
...
src/share/native/sun/security/ec/impl/mpi-config.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _MPI_CONFIG_H
#define _MPI_CONFIG_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* $Id: mpi-config.h,v 1.5 2004/04/25 15:03:10 gerv%gerv.net Exp $ */
/*
...
...
src/share/native/sun/security/ec/impl/mpi-priv.h
浏览文件 @
4a0840e1
...
...
@@ -63,8 +63,6 @@
#ifndef _MPI_PRIV_H
#define _MPI_PRIV_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* $Id: mpi-priv.h,v 1.20 2005/11/22 07:16:43 relyea%netscape.com Exp $ */
#include "mpi.h"
...
...
src/share/native/sun/security/ec/impl/mpi.c
浏览文件 @
4a0840e1
...
...
@@ -54,12 +54,10 @@
*
*********************************************************************** */
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2010,
Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* $Id: mpi.c,v 1.45 2006/09/29 20:12:21 alexei.volkov.bugs%sun.com Exp $ */
#include "mpi-priv.h"
...
...
@@ -1148,7 +1146,7 @@ mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c)
mp_int
s
,
x
;
mp_err
res
;
mp_digit
d
;
int
dig
,
bit
;
unsigned
int
dig
,
bit
;
ARGCHK
(
a
!=
NULL
&&
b
!=
NULL
&&
c
!=
NULL
,
MP_BADARG
);
...
...
@@ -1523,7 +1521,7 @@ mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c
mp_int
s
,
x
,
mu
;
mp_err
res
;
mp_digit
d
;
int
dig
,
bit
;
unsigned
int
dig
,
bit
;
ARGCHK
(
a
!=
NULL
&&
b
!=
NULL
&&
c
!=
NULL
,
MP_BADARG
);
...
...
@@ -2057,7 +2055,7 @@ mp_size mp_trailing_zeros(const mp_int *mp)
{
mp_digit
d
;
mp_size
n
=
0
;
int
ix
;
unsigned
int
ix
;
if
(
!
mp
||
!
MP_DIGITS
(
mp
)
||
!
mp_cmp_z
(
mp
))
return
n
;
...
...
@@ -2900,9 +2898,9 @@ void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count)
/* Allocate ni records of nb bytes each, and return a pointer to that */
void
*
s_mp_alloc
(
size_t
nb
,
size_t
ni
,
int
kmflag
)
{
mp_int
*
mp
;
++
mp_allocs
;
#ifdef _KERNEL
mp_int
*
mp
;
mp
=
kmem_zalloc
(
nb
*
ni
,
kmflag
);
if
(
mp
!=
NULL
)
FLAG
(
mp
)
=
kmflag
;
...
...
@@ -3112,7 +3110,7 @@ void s_mp_div_2(mp_int *mp)
mp_err
s_mp_mul_2
(
mp_int
*
mp
)
{
mp_digit
*
pd
;
int
ix
,
used
;
unsigned
int
ix
,
used
;
mp_digit
kin
=
0
;
/* Shift digits leftward by 1 bit */
...
...
@@ -4663,7 +4661,7 @@ char s_mp_todigit(mp_digit val, int r, int low)
{
char
ch
;
if
(
val
>=
r
)
if
(
val
>=
(
unsigned
int
)
r
)
return
0
;
ch
=
s_dmap_1
[
val
];
...
...
@@ -4778,7 +4776,7 @@ mp_err
mp_to_unsigned_octets
(
const
mp_int
*
mp
,
unsigned
char
*
str
,
mp_size
maxlen
)
{
int
ix
,
pos
=
0
;
int
bytes
;
unsigned
int
bytes
;
ARGCHK
(
mp
!=
NULL
&&
str
!=
NULL
&&
!
SIGN
(
mp
),
MP_BADARG
);
...
...
@@ -4810,7 +4808,7 @@ mp_err
mp_to_signed_octets
(
const
mp_int
*
mp
,
unsigned
char
*
str
,
mp_size
maxlen
)
{
int
ix
,
pos
=
0
;
int
bytes
;
unsigned
int
bytes
;
ARGCHK
(
mp
!=
NULL
&&
str
!=
NULL
&&
!
SIGN
(
mp
),
MP_BADARG
);
...
...
@@ -4850,7 +4848,7 @@ mp_err
mp_to_fixlen_octets
(
const
mp_int
*
mp
,
unsigned
char
*
str
,
mp_size
length
)
{
int
ix
,
pos
=
0
;
int
bytes
;
unsigned
int
bytes
;
ARGCHK
(
mp
!=
NULL
&&
str
!=
NULL
&&
!
SIGN
(
mp
),
MP_BADARG
);
...
...
src/share/native/sun/security/ec/impl/mpi.h
浏览文件 @
4a0840e1
...
...
@@ -60,8 +60,6 @@
#ifndef _MPI_H
#define _MPI_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* $Id: mpi.h,v 1.22 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
#include "mpi-config.h"
...
...
src/share/native/sun/security/ec/impl/mplogic.c
浏览文件 @
4a0840e1
...
...
@@ -56,8 +56,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* $Id: mplogic.c,v 1.15 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
#include "mpi-priv.h"
...
...
src/share/native/sun/security/ec/impl/mplogic.h
浏览文件 @
4a0840e1
...
...
@@ -59,8 +59,6 @@
#ifndef _MPLOGIC_H
#define _MPLOGIC_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* $Id: mplogic.h,v 1.7 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
#include "mpi.h"
...
...
src/share/native/sun/security/ec/impl/mpmontg.c
浏览文件 @
4a0840e1
...
...
@@ -56,8 +56,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* $Id: mpmontg.c,v 1.20 2006/08/29 02:41:38 nelson%bolyard.com Exp $ */
/* This file implements moduluar exponentiation using Montgomery's
...
...
src/share/native/sun/security/ec/impl/mpprime.h
浏览文件 @
4a0840e1
...
...
@@ -60,8 +60,6 @@
#ifndef _MP_PRIME_H
#define _MP_PRIME_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mpi.h"
extern
const
int
prime_tab_size
;
/* number of primes available */
...
...
src/share/native/sun/security/ec/impl/oid.c
浏览文件 @
4a0840e1
...
...
@@ -50,12 +50,10 @@
*
*********************************************************************** */
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2010,
Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/types.h>
#ifndef _WIN32
...
...
@@ -433,8 +431,7 @@ SECOidData *
SECOID_FindOID
(
const
SECItem
*
oid
)
{
SECOidData
*
po
;
SECOidData
*
ret
;
int
i
;
SECOidData
*
ret
=
NULL
;
if
(
oid
->
len
==
8
)
{
if
(
oid
->
data
[
6
]
==
0x00
)
{
...
...
@@ -454,8 +451,6 @@ SECOID_FindOID(const SECItem *oid)
po
=
&
SECG_oids
[
oid
->
data
[
4
]];
if
(
memcmp
(
oid
->
data
,
po
->
oid
.
data
,
5
)
==
0
)
ret
=
po
;
}
else
{
ret
=
NULL
;
}
return
(
ret
);
}
...
...
src/share/native/sun/security/ec/impl/secitem.c
浏览文件 @
4a0840e1
...
...
@@ -53,8 +53,6 @@
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Support routines for SECItem data structure.
*
...
...
src/share/native/sun/security/ec/impl/secoidt.h
浏览文件 @
4a0840e1
...
...
@@ -57,8 +57,6 @@
#ifndef _SECOIDT_H_
#define _SECOIDT_H_
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* secoidt.h - public data structures for ASN.1 OID functions
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录