summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/x_long.c
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:17:54 +0000
committerdjm <>2008-09-06 12:17:54 +0000
commit38ce604e3cc97706b876b0525ddff0121115456d (patch)
tree7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/asn1/x_long.c
parent12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff)
downloadopenbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/asn1/x_long.c')
-rw-r--r--src/lib/libcrypto/asn1/x_long.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/x_long.c b/src/lib/libcrypto/asn1/x_long.c
index c5f25956cb..0db233cb95 100644
--- a/src/lib/libcrypto/asn1/x_long.c
+++ b/src/lib/libcrypto/asn1/x_long.c
@@ -59,6 +59,7 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include <openssl/asn1t.h> 61#include <openssl/asn1t.h>
62#include <openssl/bn.h>
62 63
63/* Custom primitive type for long handling. This converts between an ASN1_INTEGER 64/* Custom primitive type for long handling. This converts between an ASN1_INTEGER
64 * and a long directly. 65 * and a long directly.
@@ -69,7 +70,7 @@ static int long_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
69static void long_free(ASN1_VALUE **pval, const ASN1_ITEM *it); 70static void long_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
70 71
71static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); 72static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it);
72static int long_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); 73static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it);
73 74
74static ASN1_PRIMITIVE_FUNCS long_pf = { 75static ASN1_PRIMITIVE_FUNCS long_pf = {
75 NULL, 0, 76 NULL, 0,
@@ -136,13 +137,14 @@ static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const A
136 return clen + pad; 137 return clen + pad;
137} 138}
138 139
139static int long_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) 140static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
141 int utype, char *free_cont, const ASN1_ITEM *it)
140{ 142{
141 int neg, i; 143 int neg, i;
142 long ltmp; 144 long ltmp;
143 unsigned long utmp = 0; 145 unsigned long utmp = 0;
144 char *cp = (char *)pval; 146 char *cp = (char *)pval;
145 if(len > sizeof(long)) { 147 if(len > (int)sizeof(long)) {
146 ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); 148 ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG);
147 return 0; 149 return 0;
148 } 150 }