summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects/obj_xref.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/objects/obj_xref.c')
-rw-r--r--src/lib/libcrypto/objects/obj_xref.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/libcrypto/objects/obj_xref.c b/src/lib/libcrypto/objects/obj_xref.c
index 152eca5c67..9f744bcede 100644
--- a/src/lib/libcrypto/objects/obj_xref.c
+++ b/src/lib/libcrypto/objects/obj_xref.c
@@ -110,8 +110,10 @@ int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid)
110#endif 110#endif
111 if (rv == NULL) 111 if (rv == NULL)
112 return 0; 112 return 0;
113 *pdig_nid = rv->hash_id; 113 if (pdig_nid)
114 *ppkey_nid = rv->pkey_id; 114 *pdig_nid = rv->hash_id;
115 if (ppkey_nid)
116 *ppkey_nid = rv->pkey_id;
115 return 1; 117 return 1;
116 } 118 }
117 119
@@ -144,7 +146,8 @@ int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid)
144#endif 146#endif
145 if (rv == NULL) 147 if (rv == NULL)
146 return 0; 148 return 0;
147 *psignid = (*rv)->sign_id; 149 if (psignid)
150 *psignid = (*rv)->sign_id;
148 return 1; 151 return 1;
149 } 152 }
150 153